24 Replies Latest reply on Feb 14, 2018 7:32 PM by acote

    Any plans for AF SDK on .Net Core?

    Rhys Kirk

      As per title...any plans?

      Most stuff I'm developing on at the moment is .Net Core. Rather than use the PI Web API (until it is open source there are usually too many missing small methods) I would like to use the AF SDK directly.

        • Re: Any plans for AF SDK on .Net Core?
          Marcos Vainer Loeff

          Hi Rhys,

           

          I have tried to add PI AF SDK on a CTP version of Visual Studio successfully. Actually, I have written a blog post about that:

           

          Testing the ASP.NET vNext with PI AF SDK

           

          By looking at your question, I supposed you are not able to use PI AF SDK with .Net Code, right? If you try to add the reference and run, do you receive an error? Can you comment on that?

           

          I will talk to the AF developers. Does your question apply for Windows only or also for Mac and Linux?

          • Re: Any plans for AF SDK on .Net Core?
            ernstamort

            There will be increasing demand for that ....

            1 of 1 people found this helpful
            • Re: Any plans for AF SDK on .Net Core?
              Rick Davin

              Talk about the bleeding edge.  You are a true pioneer, Rhys.  Then again its easy to spot a pioneer ... they're the ones with arrows in their backs.

               

              From Microsoft's own site dated April 2016:

               

              Venn diagram of DotNet and Core.png

              Heck the opening paragraph begins: At Microsoft, we’re building a new implementation of .NET, called .NET Core, to let you write cross-platform code for cloud-optimized workloads.  Considering that much AF SDK was written with .NET Framework long before the thought of cloud-optimized workloads came around, it would not be an easy transition.

               

              For other readers unaware of .NET Core, see this Microsoft link explaining it.

               

              Even perusing the .NET Core Roadmap, it bothers me to see phrases "bring .NET Core to parity with .NET Framework" and even then that's for a future release!  I would rather not have OSIsoft rewrite much of their code to work with .NET Core.  It would be better to have .NET Core mature to the point where has full parity of .NET Framework.

               

              Just my personal opinion.

              Rick

              1 of 1 people found this helpful
                • Re: Any plans for AF SDK on .Net Core?
                  Rhys Kirk

                  I've written a Web API on Core, an Angular 2 app wrapped up in ASP.Net Core (TypeScript is awesome!), and even started contributing to open source projects to move some 3rd party client libraries onto .Net Core.

                   

                  Yes it is immature and only has a portion of APIs exposed, but then again it feels cleaner and less bloated so far. I haven't had too many issues with .Net Core, some missing bits from things like Entity Framework Core vs Entity Framework, and some common nuget packages are lagging their support for .Net Core, but on the whole I haven't had any major stumbling blocks.

                   

                  Thing with the AF SDK is you can't ignore the growing move to open source software and to lightweight API implementations, oh and the fact that lots of companies are ditching Windows for Linux and others. I know a massive eCommerce company in the UK that is throwing out their entire Windows estate for a Docker / Linux estate and all the good open source goodies that you can use there. Yes, Windows Server 2016 has "Containers" shamelessly stolen from Docker.

                   

                  OSIsoft will end up going down the same route as the mystical "cloud PI system"...dragging their feet and end up too late to the party.  Qi has .Net Core libraries, just not released, so the adoption of Core is not totally lost in OSIsoft.

                   

                  I remember badgering Steve Kwan and the guys ages ago to have a lightweight AF Server, which could have a lightweight AF SDK...ditch the Versioning of Elements, ditch the sandbox, just have ultra-fast hierarchical data access with extremely low latency calculations. Still waiting for that.

                  6 of 6 people found this helpful
                    • Re: Any plans for AF SDK on .Net Core?
                      skwan

                      If we gave you everything all at once, there wouldn't be any more Christmas, would there? 

                      --

                      Steve Kwan

                      • Re: Any plans for AF SDK on .Net Core?
                        pthivierge

                        You are raising very good points here Rhys, I have tried Docker myself converting an ASP.NET application to .NET Core. (So I can run it on a linux host because it was cheaper, and also because the web-hosting company I was user was throwing away ASP.NET hosting.) And this was a very positive experience for me, I really told myself "this thing is a revolution", the next one after virtualization.

                         

                        I may still be a bit early but future will tell us quickly as it is really solving integration issue as developers can just deliver their container and their is near 0 configuration for the DevOps / IT that will need to deploy the machine. I would be curious to hear about that from Chris Manhard if we have any plans or if we have had any thoughts with planning functionning using both:

                        • .NET Core
                        • Containers Technologies like Docker, Windows Server 2016 already has it built-in.

                         

                        I am sure this is a good discussion to have

                         

                        Thanks for bringing this up Rhys!

                    • Re: Any plans for AF SDK on .Net Core?
                      Lonnie Bowling

                      I have to second Rhys comments. It would be good to see something come out sooner not later for .Net Core. Why not just do a quick conversion of key AF features that everyone uses (80/20 rule) and release it as a beta, it would be even better if that could be open sourced so we would could fill in missing parts and do bug fixes if we wanted to use it on a project. Look how Angular 2 was rolled out, by the time it was finished, I had already used it on a project and I know others that have done the same thing.

                       

                      Docker is something that I'm super interested in and having .Net Core support for the SDK would really be sweet!

                       

                      Lonnie

                      • Re: Any plans for AF SDK on .Net Core?
                        Ahmad Fattahi

                        Let me try hijacking the thread a bit! If we extract out the specific good features of .NET Core out of this conversation how enthusiastic are you guys about open source in our community? I can see a few mentions of this either explicitly or hidden within the merits of Core. If we take one step back and look at the OSIsoft technologies you work with, would you be interested in seeing some pieces open sourced? Why? Do you think we will have enough mass to expect meaningful contributions?

                         

                        Admittedly reading that Rhys is contributing to .NET Core made me jealous!

                        • Re: Any plans for AF SDK on .Net Core?
                          cmanhard

                          As Steve mentioned, the AF SDK team has been looking at how and when they can utilize and/or expose NET Core.  There are a number of significant technical roadblocks that make this something that will not occur in the short term.   For example, components of the stack are implemented in managed C++, which is not available on Core - now or ever.  The AF SDK also uses a local windows services to communicate to the PI Data Archive, and the KST is pulled out of the Windows Registry.  For communicating to the AF Server, the AF SDK uses binary TCP WCF, which is also not available or planned for .NET Core.  So, there are some hurdles.

                           

                          For those wanting to utilize .NET Core in the near term, the quickest course of action is to use the PI Web API.  When there are missing items, please let us know. 

                          6 of 6 people found this helpful
                            • Re: Any plans for AF SDK on .Net Core?
                              Rhys Kirk

                              Chris Manhard wrote:

                               

                              As Steve mentioned, the AF SDK team has been looking at how and when they can utilize and/or expose NET Core. There are a number of significant technical roadblocks that make this something that will not occur in the short term. For example, components of the stack are implemented in managed C++, which is not available on Core - now or ever. The AF SDK also uses a local windows services to communicate to the PI Data Archive, and the KST is pulled out of the Windows Registry. For communicating to the AF Server, the AF SDK uses binary TCP WCF, which is also not available or planned for .NET Core. So, there are some hurdles.

                               

                              For those wanting to utilize .NET Core in the near term, the quickest course of action is to use the PI Web API. When there are missing items, please let us know.

                              You guys at OSIsoft should be working with MS to push for WCF support on Core. It is heavily talked about. Here is a survey for WCF on .Net Core: .NET Core - WCF Support Survey

                               

                              What about an AF SDK style wrapper for the PI Web API built on Core?

                              Most cloud based services have a rest interface but more commonly applications are using REST wrappers. Qi has a REST interface with a Client Wrapper for a number of development platforms.

                              2 of 2 people found this helpful
                                • Re: Any plans for AF SDK on .Net Core?
                                  cmanhard

                                  RE: You guys should be pushing: We have.  We also have potential work-arounds - just takes a bit of time and introduces some backward compatibility issues.

                                  RE: What about an AF SDK style wrapper?  We would like to provide this as well.  What type of interface are you interested in: C#, Java Script, Angular2/TypeScript?

                                    • Re: Any plans for AF SDK on .Net Core?
                                      Rhys Kirk

                                      At the moment I would want a C# and TypeScript interfaces.

                                      Please, please open source the wrapper project.

                                       

                                      Back to what Ahmad Fattahi mentioned earlier in the thread...yes, it would be great to start to see some open source projects that we can contribute to. We are less likely to have conflicting priorities and can build what we need when we need it.

                                      2 of 2 people found this helpful
                                      • Re: Any plans for AF SDK on .Net Core?
                                        acote

                                        Bringing this old thread forward...

                                         

                                        We have implemented a massive .Net Core application (Front-End: Angular/Material/Flexbox/Typescript, Identification: IdentityServer4, Back-End: C# ASP.Net Core RESTful WebApi with SignalR) for our in-browser MES (MS-SQL, Reddis)... and we have few usages of PI Web API to gather simple AF/EF attributes values (understanding we have a full C# Windows service stack to transport PLC values to our MES) but the next steps involves much more complex operations regarding the PI System that only AFSDK would be powerful/flexible enough for our needs... Of course we've build our own AFSDK Web API but I'd definitely like to embed it in the .Net Core project...

                                         

                                        Has OSIsoft pushed on revamping the AFSDK with the .Net Core architecture?

                                         

                                        P.S.: While asking the impossible, would you mind migrating PI Vision to the above architecture with SignalR?

                                         

                                        Thanks

                                      • Re: Any plans for AF SDK on .Net Core?
                                        pthivierge

                                        Rhys,

                                        David Price has started a project on GitHub that is called LazyPI, it is a C# client for PI Web API. 

                                        GitHub - dprice809/LazyPI: A C# client side library for interfacing with the OSIsoft PI WebAPI

                                         

                                        That may be worth to look at.

                                        1 of 1 people found this helpful
                                    • Re: Any plans for AF SDK on .Net Core?
                                      jweir

                                      I would like a .Net Core library.

                                       

                                      We have a Linux client using an old, deprecated, version of the PI API.  I know it is only a matter of time before it no longer functions.

                                       

                                      Staying on Linux would be ideal and keep our costs low – we have no Windows installs, adding it into our stack would increase the complexity and the cost of maintenance.  The WebAPI is not an option.  Our client reads from various customer PI servers.  Not one is using the WebAPI, nor will they all implement it.

                                      • Re: Any plans for AF SDK on .Net Core?
                                        mdsterman

                                        I need to reference the PI Batch Module Db from a visual studio ASP.NET Core Web Application (.NET Framework).  I get an error when I try to reference the pisdk.dll directly that says I need a nuget package.  Is there any way to create a nuget package for the pisdk.dll?