Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Pub/Sub or SignalR functionality on .NET 3.5?

Using SignalR, it is pretty easy to synchronise, distinct client PC browsers in realtime with inbuilt PUB/SUB mechanism. However SignalR can only be used with .NET 4.0 or above. We are trying to achieve similar functionality in .NET 3.5, since we can't upgrade our application at this point of time.

Considering the fact that SignalR leverages following recent technologies -

  1. Task Parallel Library in dot net 4.0
  2. WebSockets in HTML5
  3. Asynchronous postbacks using AJAX

For asynchronous calls we're planning to use classical BeginAsync and callback approach, & ThreadPool for creting multiple threads. Still learning how to use HTML 5 WebSocket.

We're evaluating other alternatives as well like using jQuery AJAX & writing custom IIS Hander which could take async updates from Client 1 & push this to Client 2 and so on.

If you have done something similar in past, Can you please suggest which approach would be correct to proceed with ?

Thank you for your time.

like image 718
Abhijeet Avatar asked Sep 29 '12 08:09

Abhijeet


People also ask

Is SignalR pub sub?

Scalable pub/sub systems are notoriously difficult to implement. SignalR, a new technology from Microsoft that makes long polling practical and scalable, is the solution you've been waiting for to address the implementation headaches of pub/sub systems.

What is the alternative of SignalR?

There are many alternatives for signalR that are used, like Firebase, pusher, webRTC, RabbitMQ, gRPC, and MQTT.

Can SignalR be used in Web API?

SignalR can be used together with Web API just fine, so some functionality in application which is not realtime and doesn't require persistent connection could be served by Web API.


1 Answers

I backported the v1.x and v2.x SignalR clients to NET35. They are available as NuGet packages here: http://www.nuget.org/packages/Nivot.SignalR.Client.Net35/

like image 157
x0n Avatar answered Oct 21 '22 23:10

x0n