jeudi 11 novembre 2021

Zone of responsibility of microservices?

Inspired by miscroserices I try to design a small server application to lean how to build them and how connect them betwen themselves.

I know for sure at least two services I need: OrderService that does business logic within users orders and NotificationService that send messages to users via some channels.

Assume the user orders comes to OrderService. Order service handles this inquiry and provides a list of users who should get notification message after deligate this to NotificationService.

I wonder, should NotificationService know about users? Whats kind of data I should send to notification service: users entities, users id, or message type?

Should notification service make requests to database for recieveing data?

I guess, no. Notification service should know only the ready body message and type of channel through which message must be send.

Could you share yours mind about this how to fins boundary of each service and restrict their by responsibility?

Aucun commentaire:

Enregistrer un commentaire