
How Did Microservices Become a Thing?
Microservices are a result of problems with two architecture paradigms which are the monolith and the SOA (Service Oriented Architecture).
The Monolith Architecture
The monolith architecture is an architecture where all the software are executed in a single process and all the components share the same memory, compute power, thread and have a strong coupling between all classes. Monoliths are mostly implemented as Silos which means that they normally would not share data or functionality with other applications.
One of the major advantages of a monolith architecture is that it is much easier to design since its data or functionality will not be shared with other applications. Also, if developed correctly, and since all information is contained within one system, monolithic applications can have very good speed performance which can be an advantage over distributed systems.
Service-Oriented Architecture (SOA)
The term service-oriented architecture was first coined in 1998 with the basic premise that apps can expose data and functionality to other applications. The emphasis of the Service Oriented Architecture is sharing, therefore the application is built with the ability to share data and functionality from the scratch.
With the SOA, every service uses a metadata file usually implemented using SOAP(Simple Object Access Protocol) and WSDL (Web Services Description Language) to declare their functionality and what could be accessed. The SOA also used the Enterprise Service Bus (ESB) which is a service built to facilitate interaction between the client (like your browser) and the services. One advantage of the ESB was that the client only needed to understand how to communicate with the ESB while the ESB does all the communication with the services on behalf of the client. The ESB implemented functionality like authentication and validation amongst other functionality which was targeted at making operations between services flexible.
One other advantage of the SOA is the polyglot (the ability to use several languages) between services. The fact that you did not need to depend on only one platform for developing your services but could build with different platforms. For example, one service could be built in PHP while another is built with Java and they will still communicate seamlessly. Therefore, you could use the best platform for a particular operation in building that service.
You can read the next part of this article: What are the Problems with the Monolith and SOA that led to the birth of the Microservices Architecture?