Udi Dahan
udidahan.com · Personal blog · on HN since 2009
Udi Dahan, a software architect, writes on CQRS, service boundaries, messaging, and domain modeling in distributed systems.
What HN saysHN links it in discussions of CQRS, event sourcing, and never deleting data. Commenters note CQRS is gaining traction in the .NET community.
21HN people shared it
9linked it in comments
13stories submitted
21story points
2 years agolast shared
2009people per year2026
Most-shared posts
- 1Don't Delete – Just Don't (2009)4 people · 6 points · first shared 2015 · discussion on HN
- 2Clarified CQRS4 people · 5 points · first shared 2012 · discussion on HN
- 3The Fallacy of ReUse (2009)3 people · 3 points · first shared 2009 · discussion on HN
- 4Bus and broker pubsub differences2 people · first shared 2013
- 5It’s not about you1 people · 3 points · first shared 2013 · discussion on HN
- 6MySpace Architecture Considered Expensive1 people · 1 points · first shared 2009 · discussion on HN
- 7Dont try to model the real world - it doesnt exist1 people · 1 points · first shared 2012 · discussion on HN
- 8UI Composition Techniques for Correct Service Boundires1 people · 1 points · first shared 2012 · discussion on HN
- 9On Design for Testability1 people · 1 points · first shared 2010 · discussion on HN
- 10True1 people · first shared 2011
- 11Training1 people · first shared 2015
- 12Domain events salvation1 people · first shared 2020
- 13Wcf everywhere not on my watch1 people · first shared 2015
What HN people wrote when they linked it
yk_42 · 2011-08-31
EventSourcing/CQRS (Command/Query Responsibility Segregation) is gaining a bit of traction in the .NET community. There are some great presentations[1], blogs[2][3] and projects[4] related to this architecture.
[1]: http://www.infoq.com/presentations/Command-Query-Responsibility-Segreg…
[2]: http://www.udidahan.com/?blog=true
[3]: http://blog.jonathanoliver.com/
[4]: https://github.com/joliver/EventStore/
spenrose · 2012-10-10
I still feel the canonical answer to "what should my default data management policy in write-some-read-a-ton situations" is to, at write time:
1) store an appropriate write-whole/data-mining-friendly format
2) ASAP, for each major view, write out a Redis-style O(1)-to-read data structure
3) think carefully about backup and replay strategies
You trade a slightly stale read of the very hottest data for much improved performance on everything else, and more importantly, much simplified view code.
The best reference I have found for this pattern, and it isn't great (too big-SQL-centric), is "command-query-responsibility segregation":
http://www.udidahan.com/2009/12/09/clarified-cqrs/
janpieterz · 2015-06-12
You don't really control the composition that closely. The whole point of having a lot of microservices is that you can update and work on very isolated functionality at a time distributed.
As other people have noted as well in here, you should always keep the interface backwards compatible, if needed make a second version of the API or the messages, but never really have to deploy more than a couple of services who really have changed their behavior. The ones just interacting with those services should experience the same interface, being it a couple of versions older or newer.
I'd recommend watching the ucon videos [1] or Udi Dahan's Advanced Distributed Systems design [2] for more in-depth reference material. If you're transforming a team of engineers I can really advise you to join the latter and afterwards order the videos so you can use them with your team as training material! This is less about microservices as them being micro, but more about setting up a distributed service oriented architecture.
[1] https://skillsmatter.com/conferences/6312-mucon#skillscasts
[2] http://www.udidahan.com/training/
AWebOfBrown · 2020-12-22
If you have an aggregate root, it is responsible for knowing when changes to the aggregate have occurred, and thus making those visible.
What is the mechanism for it to do so? Does the aggregate root retain the events and decide when to dispatch them (likely after successful persistence to a datastore)?
Once ready for dispatch, what do you use to handle the events? Some kind of DomainEvents class ala https://udidahan.com/2009/06/14/domain-events-salvation/ ?
This is the boilerplate I'm referring to.
ori_b · 2018-04-01
You mean they follow what many people consider best practices?
https://softwareengineering.stackexchange.com/questions/159232/should-…
https://stackoverflow.com/questions/820466/never-delete-entries-good-i…
https://serverfault.com/questions/31455/should-i-ever-delete-sql-and-d…
https://www.infoq.com/news/2009/09/Do-Not-Delete-Data
http://udidahan.com/2009/09/01/dont-delete-just-dont/
https://stackoverflow.com/questions/2549839/are-soft-deletes-a-good-id…
https://azure.microsoft.com/en-us/blog/soft-delete-for-azure-storage-b…
I find it fascinating how much shock there is that Facebook is doing what nearly everyone else is doing, and what many people here have likely implemented.
realntl1 · 2017-01-06
I think CQRS is more commonly viewed as an architectural pattern, not a code pattern, despite many definitions floating out there on the internet that focus on command/query object patterns. See this post: http://udidahan.com/2009/12/09/clarified-cqrs/. If we view it as an architectural pattern, it becomes folly to think that CQRS can be distilled into a library.
mackwic · 2015-10-07
This is relevant to the discussion:
- http://udidahan.com/2007/12/29/wcf-everywhere-not-on-my-watch/ (MS SOA technology)
- http://www.oracle.com/technetwork/issue-archive/2015/15-mar/o25archite…
- Also this: http://stackoverflow.com/questions/25501098/difference-between-microse…
- http://service-architecture.blogspot.co.at/2014/03/microservices-is-so…
rational-future · 2014-08-31
Now that's a reassuring yes :)
What I meant is it seems (I've never used or seen it before) to be closer to a message broker than a bus - http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/
kstenson · 2013-12-22
Thats because NServiceBus is a Service Bus and not a broker: http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/
For HA you simply run a distributor process for each logical event on windows cluster and add as many worker nodes as you see fit.
Because NServiceBus uses the store and forward pattern if a NServiceBus process/machine hosting it goes down, you are still guaranteed the eventual delivery of messages when the process/machine is resumed.