Event-Driven Architectures for Loosely Coupled Microservices

Event-Driven Architectures for Loosely Coupled Microservices

This article describes how to use event-driven architectures for loosely coupled microservices. Learn how to use the strangler pattern to break monoliths into microservices while maintaining optimal code.

The strangler pattern is a common methodology to break down monoliths in microservices. However, caution needs to be taken to prevent building distributed monoliths. This article describes how to use event-driven architectures for loosely coupled microservices.

Distributed systems have several advantages, for example, resiliency and horizontal scalability. At the same time, they introduce new challenges compared to classic monolithic systems related to the networking overhead between services. When breaking down monoliths into microservices, the goal is to minimize the dependencies between the services.

While in the optimal case strangled services are independent from the monoliths, in reality, there are often still some dependencies. Even the plants used as an analogy in the strangler fig pattern still dependent on the monolith (at least initially).

There are many different ways how services can communicate: Different protocols, sync vs async, different serialisation technologies, etc. One of the most common and easiest ways to communicate between services is synchronous REST API invocations. However, when it comes to microservices-based architectures, this technique is often considered an anti-pattern since the dependencies from monolithic architectures still exist and they are now even harder to manage in distributed systems.

As alternative event-driven architectures and asynchronous communications are very promising. Let me describe how to use events in a real-world example.

Just before I do this, let me clarify one thing: The dependencies don’t disappear completely and, as always, this approach is not the solution for all problems. But I think event-driven architectures can minimize the coupling between services.

Example Application

This article is part of a series of articles that documents how to modernize a sample Java EE application from 2010 with modern technologies.

The sample application is a simple e-commerce application. The original application and the source code of all subsequent modernization steps are available as open source on GitHub.

microservices developer

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

How long does it take to develop/build an app?

This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company

IDO Development | Initial DEX Offering Development | IDO Development Platform

The IDO development platform is the new trendsetter in the blockchain world. Investors can make their investments worthy by exploring the benefits of Initial DEX Offering tokens since their value is soaring high in the marketplace.

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Mobile Wallet Development, eWallet App Development, Digital Wallet App Development

Get the most of what the digital world has to offer with our innovative range of Digital wallet app development services. Enable your customers to store, send, and receive funds with ease and security. A customizable offering that is highly efficient and scalable.