emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc. – Telegram
emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
3.48K subscribers
119 photos
15 videos
22 files
1.14K links
Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, Extreme Programming, SDLC, Agile, etc.

Chat: https://news.1rj.ru/str/emacsway_chat

Persistence: https://dckms.github.io/system-architecture/
Download Telegram
emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
📝 "Note that just saving the Domain Event in its causal order doesn’t guarantee that it will arrive at other distributed nodes in the same order. Thus, it is also the responsibility of the consuming Bounded Context to recognize proper causality. It might be…
Родственные EIP patterns:
- "Correlation Identifier"
https://www.enterpriseintegrationpatterns.com/patterns/messaging/CorrelationIdentifier.html
- "Message Sequence"
https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageSequence.html

Применяется в том числе и в Event Sourcing.

В метаданных eventstore есть переменные $causationid and $correlationid.

📝 "The are both really simple patterns I have never quite understood why they end up so misunderstood.
Let's say every message has 3 ids. 1 is its id. Another is correlation the last it causation.
The rules are quite simple. If you are responding to a message, you copy its correlation id as your correlation id, its message id is your causation id.
This allows you to see an entire conversation (correlation id) or to see what causes what (causation id).
Cheers,
Greg Young"
https://discuss.eventstore.com/t/causation-or-correlation-id/828/4

Примеры:
- https://github.com/microsoftarchive/cqrs-journey/blob/6ffd9a8c8e865a9f8209552c52fa793fbd496d1f/noscripts/CreateDatabaseObjects.sql#L57-L62
- https://github.com/kgrzybek/modular-monolith-with-ddd/blob/4e2d66d16f97b3c863fbecd072dad52338516882/src/Modules/Payments/Infrastructure/AggregateStore/SqlStreamAggregateStore.cs#L44-L45

#DDD #Microservices #DistributedSystems #EIP
emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
Одной из непростых тем в DDD и микросервисной архитектуре является т.н. проблема "конкурирующих подписчиков". Это когда два причинно-зависимых события попадают на конкурирующие узлы обработки событий, и второе событие может "обогнать" первое, например, по…
Но даже если подписчик всего один, и сообщения доставляются последовательно, то и тогда очередность обработки сообщений может быть нарушена. Пример из NATS-Streaming Server:

📝 "With the redelivery feature, order can’t be guaranteed, since by definition server will resend messages that have not been acknowledged after a period of time. Suppose your consumer receives messages 1, 2 and 3, does not acknowledge 2. Then message 4 is produced, server sends this message to the consumer. The redelivery timer then kicks in and server will resend message 2. The consumer would see messages: 1, 2, 3, 4, 2, 5, etc...
In conclusion, the server does not offer this guarantee although it tries to redeliver messages first thing on startup. That being said, if the durable is stalled (number of outstanding messages >= MaxInflight), then the redelivery will also be stalled, and new messages will be allowed to be sent. When the consumer resumes acking messages, then it may receive redelivered and new messages interleaved (new messages will be in order though)."
- nats-streaming-server, issue #187 "Order of delivery", comment by Ivan Kozlovic
https://github.com/nats-io/nats-streaming-server/issues/187#issuecomment-257024506

#DDD #Microservices #DistributedSystems
emacsway-log: Software Design, Clean Architecture, DDD, Microservice Architecture, Distributed Systems, XP, Agile, etc.
Одной из непростых тем в DDD и микросервисной архитектуре является т.н. проблема "конкурирующих подписчиков". Это когда два причинно-зависимых события попадают на конкурирующие узлы обработки событий, и второе событие может "обогнать" первое, например, по…
Кстати, проблема очередности доставки сообщений хорошо описана в главе "Projections and Queries :: Building read models from events :: Subnoscriptions" книги "Hands-On Domain-Driven Design with .NET Core: Tackling complexity in the heart of software by putting DDD principles into practice" by Alexey Zimarev ( @zimareff )
https://www.amazon.com/Hands-Domain-Driven-Design-NET-ebook/dp/B07C5WSR9B

И он добавил несколько интересных аргументов в чат канала:
https://news.1rj.ru/str/emacsway_chat/85

P.S.: это один из тех людей, кому я искренне благодарен за влияние на мое профессиональное развитие.

#DDD #Microservices #DistributedSystems
Кстати, Яндекс-Переводчик знает толк в "Совершенстве" 🙂
Если вдруг кто пропустил эту новость - вышло второе издание бестселлера "The Pragmatic Programmer: your journey to mastery, 20th Anniversary Edition" (2nd Edition) by David Thomas: https://www.amazon.com/Pragmatic-Programmer-journey-mastery-Anniversary/dp/0135957052/

Автор - один из 17 подписантов Agile-manifesto и его соавтор.

Кстати, Dave тоже ударился в функциональное программирование, и написал книгу "Programming Elixir".

А так же он был редактором книги Джо Армстронга по Эрлангу:
"Dave Thomas edited my Erlang book"
https://web.archive.org/web/20170830231254/http://joearms.github.io/2013/05/31/a-week-with-elixir.html

#Agile #Career #FunctionalProgramming
📝 "A good architecture is characterized by crisp abstractions, a good separation of concerns, a clear distribution of responsibilities, and simplicity.
All else is details."

- Grady Booch. Позавчера.
https://twitter.com/Grady_Booch/status/1301810362119905285?s=19

[UPDATED]: Там весь тред заслуживает на прочтение.

#SoftwareDesign #SoftwareArchitecture
Немного дискуссионный, но весьма интересный материал от Vladimir Khorikov ( @vkhorikov ) на один из самых частых вопросов в DDD - может ли один агрегат иметь ассоциацию по ссылке с другим агрегатом?

"Link to an aggregate: reference or Id?"
https://enterprisecraftsmanship.com/posts/link-to-an-aggregate-reference-or-id/

#DDD #Microservices
В своей практике я нередко наблюдал ситуацию, когда недостаток знаний вызывает у разработчиков неуверенность, которая не позволяет им отступать от привычных шаблонов, даже если привычные шаблоны не подходят под решаемую проблему. Из-за чего решения многократно переделываются. Сперва выбирается неподходящее решение, но знакомое. В процессе реализации накапливается какой-то отпыт, обретаются знания, рассеивается неуверенность. Потом возникают силы все переделать, и реализация переделывется со второй (или более) попытки.

Пути решения проблемы здесь есть два:

1. Обретать знания. Страх - всегда от незнания.
2. Воспитывать в себе храбрость. Это может показаться неуместным, но именно об этом говорит Кент Бек:

#Agile #Career