Share:

Categories:

4 min read

What are microservices, and how do they work?

To explain what microservices are and how they work in a practical way, let’s make a parallel with a methodology that is more than incorporated into the reality of MJV – something that runs in our DNA: agile practices.


Imagine the following situation: you are assigned to move a large stone from one side of the room to another. You can do it in two different ways, right? 

  • First: move the stone all at once, making a massive and time-consuming effort. In the end, you still run the risk of taking the stone to the wrong place and having to start the whole process over again, generating rework and waste of time (and investment!).
  • Second: divide the stone into several small parts and take it piece by piece to its final destination. If something unexpected happens in this process, redesign and redirect your efforts – or better, the stones. They are small parts that complement each other to reach the final goal. 

We imagine that you know that the second way to do it is related to agility. And this is how microservices work: each piece of an application is made separately, reducing the possibility of errors. 

Let’s give you another hypothetical situation to illustrate. This is probably much more part of your routine than moving stones: making an online purchase. 

You enter the site and click on search. Ready! You have already accessed the first microservice. Then, select what you want to include in the cart—second microservice. Now you are unsure of what to choose and have a look at the product recommendation system. Bingo! Another service!

The microservice architecture works like this: segmenting each essential function of an application so that it works independently of the other, but working together, of course! Thus, it reduces inevitable failures, scalability, granularity, and a much lighter application. Not to mention the much greater ease of integrating new functionality when needed. 

It’s almost like taking small pebbles from one side of the room to the other, but it’s not that simple. The microservice architecture is more than just a flexible coupling of the essential functions of an application. We are talking about restructuring development teams and communication between services. 

But it was not always like this … before this architecture became a reality, there was a single big block. Yes, more or less like the big example stone up there. 

Has Monolithic Architecture been left behind? 

In the traditional monolithic approach, the entire application is created as a single block. In this structure, services depend on each other – roughly speaking, as a monolith, hence the name.

Thus, even the simplest changes to an application required an update to the full version. This takes time and delays the work of many teams that depend on the application to carry out their activities. 

What if this simple update causes an error? There is no way: you need to disable the entire application to correct the problem. 

It looks like a structure from the past, but it’s not that much. Some companies still run within this monolithic architecture. See: it is viable for small applications. 

As it is older, this architecture is still used. A large share of the software development market has not yet adhered to the “hype” of microservices and still runs on monolithic architecture.

However, this scenario tends to change faster and faster. The market is making a move towards change (guess what!) Agile development. 

The rapid rise of Agile was inversely proportional to the adhesion of monolithic architecture. This is because this type of architecture and agile development do not form a pair, let’s say, with the perfect fit. Remember the stone? So it is. 

Corporations relying on robust application development quickly chose microservices – even though many of them were needed. This is because a single change could be responsible for compromising the functioning of many others. 

Therefore, large expanding companies can no longer afford to suffer from their services offline, with errors or inactive. This can represent incalculable damage, depending on the time required for repair. 

Important information: you don’t have to migrate overnight. A combination of monolithic architecture and microservices is possible. And that can even be complete migration or the regular operation of your development area. 

5 benefits of microservice architecture

As you can imagine, the latest hype in the IT sector has taken some of the market giants by storm. None other than Netflix and Spotify have already released the recipe for success by transforming their giant application into more than 500 microservices.

Josh Evans, from the streaming platform, released a video where he talks about how chaotic microservices can be but at the same time open up a whole universe of possibilities.

But why is it so fast? 

Well, with microservices, your teams and day-to-day demands become more efficient through distributed development. 

Also, remember the story of the stone: it is possible to develop several microservices simultaneously. Yes, you can have multiple developers working on the same application at the same time.

What does this represent? Less time spent on development. 

In addition to the ones we have already discussed here, we have separated five more benefits of microservice architecture for you to know. Check them out!

Can we show you an alternative path to traditional monolithic architecture? Here at MJV, we combine innovation and technology to pave the way for our customers and partners towards success in the new normal. 

We believe that technology and innovation do not work alone. They need to be together to drive companies to the forefront of the market. Are you prepared to turn the monolith’s key to microservices?

Back