4 Replies Latest reply on Jun 4, 2018 3:07 PM by jmoretti

    AF SDK vs PI Web API for specific application




      I am writing a manual-entry application that will need allow inputs from the users on tank measurements, read existing tank measurement data from corresponding tank elements and tank strapping tables from AF, perform some calculations, and write the inputs and results of the calculations to PI Points (through the AF elements/attributes).  There will also be Event Frame creation to represent material transfers between the tanks.  I am familiar and comfortable with both PI Web API and PI AF SDK and have browsed PI Square on comparisons between using the two technologies.  Some of my requirements favor PI Web API, others favor AF SDK, and was hoping to get advice from the pros on which is more appropriate for my specific application.  Here are my requirements and architecture...


      1. I have chosen to write the application as an ASP.NET MVC application.  It will run on IIS on a server that is currently hosting PI Vision.  It seems PI Web API and AF SDK are prerequisites for Vision so both are installed on the same server.

      2. The users will typically use a web browser on a Windows PC on the same network as the PI system to enter this data, however, they do want the capability to access this web page on a mobile device that is OS-agnostic.

      3. Not very many users will be allowed to use this application so I am OK with authorizing at the application layer.

      4. The calculations in question don't involve much PI data.  For example, they need to input the current level of the tank, and I need to use predetermined tank strapping data (which will reside in a linked AF table) to calculate the volume, difference in volume from the last entry and current entry, and other similar calculations.

      5. Calculations will be done in the application as opposed to PI Analysis Service since I need to have control over the historized timestamp of the calculations.


      Thanks in advance!

        • Re: AF SDK vs PI Web API for specific application

          You have an interesting set of requirements here and, from what I understand, PI Web API is more suitable for you. The (only) reason for this is because it will allow you to write a rich client-side web application based on [insert your favorite technology here like angular or pure html5] that runs detached from your web server. This will also make easier for you to handle data flow, as the mobile device will be responsible for fetching and sending data directly to the PI Web API.


          So, with this architecture in mind, let's check it against your original requirements:

          1) It can be hosted on IIS and served to the client as a stand-alone app.

          2) It's OS agnostic.

          3) You can do authorization as you want.

          4) A client-side js can easily handle this math.

          5) You will get the right timestamp.


          What do you think about this idea?

          2 of 2 people found this helpful
            • Re: AF SDK vs PI Web API for specific application

              Thank you for your insight Rafael!

                • Re: AF SDK vs PI Web API for specific application

                  Hello Jonathan,


                  I don't like to play the spoilsport but believe we also should suggest existing products from OSIsoft's portfolio like PI Manual Logger Web as an option for a Web application allowing manual data entry. Asset Analytics may allow you to perform the required calculations and to create Event Frames. With the current AF version you also have a few options to control the timestamp of calculation results. Before starting off a voluminous development project, as you drafted it, I would be looking for the low hanging fruits. 

                    • Re: AF SDK vs PI Web API for specific application

                      Hi Gregor,


                      Appreciate the comment.  We've evaluate Manual Logger and Manual Logger Web many times; both during this project and previous projects.  In short, the combination of PIML and PI Analysis Service does not completely do what we need it to do.  We've spoken with product managers some time ago and it sounds like PIML will be integrated into PI Vision in the future and the capability we need may be incorporated into the PI 2018 release, but our client needs the capabilities now.