We are considering to use CQRS and eventsourcing for our new project, which we want to build in the cloud.
We already decided to go with microservices and docker/Kubernetes.
And although I'm very enthusiastic about event sourcing, my manager is not convinced to go for it because he claims it is not mainstream enough and he thinks some cons are hard to handle. E.g.
- never be able to delete data,
- forever and quickly growing disk space needs
- database maintainer can't fix database errors easily
- no managed event store in Azure
Hence he wants me (as an architect) to consider and compare alternative architectures.
Problem is, when crud is not enough (because e.g. of the reactive nature of the app), and when we do want to use the microservices architecture, I can't find alternatives. I look around a lot, but when I search for an alternative to CRUD in MSA, the result is always CQRS with some form of event sourcing.
So hence my question: is there a serious (mainstream) alternative for CQRS when CRUD is not enough? If it's only for comparing the pros and cons.
I realize this might not be the best place to ask this question. But hey, I can at least try...
Greeting
Johan
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
As a summary the advice is to stay with a monolith and only go for microservices when you need to.
Sounds like good advice. However we already decided to go for microservices and are building them already for almost a year now. (Which was probably a decision taken too soon in hindsight. But it is going to be a complex application anyway and we identified some domains already.)
I've scanned lots of the very good website https://microservices.io already to look for alternatives to event sourcing and CQRS in an MSA context. But also here it is in my understanding summarized like:
- In MSA you best use database per service instead of shared DB
- To do interservice 'transactions' you need saga pattern
- When using saga pattern you need events for state changes
- events for state changes must be done atomically together with the actual state change
- for that there are a few possibilities (which I might be able to use as a comparison), of which event sourcing is I think the best approach
- because an event store is an inefficient read model, you need CQRS to have (eventual) consistent denormalized efficient read models
So it looks like, MSA always leads to event sourcing with CQRS this way... Although there may be less ideal alternatives for event sourcing like transaction log trailing...
Anyway, thanks for the info! I think I have enough to go on with.
Thanks all for these quick replies! It is very useful.
As a summary the advice is to stay with a monolith and only go for microservices when you need to.
Sounds like good advice. However we already decided to go for microservices and are building them already for almost a year now. (Which was probably a decision taken too soon in hindsight. But it is going to be a complex application anyway and we identified some domains already.)
I've scanned lots of the very good website https://microservices.io already to look for alternatives to event sourcing and CQRS in an MSA context. But also here it is in my understanding summarized like:
- In MSA you best use database per service instead of shared DB
- To do interservice 'transactions' you need saga pattern
- When using saga pattern you need events for state changes
- events for state changes must be done atomically together with the actual state change
- for that there are a few possibilities (which I might be able to use as a comparison), of which event sourcing is I think the best approach
- because an event store is an inefficient read model, you need CQRS to have (eventual) consistent denormalized efficient read models
So it looks like, MSA always leads to event sourcing with CQRS this way...
Although there may be less ideal alternatives for event sourcing like transaction log trailing...
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.
A little bit of background. Actually we are very familiar with the domain at hand. It is a telephony application that we are developing for years now. But currently it is a somewhat monolithic single tenant application running on prem at our customers.
The 'new project' is actually to move this software to the cloud and host it ourselves instead of the customers. So we basically want to do saas.
Here we decided to go for a MSA architecture and make it multitenant. And since the frontend is very reactive in nature and must aggregate different communication channels, I figured event sourcing would be a good fit here.
So it is not unfamiliarity with the domain, and not with the reactiveness of it. MSA, CQRS, event sourcing and multitenancy however are new for us.
However we are doing research for quite a while now but can't get a 'go' from our manager because of his concerns.
But I think this thread already yielded a few considerations and options to be able to compare some architectural approaches, so thanks again!