How are your microservices talking?

Aiven
2 min readMar 8, 2019

--

In this piece, we’ll look at the challenges of refactoring SOAs to MSAs, in light of different communication types between microservices, and see how pub-sub message transmission — as a managed Apache Kafka Service — can mitigate or even eliminate these challenges.

If you’ve developed or updated any kind of cloud-based application in the last few years, chances are you’ve done so using a Microservices Architecture (MSA), rather than the slightly more dated Service-Oriented Architecture (SOA). So, what’s the difference?

As Jeff Myerson wrote:

“If Uber were built with a SOA, their services might be:

GetPaymentsAndDriverInformationAndMappingDataAPIAuthenticateUsersAndDriversAPI

Whereas, if Uber were built instead with microservices, their APIs might be more like:

SubmitPaymentsService
GetDriverInfoService
GetMappingDataService
AuthenticateUserService
AuthenticateDriverService

More APIs, smaller sets of responsibilities.”

WIth smaller sets of responsibilities for each service, it’s easier to isolate functionality. But what are microservices and how do MSAs compare to SOAs and monolithic applications?

What are microservices?

Simply put, microservices are a software development method where applications are structured as loosely coupled services. The services themselves are minimal atomic units which together, comprise the entire functionality of the entire app. Whereas in an SOA, a single component service may combine one or several functions, a microservice within an MSA does one thing — only one thing — and does it well.

Microservices can be thought of as minimal units of functionality, can be deployed independently, are reusable, and communicate with each other via various network protocols like HTTP (More on that in a moment).

Today, most cloud-based applications that expose a REST API are built on microservices, (or may actually be one themselves). These architectures are called Microservice Architectures, or MSAs.

On the continuum from single-unit, monolithic applications to coarse-grained service-oriented architectures, MSA’s offer the finest granularity, with a number of specialized, atomic services supporting the application.

Source: Samarpit Tuli’s Quora Answer: “What’s the difference between SOAs and Microservices?”

Some challenges

One starts to get a sense from this how asynchronous communication at scale could serve as a benefit in the context of apps that pull and combine data from several APIs. Still, while most organizations are considering implementing their applications as MSAs — or already have — the task, especially when refactoring from MSAs or monoliths, is not exactly straightforward…

Go to our original blog post to find out what the specific challenges are, some examples of microservices communication patterns, and how Apache Kafka can fit into your microservices communication pattern.

--

--