Arrow Down
Product Development

What you need to know about Microservices

Nisha Gopinath Menon
-
November 5, 2018

The majority of companies were large enterprises until recently, making monoliths or equally large enterprise software. Companies have been getting more distributed in nature since the last couple of years. This explains the rising popularity of microservices. Independent small services that together form up an application loosely classify as microservices. Monolithic architecture, where the application forms one big system, stands in contrast to Microservices architecture.

All changes must be pushed at once with tightly coupled, monolithic applications, making continuous deployment impossible. Sure, the traditional Service Oriented Architecture does allow you to make changes to each individual piece. However, to fit into the overall design, each piece will have to be carefully altered. Developers create, maintain and improve new services independently with a microservice architecture, linking info through a shared data API.

Now to be precise, here we're actually referring to a microservice architecture when talking about microservices. Developing software, mobile or web applications as suites of independent services or microservices is the architecture style adopted here. These services are built to serve just one specific business function, such as user roles, user management, social media logins, search engine, e-commerce cart, etc. Also, they can use different data storages and be written in different programming languages. In other words, they are independent of each other. For communicating between themselves, the microservices use lightweight REST, HTTP or Thrift APIs. The centralized management is almost non-existent here.

Why Microservices?

Allowing developers to build their applications from various independent components which can easily be removed, changed, or upgraded without affecting the whole application, as is not the case with monoliths, is the idea behind microservices, following the trend of modularity in the physical world (IKEA furniture, PC’s hardware, automobiles, etc.). This is a major advantage of this type of architecture. Moreover, a developer can reuse the code for any other project that could need the same function, after creating a certain microservices.

Even to develop a small feature, most team members in a development team, in a monolithic application, must know all the parts of the application. On versioning, deployment schedules, data migrations, etc.,  they have to collaborate with other teams. In Microservices Architecture, on the other hand, all the teams need to know is the interface provided by other services, then stick to the interface provided by theirs. To maintain or develop a service, a small team with limited knowledge is enough since each microservice should be independently deployable.

Unlike monolithic applications in which teams are defined by the various layers of the app such as server-side logic,  user interface, database logic and so on, another important characteristic of microservices is that it allows firms to built teams around particular business capabilities. This allows for teams with a larger set of skills: user experience, database management, project management, etc., for the teams to be cross-functional, bringing us closer to the era of DevOps.

Depending on what the developers believe is the best programming language for the particular business function the microservice is built around, the decentralized governance of services allows them to use different programming languages. Meaning, they can also use separate data storages, which brings us to the best advantage of this architecture, scalability that's practically unlimited. Rather than creating double instances of the whole application every time, hosting each microservice at a different location enables you to scale only the function you have a need to. In turn, saving you both resources and time.

Applications constructed as a set of modular parts are easier to maintain over the life of the application, easier to test, and easier to understand, enabling firms to embrace far higher agility and allowing for vast improvements in the time saved in getting working improvements to production. Particularly for large enterprise applications that are developed by teams of culturally and geographically diverse developers, this approach has proven to be superior.

How to orchestrate microservices?

You need to be able to manage, monitor, and scale the various constituent parts in order to actually run an application based on microservices. To help you accomplish this, there are a whole lot of different tools in the market today. Kubernetes and other such open source tools could be a part of your solution for containers. Other tools may be used for orchestrating components for non-container bits of an application, for example, you might use Heat for managing application components in an OpenStack cloud.

Using a Platform as a Service (PaaS) tool is another option, allowing developers to easily pick off-the-shelf open source components for specific parts of an application, like a logging service, a database storage engine, web server, a continuous integration server, or other pieces of the puzzle, by abstracting some of the underlying orchestration technology, it allows developers to focus on writing code. For managing application components, certain PaaS systems like OpenShift directly use upstream projects like Kubernetes or Docker, while others attempt to re-implement management tools themselves.

By breaking it down into tinier, composable bits that work together and can be independently upgraded, deployed, removed or scaled whenever the need arises, the goal of microservices is to ease the maintaining, building, and managing of an application.

Microservices should be designed to do a particular job, but tested to handle every possible scenario and then “piped” together to form a flexible and robust application. However, Microservices Architecture is no silver bullet. It has it’s set of negatives. There are several issues that you must address while using this architecture. A collection of patterns for putting to use the microservice architecture is what the microservice architecture pattern language is. This pattern language enables you to use the microservice architecture successfully and helps you decide if microservices is a good fit for your application or not. Making use of microservices for smaller apps could lead to a loss in productivity. To figure out whether switching to microservices custom app development could help your product, get in touch with us.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Need help with product design or development?

Our product development experts are eager to learn more about your project and deliver an experience your customers and stakeholders love.

Nisha Gopinath Menon
Bangalore