1 Reply Latest reply on Jun 2, 2014 6:38 PM by Mike Zboray

    Processing large amounts of events using PISDK




      In my application, I register for multiple (thousands of) tags. I've created a handler for the incoming values (registered via _DEventPipeEvents_OnNewValueEventHandler).


      The handler is called only every 5 seconds, with 10000 of values. Unfortunatelly, there is a bigger amount of data coming for the tags of interest. In the update manager I get after a while connection status 'overflow', with 50000 of messages pending.


      My client processes the 10000 messages that it receives in ca 0.3 seconds. Is it possible to reconfigure PISDK to either send the data more frequently or to send bigger batches?


      If not, is there any other (programmatic) approach that could be employed in my scenario?

        • Re: Processing large amounts of events using PISDK
          Mike Zboray

          The IEventPipe2 interface has a property PollInterval which is the number of milliseconds between checks for pi server events. The default (for pipoint pipe type) is 5 seconds. The event pipe object has a MaximumCount property which defaults to 10000. You can use these two properties to change how often calls are made to the server and how much data is retrieved.


          I believe the maximum event rate for a PISDK event pipe is on the order of 10k events per second. If you expect a higher rate than that, you can use multiple pipes.


          AFSDK 2.5 included a PISDK Event Pipe-like API, PIDataPipe. This has better performance characteristics (throughput and memory usage) than the PISDK event pipe and is advisable if you are developing a .NET application. In AF 2.6, AFDataPipe extends this functionality to AF Attributes.