Anti-corruption Layer for mapping between Boundaries

preview_player
Показать описание
What does an anti-corruption layer solve? Most systems rely on data or behaviors from another service or an external 3rd party. The problem is they often don't share the same semantics or data structures. Left unchecked this leads to convoluting up your own boundary with concepts from another boundary. Let me explain how you can use an anti-corruption layer as a way to translate the concepts from another boundary in isolation.

🔗 EventStoreDB

💥 Join this channel to get access to source code & demos!

🔥 Don't have the JOIN button? Support me on Patreon!

0:00 Intro
0:44 Boundaries
3:00 Anti-corruption layer
4:09 Synchronous
5:29 Messaging

#softwarearchitecture #softwaredesign #domaindrivendesign
Рекомендации по теме
Комментарии
Автор

We depend a lot on external services and always build ACL between every integration. Always separated via modules so no external payload cannot be even used on domain side. I tend to call them adapters which implement gateways or ports from core domain side. Greatest value for me here is that I am able to integration test them in isolation without having to involve business modules. Also when external services change, I usually don't need to touch any of my business modules because they are behind interface.

Boss-grjw
Автор

Love it, please make more videos around how to address complexity in code level. Great work thanks again.

ThinkTablet
Автор

Yeah, we have an ACL to interact with our legacy apps as we deprecate parts of it and it’s been really nice

pdevito
Автор

Another, nicely concise presentation of an important architectural concept. Derek, I'd love to see you bundle all of these concepts into an e-book. I, for one, would make it required reading for all our tech leads - it would make a lot of design reviews shorter :-)

leopoldodonnell
Автор

Very nice! Commands for the win! Utilizing the power of commands creates easy "seams" in your software/core domain that allow you to plug in 3rd part integrations, and build an anti-corruption layer quite easily.

mikemccarthy
Автор

How do we handle standardized data structures like FHIR or da Vinci standards which is industry standard and when they reach your org should we let that pass through various domains In organizations or define a ACL and translate it something Organized believes in? I feel the former because latter needs lot of translation and maintenance

shashikumaarb
Автор

Hi, I appreciate your videos and guidance so much! - waiting for your book!

jasminsabanovic
Автор

Would your example of multiple ACLs relate to, for example multiple ride share companies like Lyft and Uber, that have a trip payload they send you, but in different formats. they each hit their own ACL, translate the data to your Trip format and then pass it to your trip service? Would your ACLs be completely independent, or would they share some base functionality?

mana
Автор

Thanks for the explanation! Is it a combination between Adapter Design Pattern and Facade Design Pattern?

myWorldDiscover
Автор

So automapper fits the implementation part of ACL?

srieen
Автор

Thanks for the video, about ACL, do you usually implement a separate service or just a separate project inside your solution? I've implemented in a separate service and seems that the negative points are higher that positive points

MarcosBelorio
Автор

Would you say that adapters within Hexagonal arch. are inherently ACLs? Or do you make the distinction when your adapters are doing more than just one-to-one data mapping, i.e they need to actually change the semantics/structure of the data in order to think of them as ACLs?

Also, I’ve always found it hard to grasp what it means for a plain data response from an external service to have semantics. I feel they’re kind of implicit in how you want to use the data.

greggles_b
Автор

Anti-corruption layer is really great. I have implemented this one in my own framework called CellularJS|(it is available on github, you can see it).

vanhoangtran
Автор

Derek, again great video. one question, where should the ACL be located? will it be in a different project inside the service, or a different service?

ofiry
Автор

Why is it called "Anti-corruption layer"?

leinh
Автор

Great video! I have a question - you mentioned that ACL can be something physical, does it mean that ACL can be some kind of service living in a separate server?

codiguard
Автор

Thanks for the great content. Can you please have a look and share your opinion on The-Standard by Hassan Habib. I am really loving it.

P.S. when I shared github repo of this document, I guess YouTube thought this is spam. You need to look for The standard in Github

DasturlashniOrganamiz
Автор

I swear you're reading my code lol... I had to do the same integrating with a number of services (yes I know its synchronous, business decisions). Basically what i did is, created an ApiResolver which takes in a response code and the name of the service, then it does a look up in its own collection of responses for a match and then it converts that to a standard api response that my service works with....

jamesdube
Автор

You just reminded me of some of the ugliest pieces of code I've written within ACLs 🙃

mabdullahsari