views:

140

answers:

1

What are the advantages of using an ESB instead of directly accessing a database (via Hibernate or JDBC). I know you can reuse the messages on the bus, but could you not just package up your database access code into a jar and distribute it to the different systems that need access (Assuming all the accessing systems support Java)?

+1  A: 

ESB adds a layer of abstraction to your service/database layer. You could distribute jars to all the applications that require service access, but what if the services change its contract or business logic needs to be updated. It would be really difficult for all the applications to change their jar files. Especially in an Enterprise setting changing just a jar file would require a big CHANGE CONTROL PROCESS which ultimately adds on to the cost of change.

If you are using an ESB, adding removing or routing services could be done at a single point. Hence, the cost per change would be minimal. That said, there are several disadvantages such as ESB can become a single point of failure in your application. Therefore, it is required that you have sufficient redundancies in place to counter any failure.

Snehal
Taking this a bit further, the behaviours on the transports can vary as well. Some consuming systems may require guarenteed delivery while others can completely miss or skip based on a variety of factors. Enrichment (or obfuscation) of select data is also a common requirement when publishing/distributing data. Neither of these things need to be a concern of either the database or the consuming applications and can reasonably be a function of the BUS fabric.
JoeGeeky