5

ESBs (Enterprise Service buses) have become quite popular in the enterprise Java world - but are there any equivalents in the .NET arena?

rajax
  • 730
  • 1
  • 4
  • 13

3 Answers3

14

There's NServiceBus.

Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
  • 1
    Which in my opinion should be avoided at all costs. – MeTitus Mar 29 '13 at 15:27
  • 1
    @Marco OK. Would you care to elaborate why? – Mark Seemann Mar 29 '13 at 15:30
  • 2
    @Marco So, because it's not free, it should be avoided at *all costs*? – Mark Seemann Mar 29 '13 at 15:47
  • 1
    Not just that, because it also promotes people to use ESB semantics in the wrong way. Although NServiceBus calls itself a ESB framework, it does not correctly applies the Event SOA principles, sagas being just one example. Sagas should be used as an aggregation of commands, and publish events only, but NServiceBus implementations allows for a whole mix of sagas sending commands and publishing events. – MeTitus Mar 29 '13 at 15:53
  • 1
    On top of that NServiceBus does not provide anything which cannot be easily implemented using a stack of free libraries and all of that using standard WCF endpoints. – MeTitus Mar 29 '13 at 16:01
  • @Marco Thank you for supplying a more justified criticism. Actually, I originally asked because I was genuinely curious, and much of what you write seems reasonable. – Mark Seemann Mar 29 '13 at 18:03
  • I actually worked with NServiceBus before. I was coming from a company where we were using our own custom event based SOA, and I was shocked when I saw how the company I was just joining was using NServiceBus. They were coming from a RPC background and you can imagine the result. Apart from that they were "advised" to distributed the all system they were building, which end up in a whole mess. NServiceBus is a dangerous tool, if you don´t know what you´re doing, you can easily end up with a whole mess, that is a hell to maintain and debug. – MeTitus Mar 29 '13 at 18:16
  • NServiceBus reminds me of EJB, how good they were and the mess they got many companies in, only to be replaced with POJO objects. I am not against frameworks whatsoever, but this in particular is something I´m strongly against. – MeTitus Mar 29 '13 at 18:22
  • @Marco: Some of what you say is plain ridiculous. With a chainsaw you can seriously hurt yourself, up until death! That doesn't make it a bad tool! NServiceBus will never kill tou. – Dennis van der Stelt May 28 '13 at 18:51
  • Also, NserviceBus tries really hard to enforce some best practices upon users, but they can still shoot themselves in the foot. That as well doesn't make NserviceBus a bad tool. People also get so angry because of sagas in NserviceBus, but they CAN be used as sagas, but also as a lot of other things. – Dennis van der Stelt May 28 '13 at 18:53
  • And can you tell me how to easily do pub/sub with WCF? Reply to originator after a long running process has finished? Retries and 2nd lvl retries? Timeouts? Storage in memory, SQL and Document database (RavenDB)? Just to name a few? – Dennis van der Stelt May 28 '13 at 18:55
  • @DennisvanderStelt I never said it would kill you did I? And based on what you're saying I don't you know you're talking about really. I've worked with EJB since version 2 and I saw how many people drove away from them, even after the changes that Sun did in the version 3. So please go sell that to someone else. – MeTitus May 28 '13 at 19:09
  • @Timeout?! ever heard about quartz? Storage in memory?! memcached... retries... don't make me laugh please. – MeTitus May 28 '13 at 19:10
  • First thing one has to know about NServiceBus, is that it is not a classic ESB. It is a DISTRIBUTED bus of busses, first and foremost with distrubuted/balanced endpoints. As UDI once stated, you have to look at NServiceBus like an Ethernet. NServiceBus forces you to do things in a certain way. It is your design that determines the complexity of your solution - some basic understanding of "Truth as Fact", and developing with messaging in mind.. My subjective opinion is that it's a hundred times easier to do a simple pub/sub than trying to implement reliable and durable messaging in WCF! – Jack Andersen Oct 25 '13 at 00:29
  • "Sagas should be used as an aggregation of commands, and publish events only"... It is actually the oposite. Sagas subscribe to events and submit commands... wanted to change the original comment but it is too late. – MeTitus Apr 09 '14 at 11:51
6

Some more service buses in the .NET world:

MassTransit - https://github.com/masstransit/
Rhino Service Bus - http://hibernatingrhinos.com/open-source/rhino-service-bus

Henrik
  • 9,714
  • 5
  • 53
  • 87
rivethead_
  • 131
  • 1
  • 6
3

The first question you need to ask yourself is why do you need an ESB?

ESB is usually used in Event SOA distributed architectures, which seem to be a hot buzzword nowadays. Before you jump into ESB let me remind you of Martin's Fowler First Law of distributing Systems:

http://martinfowler.com/bliki/FirstLaw.html

"My First Law of Distributed Object Design: Don't distribute your objects (From P of EAA)"

When you're build a new system, the most important aspect is that it is future proof, that means easy scalability and maintainability. If you build your system around the concept of loosed services with static defined contracts, distributed in a networked environment, you can "hide" the architecture you want for that particular service, because the interfaces are still there.

ESB is close related to asyn messaging systems, so before you start jumping into that kind of implementation, know that an architecture does not have to be homogeneous, that is all services be implemented the same way, don´t start the biggest mistake which is distributing your system from the start. You should only distribute as you need to scale, not beforehand. What you need to make sure though, is that your services are able to be easily distributed should the need arise, without breaking any contracts which would mean, changes to clients of that service.

MeTitus
  • 3,390
  • 2
  • 25
  • 49