Тёмный

Mauro Servienti - Talk Session: All Our Aggregates Are Wrong 

Explore DDD
Подписаться 6 тыс.
Просмотров 30 тыс.
50% 1

Explore DDD 2018 - Denver, Sept. 11-14
It always starts well. At first glance, the requirements seem straightforward, and implementation proceeds without hiccups. Then the requirements start to get more complex, and you find yourself in a predicament, introducing technical shortcuts that smell for the sake of delivering the new feature on schedule. In this talk, we'll analyze what appears to be a straightforward e-commerce shopping cart. We'll then go ahead and add a few more use-cases that make it more complex and see how it can negatively impact the overall design. Finally, we'll focus our attention on the business needs of these requirements and see how it can shed light on the correct approach to designing the feature. Walk away with a new understanding of how to take requirements apart to build the right software.
About Mauro Servienti
Mauro is a Solution Architect in Particular Software, the makers of NServiceBus, and former Microsoft MVP. He spends his time helping developers build better .NET systems, leveraging Service Oriented Architecture (SOA) principles, and message-based architectures. In addition to technology, Mauro writes on his English blog and his Italian blog. He is also passionate about skiing, classical dance, and music.
WEBSITE: exploreddd.com
TWITTER: / exploreddd

Наука

Опубликовано:

 

23 окт 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@charli3br0wn
@charli3br0wn 4 года назад
This is one of the best architecture talks ever recorded.
@mauroservienti
@mauroservienti 4 года назад
Thanks
@bkarmelita
@bkarmelita Год назад
I fully agree
@aidarlatypov7747
@aidarlatypov7747 2 года назад
Thanks Mauro, great talk! And thanks for this "stupid question technique", I used by myself similar technique, but it was my "idea" and I was not sure it makes sense at all, thank you for confirming!!! And I want to stress that some stupid scenarious can be reality!! Concerning your example - it was actually real situation when requirements were ''if the last name end at xx give a discount % to the customer" and it was a kind of action - every day anothe last name gets a discount)))
@BlackShampoo75
@BlackShampoo75 5 лет назад
Nice to see a different take on Udi's material. Good presentation.
@palawo
@palawo 3 года назад
Thank you !!!!! Awesome class mister!
@johnjerman3549
@johnjerman3549 3 года назад
Excellent talk, very nicely explained!
@KarenTazayan
@KarenTazayan 4 года назад
Thank you!!!
@MerrionGT6
@MerrionGT6 5 лет назад
Events can be as thin as Name + Identifiers - yes! (Also - call them notifications to set that expectation)
@linhe6729
@linhe6729 4 года назад
Great talk! I learned a lot from your example. Thanks!
@mauroservienti
@mauroservienti 4 года назад
Thank you
@MrDomenic123
@MrDomenic123 Год назад
Thanks a lot Mauro, I learned a lot from your talk!
@mauroservienti
@mauroservienti Год назад
Thank you
@JordanPollard1
@JordanPollard1 3 года назад
I found this talk very interesting! Are there further resources on this? I have seen your state machine talk and am familiar with Sagas - I’m more interested in this idea that you have multiple services referring to the ID of a thing that is essentially virtual. It would be great to know what companies are actually approaching their architecture in this way and if there are relevant blog posts and if this method has stood the test of time already. I’ve seen a decent number event-driven architectures, but when there’s a reference to some ID it’s pretty much always owned by a single team/service and lives in a single db schema. As a result events needed to inform other processes need to be rich with data or the consuming service needs to call back to the originating service to get that data. The idea of thin events is certainly appealing for many reasons including authorization, PII concerns and coupling (this causes the problem of event versioning, for instance). Event versioning is so hard that Greg Young is writing an entire book on it.
@mauroservienti
@mauroservienti 3 года назад
Jordan first of all, thanks! There are a few resources out there and we have a few customers using this approach. It’s important to keep in mind that in my experience such an approach makes things more complex for developers while the system is built. It’s easier to start with a monolithic UI and split it up later into a composed UI/ViewModel. This is because while the system is developed from scratch there is a high frequency of changes to the UI adding unnecessary friction to the process. On the other hand as the system is stable enough, it’s simpler to start thinking about the composition part; in most cases it’ll also be clear that service boundaries are correctly identified and stable. Udi Dahan (that by the way is the CEO of the company I work for) talks about UI composition for the first time in 2012 udidahan.com/2012/06/23/ui-composition-techniques-for-correct-service-boundaries/, udidahan.com/2012/07/09/ui-composition-vs-server-side-orchestration/. In 2014 there is a more formal definition udidahan.com/2014/07/30/service-oriented-composition-with-video/. I then started discussing the topic particular.net/blog/secret-of-better-ui-composition still using the client side composition concept. I then started transitioning from UI Composition to ViewModel Composition, nowadays UI Composition identifies a very different thing. Recently I wrote a series of articles on the topic milestone.topics.it/categories/view-model-composition, Jimmy Bogard discusses the topic as well jimmybogard.com/composite-uis-for-microservices-a-primer/. Finally there are a few stack overflow discussions such as stackoverflow.com/questions/8916379/how-do-you-aggregate-data-in-a-udi-style-soa-architecture or stackoverflow.com/questions/29224572/please-explain-me-the-service-oriented-composition-architecture-described-by-mr I recently found also this article www.ashrafmageed.com/Scalability3/ (2015). Finally, a very valuable resource is the ADSD workshop by Udi Dahan. Feel free to reach out to me in case you have any further questions.
@JordanPollard1
@JordanPollard1 3 года назад
Thanks for the thoughtful response! I’ll take a look at these resources when I get some free time :)
@Miggleness
@Miggleness 2 года назад
@@mauroservienti this comment is gold
@matthewchambers5572
@matthewchambers5572 3 года назад
How does placing an order then work? does the information in each boundary transition to its own order model? I could assume sales would be the one where this operation takes place, but how does validation in other services regarding the placement of this work? e.g. you could call sales to say place this order/order this cart, but what is there is a business rule for an order can only be placed if all of the items have stock at that time? Thanks
@mauroservienti
@mauroservienti 3 года назад
Hi Matthew, thanks for the comment and more importantly for the patience. Unfortunately, there is no way to get notifications for comments on RU-vid videos not uploaded by me. Back to your questions: > does the information in each boundary transition to its own order model? Correct. > I could assume sales would be the one where this operation takes place, but how does validation in other services regarding the placement of this work? e.g. you could call sales to say place this order/order this cart, but what is there is a business rule for an order can only be placed if all of the items have stock at that time? Sales can have a saga that waits for confirmation events from other services before proceeding with the order. The most common use case being waiting for Payments to raise an event confirming the authorization on the user's credit card, for example. I wrote about some of these topics on my blog: - milestone.topics.it/view-model-composition/2019/04/18/the-fine-art-of-dismantling.html - milestone.topics.it/2019/05/02/safety-first.html Let me know if that answers your question. Do not hesitate to get in touch, the best way is to use the contact form on the blog. Cheers.
@kennethcarvalho3684
@kennethcarvalho3684 5 лет назад
Thank you for a good talk..but I found it a difficult to follow since we started off directly into the shopping cart. Some existing principles that people use to design aggregate and why they might not be right, could be helpful....also regarding the example of updating price in shopping cart because price has changed in warehouse..hmm..would we not update the price in the catalog on website as soon as warehouse price changed...so user always makes a purchase on latest price???
@mauroservienti
@mauroservienti 5 лет назад
thanks for the feedback, much appreciated. Regarding the price update, out of the top of my head my answer would be yes. However it's really a business requirement, so it's a question that should be asked to the business. let me use a sample in which that price change should not be reflected: Hotel booking. The hotel room is basically the stock item, from the catalog, and room availability comes from "warehouse". In the hotel booking domain prices are frozen at search time. The query is performed, results are returned to the user along with prices. Those prices cannot change while I'm selecting a room.
@MrDomenic123
@MrDomenic123 Год назад
Could someone explain me, how the information of quantity would change in the services? From my understanding, when Sales is the owner of the "shopping cart", and the quantity changes, it needs to publish an "QuantityChanged" event to notify the other services of the system, right?
@MahmoudAbduljawad
@MahmoudAbduljawad Год назад
It doesn't have; As suggested, when a command to update quantity is fired from client, and view-model decomposition occur, warehouse service will pick that command and behave according to it, so sales remain out of picture here.
@gabrielerossetti7503
@gabrielerossetti7503 5 лет назад
Enlightening as usual :) ... all of my friends will receive a brand new banana protector this christmas :D
@mauroservienti
@mauroservienti 5 лет назад
:)
@timhosking
@timhosking 4 года назад
Didn't he just normalize the data like any good data modeler would? I am amazed by all these programmers who battle with these ideas of establishing context boundaries when a half-decent data modeler could have done this for them. I don;t think the database should be the centre of the universe - that creates other problems, but the skills of modelling and normalizing data to third-normal form (at least) will help these discussions about micro-service design immensely.
@brainoverflow98
@brainoverflow98 4 года назад
Didn't get what you mean, didn't he denormalized the data by creating redundancy in each micro-service? It seems like it's the payoff you have to make in order to gain the benefits of dependent services.
@AdamDymitruk
@AdamDymitruk 4 года назад
Why event modeling exists
@brainoverflow98
@brainoverflow98 4 года назад
@@AdamDymitruk Services have to communicate with each other in one way or another. Events are interfaces which services communicate through. So we have to model them I guess.
@timhosking
@timhosking 4 года назад
@@brainoverflow98 Yes sure - I agree that this is the trade off to make. I am just saying that data modelers/architects have know this for some time. This presentation seems to be saying "here is this great new way to handle this difficult problem" but data people have done this for years. So I am disappointed that data people are not more active in the microservice discussion - I think they could contribute a lot more or even lead much of it. And I am disappointed that programmers seem to be still quite uneducated about some database concepts that could provide the answers they are looking for.
@brainoverflow98
@brainoverflow98 4 года назад
@@timhosking ok got your point 👍 But what he has done in this video was denormalization, not normalization, right?
@cya3mdirl158
@cya3mdirl158 3 года назад
Why c# Has weird style codding. Methods start with capital letter...
@coding-esmaster3259
@coding-esmaster3259 3 года назад
It's the defined convention for this programming language
@cya3mdirl158
@cya3mdirl158 3 года назад
@@coding-esmaster3259 stupid idea, but ok
@coding-esmaster3259
@coding-esmaster3259 3 года назад
@@cya3mdirl158 I think using Capitalizion convention for methos is really elegant :)
@cya3mdirl158
@cya3mdirl158 3 года назад
@@coding-esmaster3259 No it is only c# conventtion... Look at Kotlin, Groovy, Scala, Java, Python, C++ etc....
@alexweisberger1669
@alexweisberger1669 3 года назад
With all of the amazing info in this video, that’s what you focus on?
Далее
All our aggregates are wrong - Mauro Servienti
58:04
Просмотров 24 тыс.
Yeni Özbək Mahnisi Yoxsa Vefali Reqsi? 😍
00:36
Просмотров 2,2 млн
Domain Driven Design: The Good Parts - Jimmy Bogard
58:39
Designing and Implementing Aggregates - Mariusz Gil
1:21:41
Design Microservice Architectures the Right Way
48:30
Просмотров 708 тыс.
Самый дорогой кабель Apple
0:37
Просмотров 216 тыс.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Просмотров 506 тыс.