fastify-example-twitter
fastify-example-twitter copied to clipboard
What is your definition of MicroServices ?
Going through your implementation detail I have noticed the following things which I think are against the MicroServices concept/ Culture.
- Shared code base (APP) among all micro services. This can cause a problem where you have to update a certain code base; which leads to the whole application being rebuilt and will have a new version which means for the sake of sanity and not to introduce complexity you also have to update the other service deployments.
In your docker files I have noticed you are doing COPY . /usr/src/app , which is copying the same code base across all Micro Services.
e.g. You have tweets Micro Service and the timeline Micro Service; if for some reason you update the timeline Service since it is maintained in the same code base as my whole project it creates the problem of where your whole build version will change (i.e. the latest version for my tweets will also be updated).
- MicroServices also suggests different databases per MicroService. How would you share that across Fastify.
To Summarize; i have attached an image from microservices.io and also what do you think of your current implementation according to suggestions made by https://microservices.io/patterns/microservices.html