Consider the following API:
UsersService:
CreateUser
GetUser
AppCatalog:
GetApp
CreateApp
What if AppCatalog and UsersService implement both local version of the interface and GRPC one? Then the distinction whether it's a microservice vs a monolith goes away, it becomes a matter of whether they are deployed in a single linux process or across boundaries of processes/servers.I have implemented this technique in teleport:
https://github.com/gravitational/teleport/tree/master/lib/se...
Integration test suite is run against RPC version and local version at the same time to make sure the contract remains the same:
https://github.com/gravitational/teleport/blob/master/lib/se...
A single teleport binary can be deployed on one server with all microservices, or multiple cluster scenarios.
where the binary is simply instantiated with different roles:
auth_service:
enabled: yes
node_service:
enabled: no
Is Teleport a monolith? Yes! Is it a micro-service app? Yes! I'm so happy that we don't have to think about this split any more.