Making a Service
How to make a service
In microservice architecture, we are strict about how services connect, but liberal about what is inside of them. Another way to think about it is to think of the border of a service, the area which is exposed to the outside world. The border or interface of your service, what it looks like, how it will work, is a team discussion. What is inside the black box is up to the developer. So here are the steps:
- discuss with team what the inputs and outputs of your service will be
- build your service
A finished service means:
- all unit tests pass. The only requirement is that there are tests for input validation on every function that takes input. Feel free to write more if your service requires it.
- all intregration tests pass, which involve all resources such as databases, to validate all functions work as expected
- there are interfaces or docs detailing the input and output of each public function