2 Replies Latest reply on Jun 28, 2010 8:12 AM by MichaelvdV@Atos

    Can PI Web Services support asynchronous callbacks?

    cleroux

      Hello vCampus,

       

      I see that the PI Web Services have 4 services exposed as for now:

       

        GetPIArchiveData
        GetPISummaryData
        GetProductVersion
        InsertPIData

       

      Can these services be called asyncrhonously in a web page? I mean when I want to refresh my timeseries data on the screen (calling GetPIArchiveData for instance), do I have to manually refresh the web page to get the latest data? Ideally I would like the web services to behave like PI WebParts and update automatically on the web page without any user intervention.

       

      Thanks in advance,

       

      Christian

        • Re: Can PI Web Services support asynchronous callbacks?

          All the methods in PI Web Services are asynchronous. Whether or not you see them and call them asynchronously depends on the tool and the technology you are developing with. For now, updates (i.e. sign up for updates, event pipe, etc.) are not supported in PI Web Services, so you will have to make a data call every time you need data.

           

          As you probably already know, PI Web Services is nothing more than, well, web services - this means you simply make a call and get data back. This also implies no UI on the PI Web Services end. Once you have the data, it is up to you to do whatever you'd like with it, whether it's displaying in a table fashion, in a trend, performing calculations, etc.  Say you want to display the data on a trend on a web page, it is up to you to develop a trend control (or take an existing one) and populate it with the data. Having it refresh without having the user refresh the page is, again, up to you and the technologies you use.

           

          I know some people on this community have extensive experience with Silverlight and I believe they may have developed (or worked with) a trend control... do any of you guys have anything to say to Christian, with regards to trending in Silverlight?

          • Re: Can PI Web Services support asynchronous callbacks?
            MichaelvdV@Atos

            Depending on how you implement your client side 'proxy', you can call the services async. If you use PI Webservices with Silverlight, you will be forced to do it async (silverlight does all external communication async).

             

            I'm wondering if you have the right idea about what PI Webservices really is. It is a form of data access trough http/xml using defined methods. There is no comparison to PI Webparts here.

             

            If you would like to create, for instance, trends and gauges based on data from PI Webservices, you can easily create (program) Silverlight usercontrols that do this. You can easily have them automatically update (at intervals) etc. You can make them very customizable. But, you have to code them yourself. This is not part of PI Webservices.

             

            If you are interested in this, let us know, and we will help you/point you in the right direction.