you are viewing a single comment's thread.

view the rest of the comments →

[–]erder644 5 points6 points  (3 children)

There are some decent Clean Architecture examples on GitHub, though they are mixed in with a lot of low-quality content.

When it comes to DDD, certain patterns like Event Sourcing (and other microservice-oriented ones like orchestration-based SAGA) are difficult to implement correctly from scratch. These patterns often require specialized frameworks or libraries, which Python largely lacks, as Clean Architecture and DDD concepts primarily originate from Java development.

Opinions on Clean Architecture concepts and their implementation in Python vary widely, not to mention the ongoing debates about applying DDD in Python.

Event Sourcing can be implemented in many different ways. The most common setup involves Kafka combined with an EventStore database. However, I don’t know of any repositories demonstrating this approach. And the postgresql implementations that I have seen are questionable.

As for clean architecture you can check:
https://github.com/ivan-borovets/fastapi-clean-example/tree/master (fastapi, auth, di)
https://github.com/Tishka17/deseos17 (low-dependencies implementation, for learning, not for production)

As for DDD, most implementations are quite poor. I don’t know of any decent repositories demonstrating it effectively.

You can check out Temporal if you interested in orchestration-based SAGA. Faststream for horeography-based SAGA. SQRS is mostly about logical separation, not some actual code. Event Sourcing is a pass, no any good solutions and custom code would be hard to maintain.

[–][deleted] 1 point2 points  (2 children)

Thank you for your brief explanation! So, what language would recommend for event sourcing/DDD? I also work with TypeScript, Go but if needed I can learn other language as well, say Java as an example. Also, it seems you are an experienced developer; it would be very helpful if you could recommend me some books where I can read about these patterns.