Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServiceStack vs NServiceBus [closed]

I just began looking into ServiceStack and WOW, I might as well throw WCF out the window, but it can also send out messages using Redis.

I'm familiar with NServiceBus and it's also used for sending messages and having pub/subs. Since ServiceStack is a web service, you can open it up for external clients; I don't think NServiceBus can do that.

Other than that, what are the pros/cons of choosing one of these technologies over the other? What are some scenarios where one technology might be preferred.

like image 261
CSharper Avatar asked Dec 30 '14 23:12

CSharper


1 Answers

Having no knowledge of how ServiceStack does pub/sub with Redis beyond what is in the docs, it appears that it is just providing a fairly thin wrapper around the Redis pub/sub API.

NServiceBus (of which I am the original author) has a deeper architectural philosophy around pub/sub, including requiring the declaration of proper message contracts, clearly delineating commands from events, not allowing the publishing of commands, stronger recommendations on deployment topology where each logical endpoint is mapped appropriately to physical hosts when scaling out, and more.

If I had to sum it up, it appears that the pub/sub in ServiceStack is more of a library whereas NServiceBus is more of a framework. Once you include the rest of the tooling that @sean-farmer mentioned in his comment, then the divide grows even larger. Of course, this being my inherently biased opinion based on minimal understanding of what's available in ServiceStack and would love to hear comments from its author.

I'd also suggest looking at this Stackoverflow answer about NServiceBus vs MassTransit.

One last comment, NServiceBus supports multiple transports like RabbitMQ, Azure Service Bus, and even SQL Tables - not just MSMQ. There do appear to be some community-level activities on a Redis transport for NServiceBus as well: https://github.com/mackie1001/NServicebus.Redis

like image 134
Udi Dahan Avatar answered Oct 01 '22 17:10

Udi Dahan