I just want to get a high-level idea of how to design/write microservices for the following use case:
client Microservice MediaStore (let's call it A) talks to two other different microservices
- Microservice Movie (B)
- Microservice Book (C)
A User may want to view/order a Movie or Book from the MediaStore. I understand that Movie microservice will have its Movie entity and MovieDB and similarly, Book microservice will have its Book entity and BookDB. Since the user can order, there is an 'Order' entity on the MediaStore microservice side.
But how to design/write/use them on the client MediaStore Microservice?
a) Should I be using another generic entity (let's say Item) as a parent interface for movies and books, so that I can interact with a generic entity (Item)? The reason being, I want to create an entity 'Order' in the MediaStore microservice. Order can be of Movie or Book.
b) Or should I be using them separately only as Movie and Book entities? And thus create MovieOrder and BookOrder as orders in MediaStore microservice.
c) It would be really helpful if I could get any other advice/knowledge/tip on this use case from the StackOverflow community. :)
Aucun commentaire:
Enregistrer un commentaire