3 ms·
Honest question: Is there a type-safe way of communicating across microservices without duplicating verification logic, writing extra layers for the protocol o
by diegoperini 6y ago
Honest question:
Is there a type-safe way of communicating across microservices without duplicating verification logic, writing extra layers for the protocol overhead and conceding to more cognitive load during programming?
- vbsteven 6y agoIf I go the microservices route I usually implement a service-client library for any services I expect to be called internally often. This way service A which needs to communicate with service B can just pull service-client-B into the project and call its methods. Most verification/errorhandling/transport is abstracted away in the service-client library. This library usually also includes model/dto classes. This approach only works well if most of your services are using the same language (and sometimes framework).