DEV Community

Discussion on: To Domain Driven Design

Collapse
 
edudobay profile image
Eduardo Dobay

Nice article! Your comment on the UserService makes me wonder: is it customary to duplicate user data e.g. in all services that have some need to display the user's name? Or would it be more appropriate to keep that in a centralized service?

Collapse
 
kmruiz profile image
Kevin Mas Ruiz • Edited

I always try to balance team autonomy and crossfunctional requirements.

If having some piece of information across all components that have a dependency and moving data is too expensive, it's a good decision to centralise the user information in a single service.

This comes with several tradeoffs: all those teams will depend entirely on a new platform team, slowing down value delivery. This, from a pragmatic point of view, is not dramatic because teams usually have other blockers before that.

However I always ask, in terms of data locality, what would be the difference between propagating data with state sourcing or events, and having a cache in the client service after an HTTP request.

I hope I answered 😊.

Thanks for reading!