I mentioned setting up an ESB in my “Hello World” post and this is where I explain what an ESB is and why you might want one – even at home. I’m going to try to keep the jargon to a minimum as there’s an awful lot of it in the ESB world…
ESB stands for Enterprise Service Bus and as the name implies it’s usually associated with large companies. An ESB is designed to solve the problem of integrating disparate systems. A concrete example is the best way to illustrate this.
Let’s say you have a portal site where users can request online services that you provide – I’ll use web hosting as an example. The request would have to trigger an invoice in the finance system, the automatic creation of the actual web hosting, an entry in the configuration management database (CMDB) and perhaps an entry into the monitoring system to alert your admins if there’s a problem with the site. If it’s a new user you may also want an entry in a separate customer relationship management database (CRM)
That’s five systems your portal needs to talk to, and that’s OK if it’s all being managed by the portal itself. That’s one system that has to have interfaces with each of the others. You’ll want those interfaces to work both ways, of course, so the customer can see the status of their service and their account details.
Now let’s say your customer doesn’t pay their bill and your terms state you’ll disable their hosting if that happens. Now you want your finance system to be able to talk to the system that manages the service itself, then tell the CMDB it’s disabled and suspend monitoring. Your finance system has to be able to interface with the other systems.
Rinse and repeat for scenarios in which each system has a reason to interface with each of the others. You get spaghetti. You get this:
Every system has to interface with five systems and somehow you have to manage the workflow of linking them all together so that an action in one triggers the right actions in each of the others. You’ve gone from having 5 integrations to set up to having 15 (or 10 and 30 if they all have to work both ways).
Now what happens when you change, say, your CRM? Everything that talks to it needs to be changed to talk to the new system, and the new system has to be configured to talk to all of the other systems. It rapidly becomes an unmanageable nightmare.
Then there’s the ESB way:
The ESB sits in the middle and coordinates all of those integrations. Each system talks only to the ESB and it talks to all of the systems. Swap one out and you only have to get the new one to talk to the ESB. The ESB orchestrates the connections, performs the necessary data transformations and provides additional benefits such as centralised logging, auditing and monitoring of your integrations.
Your spaghetti mess of connections has become a simple set of spokes with the ESB as hub.
That all sounds great if you’re running a business, but why on earth would it be of interest outside of work?
Well, in fact, there’s already an ESB in all but name that is aimed at the end user. You may already be using it. It’s called IFTTT.
IFTTT – If This ThenThat – is a tool for integrating web services and apps over and above the capabilities that the developers of those services have decided to build in.
In IFTTT channels are the endpoints that it talks to – examples include all the big web services like Facebook and Twitter as well as literally hundreds of others. The recipes are the specific integrations – you might, for example, want a recipe to keep your Twitter and Facebook profiles synchronised so that when you change your profile picture on one it automatically updates the other.
If one app doesn’t talk to another one chances are good you can find a recipe in IFTTT that will do the work for you. It’s the ESB principle on a grand scale – at the time of writing there are 280 channels, and no way the developers of any one of those would build in integration to 279 other systems.
Want to upload photos from Facebook to Dropbox? There’s a recipe for that. Save every tweet into a Google Docs document? There’s a recipe for that. Send a tweet when you blog? Recipe. Create a note in Evernote from email? Recipe. Yes, some of these can be done natively from the apps concerned, but they don’t cater for every eventuality. That’s where IFTTT comes in.
If you’re paranoid – and you should be on the internet – you’ll spot the downside. For IFTTT to integrate services for you it must have access to those services. You have to grant it access to your Twitter account, Facebook, Dropbox, Email, Evernote… whatever you need it work with, you need to give it access. That’s placing a lot of trust in the people behind IFTTT and their security systems.
The alternative is to do it yourself. And that’s where we come back to the traditional ESB. If you have a computer that’s always on it could be your ESB. Even a Raspberry Pi would do the job, so it doesn’t have to be a big server. Setting up an ESB at home is a side project I’ve been working on, on and off, and I’ll be talking more about that in future posts.in Home Automation