4 Replies Latest reply on Sep 1, 2010 12:50 PM by andreas

    PISDK EventPipe processing

    formerpigeek

      Hi,

       

       

       

      I have a application which uses PISDK to communicate to PI Server and also use EventPipe to get notification on value changes. I have a doubt here as to how we can process the event pipe quickly if there is a bulk of events generated from PI Server.

       

      Say i have a PI Server with 100K points and even if 50% of the points value changes (50K) then my application will receive a event pipe with count as 50K. What would be the best way to process all of these events within 2 secs?

       

      I also need the current value of the point to be read while processing it in the event pipe.

       

       

       

      I would also like to know if PISDK supports bulk update of data to PI Server.

       

      Thanks & Regards

       

      Kavita.

        • Re: PISDK EventPipe processing
          andreas

          Kavita,

           

          here are two threads regarding bulk updates of data: Maximum PI performance and Backfilling Data.

           

          Regarding your event pipes - I would like to understand what application needs to monitor all tags of a PI Server and take an action on each and every snapshot event. Could you explain us what problem your application addresses?

            • Re: PISDK EventPipe processing

              Andreas

              Regarding your event pipes - I would like to understand what application needs to monitor all tags of a PI Server and take an action on each and every snapshot event. Could you explain us what problem your application addresses?
              Andreas, this seems to be related to this other discussion thread.

              • Re: PISDK EventPipe processing
                formerpigeek

                Hi Andreas,

                 

                 

                 

                Our Server will have tags other than value and quality, my application will just monitor the the value and quality code tag value change events. In my case we might have around 10 tags per device and out of these 10 tags only 2 tags value and quality will only be monitored.

                 

                Now if we have around 50K devices so we will have 50K * 10 = 500K tags and we will have to monitor 50K * 2 = 100K points, out of these if we consider 50% of the devices changing state within a second then we need to cater to 100K/2 = 50K tags in my application.

                 

                 

                 

                I need to process these events as quickly as possible (expected to be within 3-4 sec). This is where I am facing the problem as I need to loop through the EventPipe and process event event, as well as fetch its value from PI server.

                 


                I need suggestion as to how we can process the EventPipe to achieve the above performace.

                 

                 

                 

                Regards,

                 

                Kavita.

                  • Re: PISDK EventPipe processing
                    andreas

                    As I don't have a 50k system available I created 100 very fast tags that generate ~50k snapshot events within 5s (the default PollIntervall for Snapshot EventPipes). Getting the PointValue object (that contains the point name and the value) for the 50k events takes ~1s on my system (normal desktop PC, dual core, ~2Ghz).

                     

                    I did not do a fancy code optimization, just a simple foreach.

                    object[] evObj;
                    count = pldEvents.Count;
                    evObj = newobject[pldEvents.Count];
                    evObj = (object[])pldEvents.TakeAll();
                    foreach (PISDK.PIEventObject PIEvObj in evObj)
                    {
                       PISDK.PointValue pv = (PISDK.PointValue)PIEvObj.EventData;
                    }

                    you may note that with 50k events you will have to change some parameters (MaxCount in the EventPipe, MaxUpdateQueue in the Update Manager, maybe even TotalUpdateQueue) - this still seems to me like a very unusual task and you may share much more of your requirements with the community. Maybe we can come up with a less ressource intensive architecture.