- What is the latest trend on computer software development?
- What is your most favorite song to hear now?
Answer for both above questions are change with the time. If you asked first question 10 years ago someone may answer as “Client server application” after other 5 years 3 tier architecture. Computer design and architecture evolved such fast.
If car engine evolved in that speed now all car should go in speed of light.
SOA – Service Oriented Architecture
SOA is one of architecture came in to software design paradigm. You can find enough articles on internet to read what technical and exact correct explanation on SOA is. Therefore I am not going to add other article in to that bulk. So I will explain SOA in different way. Keep in mind this explanation may not exactly match with SOA specification. Therefore it is recommended to read specification or formal technical article to get advance knowledge about
Just assume you are an expert on cooking and you are running business which is dinning restaurant. You have a chef to prepare whatever the menu you are given. While business is growing you realize that going ahead with one chef is not going to work as it is not enough to deliver requested orders. So you are getting Japanese chef for rice, tai chef for chicken items and sri Lankan chef for curry.
Specialty of those chefs are they only know their native language to talk. They don’t know English or anything but you know all those 3 languages.
So what you have done? Tasks of kitchen you divided granular level and made each chef responsible for their task (service) this is service oriented architecture!!!!!!! If you need you can divide this furthermore like one chef for prepare rice and hire other tamil chef for prepare fried rice using plain rice which prepared by japanese chef.
Where the ESB is fits here.
We know these chefs cannot communicate each other. When “rice chef” prepared rice he comes to you. Then you need to give that rice to second chef to make it fried rice. Because they cannot communicate to each other and also they are talking different languages. But absents of you? This whole chain will not work. And it is not easy to replace you from someone else because new person should be able to handle all 4 languages which chefs are used. So what you can do? Get a broker. You just tell him what you need. He will coordinate with all the chefs and give back what you want. Oblivious he need to know handle all those languages. But now you can replace your place easily with someone else. Because new person only expected to know one of language witch broker knows. “Broker” he is our ESB
Your system may need to communicate with multiple system in real world environment. Some system may be beyond your control and may be those are very outdated legacy systems. Also one system may use SOAP and once system may be REST. Also one system may use xml while other system use json. When you replace your developer you need to find a person who knows all those technologies or need to use multiple people.
What is the solution? Use enterprise service bus (ESB) you only need to send request to ESB. Esb will send messages to all back end API / Services and will deliver final response to you. It make your life easy. When you replace developer you only need someone who know at least one language which ESB knows. ESB will take care rest of the things. It will translate messages to the language which back end knows. Also it will transform messages the way back end expect.
(image from fiorano web site)
Follwoing images will silently explain Enterprise systems with ESB and without ESB
(images from zato.io)
Application direct communicate without ESB
Application communicate via ESB
Again, please note this is not in detail and finest explanation for SOA or ESB. Just simple explanation. This may NOT 100% fit with architectural explanation. But if you understand this story then you can understand SOA or ESB related articles.