6 Replies Latest reply on Nov 15, 2013 8:38 PM by Bhess

    PI WebServices update ratio

    Bannikov

      Hello all!

       

      We're developing our very first web applications that uses PI WebServices (2012 version) as a primary and only data source. We use both GetPISnapshotData and GetPIUpdates methods to retrieve fresh updated data from PI/AF Server. GetPISnapshotData is used for complex attributes where no signup for updates is provided. GetUpdates is used for PI Point based attributes (like famous SINOSOID).

       

      I've configured SINUSOID for fast data update (every second with no exception and no compression at all - for testing purposes, of course). I've also configured my application to call GetPIUpdates method every second. So I had expected that every call of GetPIUpdates method gave me about one new value.

       

      Surprisingly, only each fifth call returned with data. First four calls gaves me nothing, and only fifth call gaves me all five values that I had expected. This repeated contantly. So I suppose that it some update ratio in PI WebServices that prevent too fast data retrieve. Seems to be this ratio is about 5 seconds (I remember that ProcessBook has the same default update ratio for all incoming data). Is it true?  If yes, is this update ratio configurable in any ways? Please, can somebody (preferably from OSIsoft) clarify this for me (and my team too). Thank you in advance! Look forward to hear anything about it!

        • Re: PI WebServices update ratio

          PI WS sits on PI SDK, PI SDK EventPipe serves GetPIUpdates, default polling interval of a PI SDK EventPipe is 5 seconds.

           

          Until PI WS sits on an AF SDK DataPipe the RPC to get the events will be dependent on the PI SDK EventPipe polling frequency - whereas an AF SDK DataPipe issues the RPC upon request. Don't remember seeing a method to specify the polling interval via PI WS.

           

          But wait for OSIsoft to confirm...

            • Re: PI WebServices update ratio
              Bannikov

               Thank you, Rhys, I suspected something like this, but I`m still not completely sure. I hope OSIsoft people will clarify this all

                • Re: PI WebServices update ratio
                  Bhess

                  Actually, the 5-second default comes from PI Data Services, an internal data access layer.  That default can be overridden by specifying a new value in your web.config file.

                   

                  In your web.config, look for the block called 

                   
                  <pidsSettings>
                  

                  And add a new value for the property UpdateManagerPollInterval, which is specified in seconds.  The minimum value is 1.  By the time you're done, you'll have:

                   
                    <pidsSettings>
                      <!-- existing values here for instrumentation config and other settings-->
                      <add key="UpdateManagerPollInterval" value="1"/>
                    </pidsSettings>
                  

                   Note of course that this will now apply  globally, so if there are existing users of PI Web Services' updates, you may want to assess the impact.

                   

                  If this doesn't work for you, feel free to ping me directly.

                   

                  Brad

                    • Re: PI WebServices update ratio
                      Bhess

                      And, unhelpfully, I initially fat fingered my reply (:s/UpdatePollManagerInterval/UpdateManagerPollInterval/). It's fixed now, but if you're reading this thread in email, please check out the updated post on the forum website.

                        • Re: PI WebServices update ratio
                          Bannikov

                          Hello Brad!

                           

                          Wonderful! This magic works! Thank you very much! If there any other useful parameters, I mean in web.config?

                            • Re: PI WebServices update ratio
                              Bhess

                              Plenty of others-- I'm trying to look and not seeing anywhere that we've published an exhaustive list.  Some of them are not especially useful because they're provided for diagnostic purposes only, when on the horn with our Tech Support folks.  Let me take a look and see if there is a good reference I can give you.

                               

                              In the meantime, I'll just note that PI Data Services is the same data access layer that backs PI WebParts and PI Coresight (not Coresight mobile), so if you've seen PI DS global settings mentioned in the context of any of those applications, those same settings should take work in PI Web Services as well for those areas where PI Web Services uses PI DS under the hood.