Skip to content

2021 Refactor: from GraphQL WebServer to Marconi Messaging over the Web

Gregor Vilkner edited this page Nov 19, 2021 · 7 revisions

Starting Point

A working prototype web server that can resolve requests against the PI/AF .NET sdk.

Pro:

  • makes batch queries intuitive and interactive

Con:

  • limited functionality, i.e. only what is implemented - but a good way to judge what's actually used and needed
  • localhost only - you have to get this implemented by proper IT folks to get security, firewalls, portforwarding, dns mapping in place

Goal

To make this work with a local "listening" client, that can resolve requests from a messaging system in Azure

Step 1: Extract Schema into Stand-Alone .NET Standard Class Library (done)

This means we can expose the schema on the web, and resolve it locally.

Step 2: Migrate PI/AF .NET sdk code to Resolver Class Library using .NET Framework (done)

We need old school full-blown .NET framework, because OSIsoft has not compiled their sdk's for .NET Core yet. Big problem...

Also, migrating from GraphQL v2 to v4 has a number of breaking changes.

Step 3: Test Resolver (done)

The resolver test is a simple console app that lets us test queries. Works well.

Step 4: Build Web App and Web API to Manage Service Bus and Queue Management (done)

This is done outside the context of this project.

The marconi infrastructure is in place and can be consumed at:

https://thinkiqpisystemrelay.azurewebsites.net/ (that's the graphql server)

https://thinkiqmarconirelay.azurewebsites.net/ (that's the secured web api that manages queues)

Step 5: Build Client App to Use Resolver and Answer Requests from Service Bus (done)

We use a simple wpf app to do this. The solution contains a reference project from the azure team.