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.
Теперь, понимая важность однонаправленного потока изменений в условиях collaborative evironment, нам становится легче понять разницу между abstract side effect и concrete side effect. В этом видео Udi Dahan использовал термин sandbox: https://youtu.be/fWU8ZK0Dmxs…
Ответ Jimmy Bogard по поводу того, может ли CQRS-Команда возвращать результат:

📝 "It might seem rather strange that commands always have a result, but it’s much, much easier to deal with side effects of commands through return parameters than through some other means (global registry, static field, re-querying some object, collecting parameter, etc.). For commands that create an item, I usually want to redirect to a screen showing that item, very easily accomplished when I can get the created item and as for its ID.

This is a bit controversial, but don’t frankly care, as it’s the simplest thing that could possibly work. If I want to have a command that returns Void, I could steal a page from F# and have a Command base class that returns a Unit type:"
- "Put your controllers on a diet: POSTs and commands" by Jimmy Bogard
https://lostechies.com/jimmybogard/2013/12/19/put-your-controllers-on-a-diet-posts-and-commands/

Обратите внимание, в последнем предложении он говорит о том, как вернуть и результат, и ошибку одновременно. Именно об этом шла речь здесь: https://news.1rj.ru/str/emacsway_log/279

Причины такого решения он раскрывает в другой своей статье:

📝 "Myth #2 – CQRS requires an eventual consistent read store

No, it does not. You can make your read store immediately consistent. That is, your read store can be updated when your command side succeeds (in the same transaction).

For many legacy/existing apps, transitioning to eventually consistent read stores will either force you to go through bogus hoops of mimicking synchronous calls. Users will bang down on your door with pitchforks and torches if you try and transition to an asynchronous model if you don’t change their business process first.

Instead, you can start with immediate consistency and transition where and when it’s needed. Unless a user expects a confirmation page, making every command page have a series of confirmations of “your request was received” is going to annoy the snot out of your users.

Myth #3 – CQRS requires a bus/queues/asynchronous messaging

See above myth. Nothing about CQRS says “thou shalt use NServiceBus”. It’s just not there. You’re merely separating infrastructure between handling commands and queries, but the how is quite varied. Don’t start with a bus until you prove you need eventual consistency.

Consistency models are a business decision because it directly impacts user experience. An eventually consistent model requires a different user experience than an immediate one, and this is not something you can just “slip in” to your users, or try to emulate. If you’re attempting to emulate immediate consistency in an eventually consistent model, you’re doing something wrong.
- “Busting some CQRS myths” by Jimmy Bogard
https://lostechies.com/jimmybogard/2012/08/22/busting-some-cqrs-myths/

Что он также подтверждает своим комментарием к этой статье:

📝 "Scaling and CQRS are orthogonal, it’s highly contextual and certainly doesn’t require async."
- "Busting some CQRS myths" by Jimmy Bogard
https://lostechies.com/jimmybogard/2012/08/22/busting-some-cqrs-myths/#comment-3422377189

Итак, ответ прост - если вы не используете асинхронное исполнение Команды посредством инфраструктуры (Command Bus), то ничто не препятствует вам получить идентификатор вновь созданной записи БД в возвращаемом командой результате, и реализацию можно существенно упростить. Впрочем, возвратить результат можно даже используя Command Bus, но тут вопрос к потреблению ресурсов (все зависит от конкретного случая).

Вопрос не в том, возвращает ли команда реультат (при этом нужно отличать результат от служебной информации, например, от успешности валидации и принятия команды), а в том, можно ли получить информацию о ресурсе без abstract side effect, т.е. смогут ли другие клиенты получить ту же информацию, если она им нужна.

#DDD #Microservices #SoftwareDesign #SoftwareArchitecture #FunctionalProgramming #OOP
1
Случайно наткнулся на паттерны DDD, выраженные в ArchiMate:
- https://github.com/wilmerkrisp/patterns/tree/master/domain%20driven%20design%20patterns

Поскольку Event Storming - это средство исследования домена, а не документирования, то "C.1.10 Business Process Cooperation Viewpoint" может пригодиться, чтобы задокументировать результат сессии Event Storming:
- https://pubs.opengroup.org/architecture/archimate31-doc/apdxc.html#_Toc10045506

Если вы никогда не использовали ArchiMate, то вряд ли эта ссылка будет для вас сильно информативной. В таком случае лучше скачать Archi® modelling toolkit ( https://www.archimatetool.com/ ) и переключить ViewPoint на Business Process Cooperation Viewpoint. Оно того стоит. Шпаргалка по ArchiMate: https://publications.opengroup.org/n190

Ранее уже говорилось, что и сам Event Storming в чистом виде можно рисовать в ArchiMate:
https://news.1rj.ru/str/emacsway_log/253

#DDD #SoftwareDesign #SoftwareArchitecture #ArchiMate #EventStorming
Мы в этом канале уже разобрали две большие темы:
- Проблема конкурирующих подписчиков и гонка событий: https://news.1rj.ru/str/emacsway_log/57
- CQRS/CQS и возврат результата командой https://news.1rj.ru/str/emacsway_log/276

Попутно было еще несколько заслуживающих внимания дискуссий в чате канала.

Наверное, все уже отдохнули от "тяжелых" тем, и можно браться за следующую. В последнее время часто вспоминается вопрос Monolith First vs. Microservices First в разных чатах, но при этом упускается один важный, я бы даже сказал - ключевой, момент, на который я хотел бы обратить внимание.

Если кто с этими терминами не знаком, то:
- Monolith First https://martinfowler.com/bliki/MonolithFirst.html
- Microservices First https://martinfowler.com/articles/dont-start-monolith.html

Но прежде чем мы погрузимся в эту тему, я хотел бы, чтобы каждый хорошо осознавал разницу между Microservice и Bounded Context (BC). Это важно, потому что границей автономности команды разработчиков является все-таки BC, а значит, микросервисы способствуют достижению автономности не прямо, а косвенно.

С подачи некоторых авторов одно время бытовало мнение, будто Microservice == BC. Некоторые из этих авторов сегодня уже пересмотрели свою точку зрения, и произошла определенная эволюция архитектурных знаний в этой области.

Лучшие, на мой взгляд, статьи, поясняющие разницу между Microservice и BC - это:

- “Bounded Contexts are NOT Microservices” by Vladik Khononov
https://vladikk.com/2018/01/21/bounded-contexts-vs-microservices/

- “Tackling Complexity in Microservices” by Vladik Khononov
https://vladikk.com/2018/02/28/microservices/

- “DDDDD: Bounded Contexts, Microservices, and Everything In Between” by Vladik Khononov
https://youtu.be/Z0RgR9xIQE4

- “Using domain analysis to model microservices“
https://docs.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis

- “Identifying microservice boundaries“
https://docs.microsoft.com/en-us/azure/architecture/microservices/model/microservice-boundaries

- “Reactive Microservices” by Vaughn Vernon
https://kalele.io/reactive-microservices/

- “Microservices and [Micro]services” by Vaughn Vernon
https://kalele.io/microservices-and-microservices/

#DDD #Microservice #SoftwareArchitecture
С Новым Годом! Ярких побед и высоких достижений в Новом Году! Пусть все задуманное осуществится! Здоровья, благополучия и успехов!)
☃️🥳🍾🎆🎇🎉🎄🎅❄️
"Architecture Ownership Patterns For Team Topologies. Part 1: A Business Architecture Model" by Nick Tune
- https://medium.com/nick-tune-tech-strategy-blog/team-responsibility-ownership-patterns-part-1-a-business-architecture-model-63597c4e60e1

"Architecture Ownership Patterns for Team Topologies. Part 2: Single Team Patterns" by Nick Tune
- https://medium.com/nick-tune-tech-strategy-blog/architecture-ownership-patterns-for-team-topologies-part-2-single-team-patterns-943d31854285

"Architecture Ownership Patterns for Team Topologies. Part 3: Multi-Team Patterns" by Nick Tune
https://medium.com/nick-tune-tech-strategy-blog/architecture-ownership-patterns-for-team-topologies-part-3-multi-team-patterns-eecc146ddb28

Цикл статей о том, как выравнивать команды и компоненты системы. Полезна всем, кто распределяет зоны ответственностей команд.

#DDD #Microservices #SoftwareArchitecture
​​ Breaking news!

#ruby 3.0.0 Released!

Ruby 3.0.0 covers those goals by:
- Performance: MJIT
- Concurrency: Ractor and Fiber Scheduler
- Typing (Static Analysis): RBS, TypeProf

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
Forwarded from Никита Соболев
Now Ruby has built-in actor model and jit.

Python is way behind all modern noscripting languages 😞
Друзья, я знаю Павла уже несколько лет. Он тоже работает в российской ИТ-индустрии, и внес свой посильный вклад в развитие его профессиональных сообществ. У кого есть возможность оказать информационную поддержку - просьба зарепостить.
Forwarded from Pavel Kolmakov
Коллеги, мы открыли сбор на операцию для дочки.

https://www.instagram.com/p/CKJlobnLqCr/?igshid=n8odi22mzjb2

Окажите информационную поддержку т.е. подпишитесь ||покидайте друзьям || знакомым, может и они сделают тоже самое. Есть люди которые готовы помочь нам собрать нужную сумму, просто нужно им сообщить о нас. Всем заранее спасибо!
1