Why Choose Microservices Over Monoliths?

Posted by Sunflower Lab
2
Mar 29, 2018
661 Views
Image Understand the pros and cons of monolithic and microservices architectures and when they should be used - Why microservices development is popular.

Business processes are largely dependent upon market-centric requirements. Consumer needs and buying-behaviour evolve over time, and as they do, businesses need to change their product or services model to fulfil the changing consumer demands. In case of software, people had fewer and simpler needs in the past so it was easy to develop specialized software to fulfil consumer-centric demands. 

However, with time, as technologies advanced, businesses started using them to improve the buying experience and create an upper edge in the market for their products by offering “something more” than what their competitors did. This, in turn, urged the competitors to follow suit by employing even more advanced forms of technologies to regain their competitive hold in the market. 

amazon microservices

The “dominoes” effect, thus produced, disrupted the manner in which how software was developed and services were made available to end users. The traditional method of building monolithic applications gradually started phasing out, giving way to microservice architectures. 

What is a microservice?
Rather than building a single, huge application to fulfil all requirements, the entire block of requirements is split up into several sets of smaller, interconnected applications having their own architectures, business logic and databases. Most microservices now employ REST, or REpresentational State Transfer concept in which the client as well as the server are implemented independently of each other - The code on the client-side can be dynamically changed at any time without affecting server operations, and vice versa the code on server side can be updated or changed without affecting how clients work or function.

aws microservices architecture

As long as both the client and the server know about the format of data sent between them, they can be kept modular and separate. The major benefit of separating the client-side from the server is that user interfaces and validation logic can be changed as and when required without affecting server operations. It helps to improve scalability and allows both the client and the server to evolve independently. 

The microservices development model significantly affects the relationship between applications and databases since each service has its own database schema. Databases belonging to individual services are not shared, and this can create a duplication of commonly used data. 
microservices development

Some mobiles, desktops and web apps exposed to APIs don’t have direct access to back-end services, but instead communicate through API Gateways which are responsible for tasks like access control, caching, load balancing, API metering, and monitoring.

Benefits of Microservices Architecture
  • Microservices platform helps to resolve complexity issues by decomposing application into individual sets of manageable services which are quicker to develop, and easier to understand as well as maintain.
  • It helps each business logic or service to be developed independently by a team focused upon developing that particular service.
  • Microservices development platforms such as Amazon microservices reduces the hassles of mastering new technologies since developers are free to choose whatever technology they’re comfortable with for developing a particular service. They are not bound to choices made at the time of project inception.
  • Continuous deployment activities can be practiced for complex applications.
  • It enables each service to be scaled independently.

Drawbacks of Microservices Architecture
  • Microservice architecture adds complexity to the project since microservice applications form the part of a distributed system. You have to implement an inter-process communication mechanism based on either messaging or RPC. Moreover, you’re required to write special code to handle partial failures and account for issues pertaining to distributed computing.
  • As each service uses its own database, it can increase the complexity of recording business transactions involving multiple entities as several databases all sharing common data might be required to be updated. 
  • It can be difficult to test microservice applications as ... Read more.
Comments
avatar
Please sign in to add comment.