Communication between MDrivenServers
No edit summary
No edit summary
Line 11: Line 11:
In MDrivenServer we use SignalR to enable internet signaling and event sending to subscribers  
In MDrivenServer we use SignalR to enable internet signaling and event sending to subscribers  


realtimesubscribetoevent
==== realtimesubscribetoevent ====
Create an action column on a serverside ViewModel named realtimesubscribetoevent. You will need these columns
 
realtimehub = the url to the system to subscribe to - leave blank for THIS system
 
eventguid = a unique id that makes the this event connection unique 
 
eventcookie = what you want the server to send back on event - suggested value Viewmodel=SomeVM&RootId=externalid


realtimetriggerevent
realtimetriggerevent

Revision as of 16:53, 15 November 2020

If you build a whole (micro) service universe you will soon notice a need for events triggered from one system sent to another.

This can - and is - often handled as Rest-api's on two systems that call each other. While this strategy may get the job done you have an issue with the two systems must know about each other - and this quickly turns into a spaghetti tangled web of services that cannot really change without breaking something.

A much better approach is to have the more generic of the two systems expose a generic callback - an event.

Such events are best implemented by an open socket that can be used by the generic system to signal events even if it knows nothing about the listener - that in turn may cause action in the caller.

In .net SignalR is implementing this infrastructure.

In MDrivenServer we use SignalR to enable internet signaling and event sending to subscribers

realtimesubscribetoevent

Create an action column on a serverside ViewModel named realtimesubscribetoevent. You will need these columns

realtimehub = the url to the system to subscribe to - leave blank for THIS system

eventguid = a unique id that makes the this event connection unique

eventcookie = what you want the server to send back on event - suggested value Viewmodel=SomeVM&RootId=externalid

realtimetriggerevent

This page was edited 53 days ago on 03/26/2024. What links here