开发者

Service bus Vs direct database access

开发者 https://www.devze.com 2022-12-31 13:36 出处:网络
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

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 tha开发者_JAVA技巧t need access (Assuming all the accessing systems support Java)?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消