AnsweredAssumed Answered

Best coding pattern for interface with other service (PI SDK)

Question asked by Arco on Mar 9, 2015
Latest reply on Mar 16, 2015 by Arco

Hello all,

 

I was wondering what is the best coding pattern for my case.

We have written an interface between a system and PI using the PI SDK.

We have problems with the performance and are reviewing our code to see if we can optimize it.

What are we doing ?

First we load about 2300 PI Points with a certain pointsource into a dictionary. The key of the dictionary items ist the instrumenttag of the PI Point.

We are doing that so on the way back to PI we can find the corresponding PI Point easily.

We register ourselves with the other service with a list of instrument tags. After that we become value changes as events from the other system.

There can be about 500 to 1000 events per second. These events are added to a .NET BlockingCollection.

Another process is reading from this BlockingColletion in a parallel foreach loop. The value of the instrumenttag is used to find the corresponding PI Point in the dictionary.

Then the value of the PI Point is updated.

This mechanism has worked fine for months but since our servers (VMWare) are moved to another ESX host the above mentioned service has delays when writing to the buffer subsystem.

Ofcourse we are looking to all the variables and trying to optimize the code is one of them.

Does anyone have any ideas of a better approach to this use case?

Any help would be appreciated.


Arco Stolk


Outcomes