What is SignalR and what is it used for
SignalR is a .net software componenent used for Realtime communication. By realtime we mean that communication done point to point at the time of need.
How is realtime communication used in MDriven
We use the newly added realtime functionality in several ways.
- You can tag an attribute with "Realtime=true" , and systems that use WebApi communcations with an MDrivenServer will have the Attribute invalidated in a very short time after it was committed to the database. This functionality enables you to discover changes and react to them faster with less resource consumption than what you could before.
- WPF Wecpof applications did not have the auto polling as Turnkey used - instead a refresh poll was done on ViewOpen. This has now changed and WPF-Wecpof also has the auto refresh. To avoid needing to do the refresh when nothing has changed - we have an AllIsWell-event sent from the MDrivenServer that also gives information on the sync-version-id - that the client can use to decide if a poll is needed or not.
Signaling for Realtime
Updates 2021 Feb
SignalR actually comes in 2 versions; one called SignalR and one SignalRCore. The 2 versions are not message compatible. The 2 versions can act as a client in both .net core and .net Framework(>4.6.1).
As we have the MDrivenServer- core version - and the built in in WPF Prototyper in MDrivenDesigner(.net Framework) - we have now added the capability to connect to a MDrivenServer-Core version from the MDrivenDesigner.
If you have Framework based clients you can also do so by adding the nuget package Microsoft.AspNetCore.SignalR.Client.
A framework based client that make use of the RealtimeStateSubscriberService will first try and connect to MDrivenServer Framework version with SignalR - if it fails it will then try and connect with SignalRCore.
Verify SignalR can connect (.net Framework)
If you are behind a reverse proxy and you have trouble to get SignalR to connect - then just try these calls in browser and make sure they are not blocked: