Anti-corruption Layer for mapping between Boundaries

  Рет қаралды 14,527

CodeOpinion

CodeOpinion

Күн бұрын

Пікірлер: 41
@Boss-gr4jw
@Boss-gr4jw 2 жыл бұрын
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.
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Exactly! Thanks for the comment and insight.
@ThinkTablet
@ThinkTablet 2 жыл бұрын
Love it, please make more videos around how to address complexity in code level. Great work thanks again.
@leopoldodonnell1979
@leopoldodonnell1979 2 жыл бұрын
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 :-)
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Great suggestion!
@mana20
@mana20 2 жыл бұрын
@@CodeOpinion I was curious if you were doing the channel to eventually promote full courses. Do you have any books you'd recommend?
@pdevito
@pdevito 2 жыл бұрын
Yeah, we have an ACL to interact with our legacy apps as we deprecate parts of it and it’s been really nice
@mikemccarthy9855
@mikemccarthy9855 2 жыл бұрын
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.
@leinh4245
@leinh4245 2 жыл бұрын
Why is it called "Anti-corruption layer"?
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Because you don't want to "corrupt" your service boundary with concepts from the outside.
@vanhoangtran1270
@vanhoangtran1270 2 жыл бұрын
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).
@rezcan
@rezcan 24 күн бұрын
Thanks!
@CodeOpinion
@CodeOpinion 23 күн бұрын
Thank You!
@madollamike
@madollamike 2 жыл бұрын
Amazing explanation! Thank you!
@CodeOpinion
@CodeOpinion 2 жыл бұрын
You're welcome
@jasminsabanovic869
@jasminsabanovic869 2 жыл бұрын
Hi, I appreciate your videos and guidance so much! - waiting for your book!
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Thanks for watching!
@shashikumaarb
@shashikumaarb Жыл бұрын
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
@mohammedabujayyab6146
@mohammedabujayyab6146 2 жыл бұрын
Thanks for the explanation! Is it a combination between Adapter Design Pattern and Facade Design Pattern?
@staspanyukov4822
@staspanyukov4822 Жыл бұрын
Brilliant chanel
@MarcosBelorio
@MarcosBelorio 2 жыл бұрын
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
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Doesn't have to be anything physical as in service or project. Just something that lives logically within a service boundary that does that translation. It will likely interact with some form of I/O to do inbound and/or outbound translation.
@mana20
@mana20 2 жыл бұрын
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?
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Excellent example! I would suspect all of them would be independent since their focus on interchanging and translating between you/them.
@greggles_b
@greggles_b 2 жыл бұрын
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
@greggles_b 2 жыл бұрын
Also, thanks for the video. Super interesting and well explained as always!
@leopoldodonnell1979
@leopoldodonnell1979 2 жыл бұрын
ACLs, while an extremely valuable architectural construct, are not uniformly required for all client consumers. Let's say you have some resources within your domain that are exposed via REST, or GraphQL. Some of your consumers will just take it like it is and conform to what the domain proscribes. This changes when clients can't consume these APIs/Messages as they are defined, or if the internal communication of services within the domain boundary need to change without effecting any of the clients outside of the domain boundary. To answer your question directly, some clients may need data transformations, transactional support, or the bundling/unbundling of requests into fewer/more requests. ACLs enable adaption for new use cases/clients. ACLs offer greater autonomy for teams that own a domain.
@ofiry
@ofiry 2 жыл бұрын
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?
@CodeOpinion
@CodeOpinion 2 жыл бұрын
I'd prefer to keep it within a service that knows how it's doing the translation either/or inbound and outbound. You can physically deploy that independently but it still belongs to a service.
@codiguard
@codiguard 2 жыл бұрын
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?
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Yes, it could be. But point being it doesn't have to be.
@codiguard
@codiguard 2 жыл бұрын
Sure, thanks.
@srieen100
@srieen100 2 жыл бұрын
So automapper fits the implementation part of ACL?
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Partially. It's not just about mapping data but can involve having to perform various operations. Eg, one inbound request may result in making multiple commands within your service boundary.
@DasturlashniOrganamiz
@DasturlashniOrganamiz 2 жыл бұрын
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 KZbin thought this is spam. You need to look for The standard in Github
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Thanks I'll take a look
@mana20
@mana20 2 жыл бұрын
Thank you :)
@CodeOpinion
@CodeOpinion 2 жыл бұрын
You're welcome!
@jamesdube7597
@jamesdube7597 2 жыл бұрын
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....
@mabdullahsari
@mabdullahsari 2 жыл бұрын
You just reminded me of some of the ugliest pieces of code I've written within ACLs 🙃
@CodeOpinion
@CodeOpinion 2 жыл бұрын
Ya sometimes it's not pretty, especially if you're doing a migration from a legacy system.
Shared Database between Services? Maybe!
13:51
CodeOpinion
Рет қаралды 23 М.
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 120 МЛН
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 14 МЛН
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 49 МЛН
Eventual Consistency is a UX Nightmare
11:23
CodeOpinion
Рет қаралды 15 М.
Anti-Corruption Layer (ACL) Pattern - Cloud Design Patterns
11:46
Hussein Awad
Рет қаралды 4,9 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 30 М.
Can an "Anti-Corruption Layer" save your bad software architecture?
7:37
Software Developer Diaries
Рет қаралды 2,4 М.
Domain Driven Design: What You Need To Know
8:42
Alex Hyett
Рет қаралды 121 М.
Microservices gets it WRONG defining Service Boundaries
10:15
CodeOpinion
Рет қаралды 11 М.
Where should you use gRPC? And where NOT to use it!
10:57
CodeOpinion
Рет қаралды 82 М.
Alternative to the Outbox Pattern? Not so fast.
9:00
CodeOpinion
Рет қаралды 18 М.
AES: How to Design Secure Encryption
15:37
Spanning Tree
Рет қаралды 161 М.
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 120 МЛН