6 Replies Latest reply on Jan 7, 2010 2:28 PM by ygalipeau

    Requesting multiples time frame aggregates

    ygalipeau

       

       

      i have a question for PI sdk.

       

      is there a way to retreive multiple irregular time frame aggregate in just one call instead of multiple calls?

       

      for example i want the avg value for the following range:

       

      1:35-2:30

       

      2:45-6:17

       

      6:23-9:31

       

      ...

       

      currently i will have to make a function call for each one of them and i don't think there is another way to do this.

       

      would it be a good idea to have the possibility to pass an array of start time, end time and aggregate (like the interpolation functions). this would  reduce dramaticaly the trip back and forth to the PI server.

       

      yannick

        • Re: Requesting multiples time frame aggregates
          MichaelvdV@Atos

          I'm not really sure about the 'one call' to do this. (I am not familiar with it, but maybe one of the real experts can tell :) ).

           

          The first thing I thought of was when using PI OLEDB to do this kind of call, from my understanding, PI OLEDB will automatically optimize it and run it multi threaded / in parallel where possible. This could provide a performance gain without having to code the parallellism/threading yourself.

            • Re: Requesting multiples time frame aggregates
              hanyong

              Hmm....This seems to be the same question that you have raised before in another thread: http://vcampus.osisoft.com/forums/p/279/1112.aspx#1112. At this moment, the answer to this question is still the same. There is no PISDK call that can fulfill the requirement in a single call.

               

              Like what Michael said, you can try out multi-threading to run the calls in parallel but there shouldn't be a way to pass all the queries to PI server at once for now. =]

               

               

               

               

               

               

                • Re: Requesting multiples time frame aggregates
                  MichaelvdV@Atos

                  Another option I was thinking about would involve using PI WebServices (or create your own WCF service). In this way, you can do a single call to the webservice and get a single resultset back. If you install the webservice on your PI system, the PISDK communication would just be done locally, and would save you some traffic maybe (altough I think the overhead of SOAP or XML is very much larger then creating multiple SDK calls...)

                    • Re: Requesting multiples time frame aggregates
                      ygalipeau

                      you are right han,

                       

                      i have already ask this question. i raise it again since that after attending the vcampus live, i learn that this features was available for the pi web servcies (array of requests) so i thought maybe that was something new or coming in the sdk.

                       

                      however, this would be a great feature to add in the PI SDK. it can be done with array of time for interpolation, i don't see why it couldn't be feasable with array of start and end time. i have some case where i need to extract thousands of aggregates and pi sdk is the fastest  way to do it. just by minimizing the network trips would speed up things significantly.

                       

                      thanks

                       

                      yannick

                        • Re: Requesting multiples time frame aggregates

                          Yannick Galipeau (ITI)

                          i learn that this features was available for the pi web servcies (array of requests) so i thought maybe that was something new or coming in the sdk
                          This feature is indeed available in PI Web Services. However, keep in mind PI Web Services is not built on top PI SDK, but rather on top of PI Data Services (the successor of RtBaseline Services). And PI Data Services does use multiple calls to accomplish this.

                           

                          This is a nice enhancement request that I suggest you file in at Tech Support. That way it will be archived in the system and will be considered by the development teams and product managers.