Member-only story

Architect Serverless Applications with Anticorruption Layers

Sheen Brisals
Level Up Coding
Published in
9 min readApr 18, 2024

--

Credit: Microsoft stock image

Prevention is better than cure!

This popular proverb is believed to be from the 1500s.

It is easier to stop a problem from happening than to repair the damage after it has happened.

The anti-corruption layer concept as a preventive and protective measure has existed for centuries in medicine, manufacturing, labs, and other industries.

In software, the anticorruption layer (ACL) gained attention as a pattern after Eric Evans' seminal book Domain-Driven Design: Tackling Complexity in the Heart of Software (Addison-Wesley Professional) was published.

In software, ACL also serves the same purpose: prevention and protection.

Team X was autonomous; guarded its bounded context — Orders.

Engineers built APIs to operate on order data and published (domain) events on an event broker. They used a third-party order management system (OMS) as an order store and interacted with a few internal systems.

For unknown reasons, the team didn’t spend time building a sophisticated domain model. Instead, they mirrored part of the OMS. Their APIs behaved like proxies with business logic scattered everywhere.

--

--

Written by Sheen Brisals

Co-author of Serverless Development on AWS (O'Reilly) | Engineer. Architect. Leader. Writer. Speaker. AWS Serverless Hero. Author: leanpub.com/TheSpeakerBook

Responses (3)

What are your thoughts?