I am coming from a typical monolithic background and I've been experimenting a lot with Spring Framework. I have also build some simple microservices communicating with each other etc. Now I want to go a step forward and build my one more complex app based on microservices. Right now I am on the phase where I am doing my research on how to do that. I have a simple idea of composing an online shop app with, let's say , two microservices:
- Customer Relationship Service
- Order Management Service
What I don't still understand is how could those two services exchange information about customers. In a typical monolithic project I would have just relate a Customer entity with a Order Entity over a @OneToMany relationship, assuming a customer can have more than one order active. But how would this relationship work in a microservice environment without having to read the same data base ?