6 Replies Latest reply on Aug 3, 2012 7:29 PM by charlie@osisoft.com

    PI SDK Buffering without live connection

    francois_ruel

      Hello,

       

      Is there a way to initiate buffering without being connected to a server with the PI SDK.

       

      I know the interfaces have a kind of cache and they can do that, by maybe not the SDK.

       

      This is for a mobile application.

       

       

       

      Thanks!

       

      Francois

        • Re: PI SDK Buffering without live connection
          Ahmad Fattahi

          PI Interfaces use either PI Buffer Subsystem (recommended) or the older PI Buffer Server (older - API-based). Both buffer data on disk regardless of the situation of the destination PI Server. PI Buffer Subsystem is capable of sending data to multiple PI Servers in an HA architecture. PI Buffer Subsystem is available only on Windows OS while PI Buffer Server spans Unix, Linux, and Windows.

           

          Does this answer your question? You can also download "PI Buffering User Guide" from Tech Support website for a more detailed explanation.

            • Re: PI SDK Buffering without live connection
              hanyong

              Hi Francois,

               

              I guess you are referring to the Disconnected Start-up feature in PI Interfaces. The feature basically lets the interface keep a cache of point configuration locally. And if the interface is started when the PI Server is not reachable, the interface will start running using the point configuration in the local cache.

               

              You can start a buffer locally without connection to the PI Server. In fact this is required to support the disconnected start-up feature, since data should be buffered while the PI Server is still down or unreachable. Using PI Buffer Subsystem (since you are looking at buffering for PI SDK application), it does contact the PI Server to get the point configuration for data that is going through the buffer. When the PI Server is unreachable, it keeps the points that is not resolved in a seperate snapshot table.

               

              What is your intended architecture for your application? Just trying to understand your considerations in relation to this query.

                • Re: PI SDK Buffering without live connection
                  francois_ruel

                  Han,

                   

                  We are using PI-SDK Buffering in .NET application.

                   

                  Buffering is needed because we are sending thousands of records per seconds from the .NET application to a remote server.  In a near future, we will build a collective.

                   

                  The problem is more in the fact that the collector is a mobile PC that can boot up and start collecting data without having access to the server/collective.

                   

                  Thanks!

                   

                  Francois

                    • Re: PI SDK Buffering without live connection

                      The PISDK uses PIPoint.Data.UpdateValue to write data.  A PIPoint object can only be obtained from an open Server object or a persist string.  A persist string must be created from an initial connection to the Server before disconnection. I have not tried to restore a persist string without a connection, but suspect it will not work.

                       

                      Likely, an architecture that works now is to queue the data in your program until a connection can be made and the data sent.

                        • Re: PI SDK Buffering without live connection

                          Charles, doesn't the latest PI API support disconnected start up (point & digital state cache files) - any plans to include that functionality in PI SDK, or AF SDK?

                           

                          Francois (apologies my keyboard doesn't have that weird looking 'c' in your name ), your architecture sounds similar to that of PI Manual Logger where PI ML stores data locally on the mobile device in SQL Server CE.  Then when a connection can be made data is read from SQL and pushed via PI SDK.  Obviously you can use SDK buffering for fanning to the collective.

                           

                          If you have thousands of events per second per tag you might get better performance from AF SDK 2.5 that supports UpdateValues on a list of PI Points - i.e. less network trips.