Data duplication/replication across sub systems for logical & performance reasons, looking for DDD/CQRS guidance

83 views
Skip to first unread message

John Fly

unread,
Apr 2, 2014, 11:06:54 AM4/2/14
to ddd...@googlegroups.com
I'm currently working on a large "Application Platform" project, the end goal is to come up with a variety of application services that can be utilized in multiple applications.

One issue I'm struggling with is how to keep each unit isolated (unit might be similar to Udi's ABC), yet useful for typical usages we see in current applications.
We are trying to keep each system/subsystem isolated: separate solutions, separate database's.

A simple (over simplified really) example would be this:

We have one system that deals with Users & Identities : UserId, FirstName, LastName live here

Another system deals with "Forms": Questions, Answers, Scores etc... live here

1)  Form's data and User data live in separate database's
2)  Forms can "belong" to users.  e.g. an application might have a Users_Forms data structure.


Now the request comes in to show a list of all forms with a low score, the display should list form information and the user's Id, FirstName and LastName.

I can accomplish this in a number of ways, however I wish to provide both performance and usability while keeping my systems isolated if possible.

To me the users identity information "belongs" to the identity system, but I don't have any issue replicating it the forms data or perhaps into the User_Forms concept in an application Db.

I can keep the system's in sync with a pub/sub event model.  e.g. when a user updates his FirstName in the identity system, the Forms system can be notified.

This keeps the identity system as the ultimate authority, but allows more set based read and aggregation operations to be done to support application needs

...

I know there are holes to poke in this though pattern, so poke away.. I'm hoping to learn how others might tackle this issue





628426

unread,
Apr 2, 2014, 5:40:31 PM4/2/14
to ddd...@googlegroups.com
I've used the approach you described successfully. I feel though that there isn't one approach, for example it may required to preserve the name of the user as it was when they filled out the form - I am thinking of identity forms (passport application) filed before someone was married and changed their surname to their partners.

Please bear in mind though that I am barely an enthusiastic amateur!

Mirko Bonadei

unread,
Apr 2, 2014, 5:54:13 PM4/2/14
to ddd...@googlegroups.com
I am in the middle of a similar problem.

If I get your point, you will update all the Forms with the user updated information when a user modify something on the profile. Does it has value to keep the information of the user when he/she filled the form?
Then if needed you are always in time to create a read model with the bleeding edge user information.

Mirko 
Reply all
Reply to author
Forward
0 new messages