5 Replies Latest reply on Mar 22, 2016 12:45 PM by jmatranga

    NodeJS as a client for PI WebServices?

    pmackow
      Hi all,

      I'm considering use of NodeJS to publish some web service, which should deliver data from PI, but not only.
      This NodeJS-based service should in turn read data from PI for publishing.
      There is full PSA available on PI Server, so we can use any access method.

      Does anybody have experience with accessing PI data via PI WebServices from server-side JavaScript NodeJS?
      In short - NodeJS as a client for PI WebServices.

      Any examples will be appreciated.
          • Re: NodeJS as a client for PI WebServices?
            mhamel

            @Pawel: I haven't work with NodeJS. I know it should work with PI Web Services without any problems. You will have to pay a special attention to WCF binding and security.

             

            From what I can see, it is fairly easy to build your soap message with node.js when using basic binding but it might be a bit more complicated if you have to use it with WS-* security. I have seen over my searches that someone implemented a ws.js wrapper on top of the node.js. He made also a wcf.js.

             

            Although, I think this represents a lot of effort, may I ask what is the use case you’re trying to cover here? Why aren't you just publish PI Web Services directly on your Web Server?

              • Re: NodeJS as a client for PI WebServices?
                pmackow

                @Mathieu

                 

                The goal is not web service, but some visualisation + data presentation. The customer wants something different that CoreSight or, say, PI Web Parts have to offer.

                 

                PI access will be small part of expected functionality, just delivering data for few graphs, so the idea was to access PI Server from NodeJS computer via PI Web Services.

                  • Re: NodeJS as a client for PI WebServices?
                    dnoonen

                    Hello All.

                     

                    I thought I'd take this opportunity to chime in and let you know that we are in the process of building a RESTful interface on top of the PI System and I have a hunch that a set of those REST APIs would be ideal for this node.js scenario.   FYI - We'll be previewing the RESTful interface at this year's vCampusLive via a hands-on session (or two!!).  

                     

                    @Pawel - It would be great if you could get back with me to discuss the data access details related to this scenario.   What types of calls do you expect to make, do the current PI Web Services (SOAP based) give you all the access you need, etc?   You can send me an email at dnoonen@osisoft.com if you'd like.

                     

                    Dan Noonen | Product Manager