RabbitMQ vs Web API + SignalR
Asked Answered
T

1

9

I'm currently using RabbitMQ via EasyNetQ to communicate between a Windows service and numerous clients. The communications are a mix of requests from the clients and push notifications to all of the clients. I'm very happy with the performance, scalability, and security of the current solution, but I want to ensure I'm not missing out on something in the latest technologies. What advantages, if any, does Web API + SignalR have for this scenario?

From what I can tell at this point, SignalR has the potential to be much more performant when web sockets are available, but is slightly more complex from the start and will become significantly more complex if we need to scale out because of the need for a backplane.

Any other insights anyone could share?

Tentative answered 30/5, 2017 at 20:44 Comment(5)
not 100% sure what your question is, but I use RabbitMQ+EasyNetQ as a backplane replacement for SignalR (no need for a separate backplane then), and it works fine!Mackoff
Thanks Wiebe. I'm probably missing the obvious, but can you help me understand why you're using SignalR at all? Why not just use RabbitMQ and it's clients for the communications? I'm not dismissing SignalR, but I just haven't been able to find the right info to compare and contrast the technologies yet.Tentative
To be honest, I haven't tried connecting (different) clients/browsers directly to RabbitMQ (for security reasons). Are you using STOMP now? But for me having Web API and SignalR in between means full control, able to add abstractions and custom security on top of RMQ. This question is a bit too broad for SO, please feel free to continue this discussion in the EasyNetQ group groups.google.com/forum/#!topic/easynetq/Mackoff
The security aspect makes sense. I'm working through a Web API/SignalR prototype now, but will likely take you up on your offer for further discussion after I've educated myself a bit more. Thanks again.Tentative
As far as I understand it, the biggest advantage of SignalR is that it enables you to call JavaScript functions directly from .NET server side code. RabbitMQ is really good at server to server messaging, but there isn't really a good way for it to directly affect a change in client code, i.e. a Web page for example. For that you would need some type of push server notification solution, such as SignalR. What I do in my application is I use a combination of RabbitMQ and SignalR. I use each one for what it does best, i.e. RabbitMQ for server to server and SignalR for server to client messaging.Indigo
M
7

It's apples vs. oranges.

As lukegf puts it in the question comments: SignalR is push server notification solution.

RabbitMQ is a message broker, and though there is edge cases in which it could directly interact with your web clients, it is mostly suited for server to server communication.

Maltese answered 23/1, 2021 at 19:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.