AnsweredAssumed Answered

PI Server Cache

Question asked by PeterHuang on Dec 19, 2017
Latest reply on Dec 19, 2017 by rdavin

Hi

 

I'm currently using PI AF SDK to get the pi points using the following APIs

 

     PIPoint.FindPIPointsAsync

 

and for each pi point, I call

 

     PIPoint.PlotValuesAsync

 

In our current architecture, the UI layer pass one parameter at a time to the data access layer. As a result, I can call these two API using one parameter at a time. Even though FindPIPointsAsync takes multiple parameters.

I understand that passing multiple parameter would be more efficient instead of passing one at a time, even though they are being called asynchronously, (with a waitall in the UI layerl). As passing multiple parameters require more design work so to justify the work. I'm ask to find the performance different between using one parameter vs multiple parameters for FindPIPointsAsync API call.

 

During the test, I find out that the first time I fetch the data is very fast as compare to the subsequent calls ( 1 sec vs 150 ms).  I was instructed by someone from OSI to use AFCache to remove cache in the client, However, the cache issue remain and the only way to remove "cache issue" is by reboot the PI server.   I don't see any AF SDK that would allow me to remove the cache in the server. Please advise if  there any support to remove the cache in the server using AF SDK. If not, are there any other way that I can remove the server cache or work around the server cache issue such as set a registry key, change a configuration value or even stop/start one or more services, as the only way I can do it now is to reboot the PI server every time before the test and that is time consuming.

 

On the side note, PlotValuesAsync work with one one point at a time. But PIPointList.PlotValues work with multiple points. I do not see an async version for PiPointList.PlotValues. It there just no real performance difference for using async with PiPointList.PlotValues that such api is not supported. Please advise. Thanks

 

Peter

Outcomes