SignalR support

  

Hi guys,

Sorry for trying to reboot an old question here, but has anyone got a SignalR implementation to work?

Cheers,

Patrice

Hi Patrice,

yes, I have integrated with SignalR before as well as other WebSocket implementations (NodeJS and Cloud based), what exactly do you want to know?

Regards,

Tito

Hi Tito,

Well I understand the technology behind websockets and SignalR. But how to actually implement it ? It seems to me that a dedicated SignalR server is needed to be able to scale up. So, how to set up this server, and how to set up Outsystems to work with it?

Cheers,

Patrice

Solution

Hi Patrice,

the best way to integrate OS with SignalR is to deploy SignalR into a different dedicated infrastructure since the scalability and availability requirements of the WebSocket infrastructure are completely different from the Web Front Ends.

To integrate SignalR in your OS application, you can create a Web API application that setups SignalR and also exposes a REST service (POST preferably) that receives a parameter list of "Message" objects. 

The REST service should be imported by your OS application. 

The REST service list of "Message" objects parameter should be forwarded to the SignalR subscribed clients by your Web API application, so use a very generic structure for the Message class (I recommend having a Data property that is a JSON.NET JObject to make it flexible).

In your Web API application REST Service, you should make use of the ConnectionManager.GetHubContext method to obtain an instance of the respective SignalR Hub and use it push the respective Message objects to the Browser clients. 

The Message object of the REST service should have a data property using a JSON.NET object and some client or group identifier that you can use to push messages to specific Browser clients and subscribed groups.

Two things you need to make sure is that the Websocket infrastructure reside in the same domain space (otherwise you have to setup CORS) and that you use Windows Server 2012 (no 2008!), but you should probably be aware of that.

More information can be found in this Webinar or this slideshare.

Good luck!

Tito

Solution

Patrice Oostermeyer

Have you looked at pusher? https://pusher.com/ 

(It's easier than running your own server and its also easy to integrate with outsystems platform)

Robert Chanphakeo wrote:

Patrice Oostermeyer

Have you looked at pusher? https://pusher.com/ 

(It's easier than running your own server and its also easy to integrate with outsystems platform)

Hi Robert,

yes I have, and I got it to work.
It is indeed relatively easy to set up.
But the thing that's bothering me is, that it makes me dependend on some 3rd party service.
When they go down, or connection is lost, my (enterprise) applications that rely on that service will stop working.
That is a risk I'm not yet willing to make. Lets say we we want to have this risk 'in house'.


tmoreira wrote:

Hi Patrice,

the best way to integrate OS with SignalR is to deploy SignalR into a different dedicated infrastructure since the scalability and availability requirements of the WebSocket infrastructure are completely different from the Web Front Ends.

To integrate SignalR in your OS application, you can create a Web API application that setups SignalR and also exposes a REST service (POST preferably) that receives a parameter list of "Message" objects. 

The REST service should be imported by your OS application. 

The REST service list of "Message" objects parameter should be forwarded to the SignalR subscribed clients by your Web API application, so use a very generic structure for the Message class (I recommend having a Data property that is a JSON.NET JObject to make it flexible).

In your Web API application REST Service, you should make use of the ConnectionManager.GetHubContext method to obtain an instance of the respective SignalR Hub and use it push the respective Message objects to the Browser clients. 

The Message object of the REST service should have a data property using a JSON.NET object and some client or group identifier that you can use to push messages to specific Browser clients and subscribed groups.

Two things you need to make sure is that the Websocket infrastructure reside in the same domain space (otherwise you have to setup CORS) and that you use Windows Server 2012 (no 2008!), but you should probably be aware of that.

More information can be found in this Webinar or this slideshare.

Good luck!

Tito

Tito , thanks a lot for the extensive info,

I will have look further into it, but this gives me a good start!

Cheers,

Patrice