7 Replies Latest reply on Jun 23, 2016 12:35 PM by pthivierge

    Doubts regarding WebAPI channel based approach to retreive live PI tag data

    Paurav Joshi

      Hello Folks,

       

      I read the document help file regarding channel (/piwebapi/help/topics/channels), and I have some doubts after that:

      We have 396 assets, and we want to retrieve 50 tags per asset - resulting in 19800 subscriptions.

      1. Is there any upper limit on # of subscriptions on PI WebAPI server?
      2. Will these # of subscriptions impact PI WebAPI server on either memory or CPU utilization way?
      3. If we implement channel on streamset basis, then will there be any impact as the parent webId has good # of child webIds' to fetch data for?

       

      Thanks,

      Paurav Joshi

        • Re: Doubts regarding WebAPI channel based approach to retreive live PI tag data
          Paurav Joshi

          Do guys have any idea regarding these questions?

          • Re: Doubts regarding WebAPI channel based approach to retreive live PI tag data
            pthivierge

            Hello Paurav,

             

            I am not certain I got it well but here is my answer to this question:

             

            To me, if each browser would make all those signups this does not make much sense.  This is way too much communication for each client and that will be hard to scale up as the number of clients connected to the site increases.

             

            What I would see for such scenario is something like this:

            • You have a "central" windows service that maintains (either in memory or in a database), the states and values of each assets. (e.g. good/ no good and current value ).
              • The role of this service is to maintain the data in a state that it can be assembled in bulk and sent all at once to the clients who are requesting the data.
            • You develop a dedicated web api to use with javascript or create ASP.Net server pages, that  would serve the data in one network call for a specific page. ( asp.net Web API is quite good ).  You will probably need a subset of pages or API calls to cover your needs e.g: summary , asset(s) specific with more details ( when drilling down). 
            • Depending on the amount of data resulting in the single call that clients will perform the two step above may suffice.  However, if you end up with more clients and datasets that are too big you may need to go further and develop your own real time update mechanism for the clients; or maybe you could then use the PI Web API to update the most important values real time on your pages. 

             

            Bottom line, you should try to limit the amount of network calls required to 1 or 2, per client.  Otherwise this will be very difficult to make it working and also to maintain.

             

            Hope this makes sense and helps a little this discussion,