views:

209

answers:

3

I have heard talk about the NServiceBus, but I haven't really understood what it is. They claim to be "The most popular open-source service bus for .net".

So; what is a "service bus", and when do I need one?

+1  A: 

Check out the Wikipedia article for Enterprise Service Bus.

A Service Bus acts as yet another layer of abstraction in the never ending quest to implement a good Service Oriented Architecture. The Service Bus can handle some of the heavy lifting seen behind a good Service Oriented Architecture like Messaging, Routing, and Service Co-Ordination.

If you're not sure why you'd want anything like that, I'd suggest reading up on what makes a good Service Oriented Architecture. The book that really opened my eyes and proved the different between just having Web Services and having a true Service Oriented Architecture was Thomas Erl's Service-Oriented Architecture: Concepts, Technology, and Design

Justin Niessner
So I can use it to do the communication between a desktop client application and a server? Where the server is inhouse, that is.
stiank81
You could. You could also use it for communication between different services, different versions of different services, etc. (including situations where the services use different protocols).
Justin Niessner
+1  A: 

This term was introduced with SOA which is in a way the successor (as buzz word) of EAI.

When you need it? That's a good question. It comes with a lot of complexity.

A rule of thumb could by if it solves more problems than it causes.

To be serious if you have an heterogenous environment and want align (differnt) applications (using different technology) with business processes. Then it could be helpful to use BPEL (but this introduces problems by migraton) for orchestration and choreography

EDIT: What's not on wikipedia, is practice: An ESB can i.g. adapt using special connectors, old terminal applications for use with Corba or Java Enterprise thats meant by interoperability. The drawback is the over 100 'Standards' around SOAP wich don't cooperate without enormous effort.

You definitly need it if you have to interconnect IT systems within six month after a merger of 2 big assurance companies.

stacker
So - in my desktop application which has a "simple" communication with a server side there is no need to go large with a Service Bus? Can it help me implement a push model from the server? Or will it be more pain than gain in this scenario too?
stiank81
@stiank81 sorry I read (Enterprise) service bus and synapses fired. I checked your link to NServiceBus they target the same, you don't need something like that in a client server app. It's meant by concept for multiple applications involved in one business process. If it would work for you? If it solves more problems than it causes.
stacker
Thx. No, doesn't sound like something I'd like for my current app..
stiank81
+3  A: 

You can think of a service bus as the Ethernet of SOA.

First and foremost, it introduces a language of identifying things, like an IP address in Ethernet. This name isn't something inherently physical.

Next, you have something physical involved on each node, like a queue in the case of a bus for supporting semi-connected communication, or an Ethernet card in the metaphor.

Beyond just the physical, there is the "protocol" part of the communication, like the OSI stack for Ethernet. With the bus, this is the client libraries used by application code.

Ultimately, you can view a service bus as providing the next higher level of abstraction for building distributed systems. You can use it also for client-server communication to give you durable one-way messaging as well as for the server to push notifications back to the client.

Specifically, you'll find NServiceBus to be quite lightweight and easy to use once you make peace with its use of MSMQ (which you can swap out with any other queuing technology).

Udi Dahan
Thx! Think I got the big picture now! Was actually asking this question to be a bit prepared for the session you're holding tonight, but it doesn't look like I'll make it..
stiank81