On Sat, May 5, 2018 at 1:16 PM <
si...@programujem.eu> wrote:
> I wish the initial developer had actually discussed and done something
like this. Unfortunately, as I have already replied to Daniel, transaction
mutability has existed in the system since its inception and is to be
preserved at this moment.
So here it depends quite a bit on how you've actually set things up. In my
case, because I have EventSourcing and ability to do full blue/green
deployments, I can do these kinds of domain refactorings without downtime.
I'm in the middle of one just like this at the moment as it happens (split
one concept into two).
This may not be applicable to you, but maybe the description could give you
some inspiration, idk.
In my case I have Subscription->Product which needs to be split up into
Subscription->Plan->Product. I've refactored/redesigned my codebase to have
this new layout of aggregates, entities, and events. I then fire up a
cluster with the new design, and import events from existing production. In
the import there's a migration step that transforms events in the old
design to events in the new design, so the intent is kept but the specific
layout is new. I create new aggregates if necessary, and migrate/apply old
events as if they had been applied in the new design. Once the new cluster
is in realtime sync with the old system we can turn the load balancers to
the new system, and turn the old one off. With this scheme we can (and
have/will) do pretty much arbitrarily complex redesigns as long as there is
a mapping from old to new, somehow.
The above depends quite a bit on what infrastructure you have available to
you, and is relying on the fact that it is using EventSourcing. If you
don't, yeah, then it's way way more complicated.
regards, Rickard
> --
> 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.