Custom ESB Adapter
Most ESB products support and even supply toolkits for developing custom ESB adapters. If the product you use does not supply a RESTful-specific adapter or if the HTTP/S adapter supplied is not flexible enough to support adaptation of RESTful services, developing a custom adapter may be the simplest solution. As RESTful web services are very simple and fully HTTP compliant, most of the time adapter development for any ESB product will involve only implementing the logic that adds the entity as a resource to the URL being accessed. Everything else will mimic what the HTTP adapter already does:
- Access the URL using one of the standard HTTP methods (GET, POST)
- Eventually add support for other HTTP methods such as PUT and DELETE
- Handle HTTP errors
For most ESB products, be they open source or commercial, one of the most viable alternatives for implementing a custom ESB adapter is to implement a Java Connector Architecture (JCA)-compliant adapter. The core function of this adapter will be executing the logic for translating requests coming off the ESB into RESTFul web services-compliant requests.
When Architectures Collide
Many enterprise architects see ESB as an indispensable tool for integrating disparate systems and bringing backend services into service-enabled architectures. Many of these architects also express discomfort with RESTful web services because they do not see as much vendor support for them as there is for legacy resources or SOAP-based web services. Meanwhile, many hands-on architects and developers consider RESTful web services the most straightforward and natural solution for service-oriented interactions, and they often integrate their front-end applications or integration solutions directly with RESTful backend services without using the ESB. This article presented architectural options for what happens when these two worldsmonolithic enterprise architectures and lightweight integration architecturescollide.
As the ESB product market is very diverse and very competitive, no one solution or set of solutions provides a best practice for integrating ESB with RESTful web services. My professional concern is that without defined guidelines enterprise architects may discard RESTful web services as too exotic for enterprise integration. In fact, RESTful web services are too practical and too simple to be ignored due to their lack of mainstream support. I hope this article will inspire technologists to incorporate this valuable technology into their ESB-backed enterprise integrations and fully leverage its potential.