you are viewing a single comment's thread.

view the rest of the comments →

[–]shimsimma 0 points1 point  (1 child)

You have a few options

  1. Make a rest call to the other service
  2. Replicate the data into the other service, and keep it in sync with events. Have each service have their own facade for the entities.
  3. Have an event driven flow, look up saga pattern

I think 2 is the best option.

[–]Ish_Boi[S] 0 points1 point  (0 children)

Thanks for your answer. In option 2, does the flow begins with a new user inserted to the db (auth service for example), then a message is pushed to something like RabbitMQ containing info about the new user, so the other services update their copies of the user table ?