How to use microservices in a webshop?
Hi there,
I am investigating the options on how to make my application scale better in the future and separate responsibilities of parts of the code. And quite some time ago I already read some things about microservices but I never fully understood on how to implement this in my own projects.
Let's say I have webshop. The main application is build in Laravel and currently all logic and data is stored there like inventory, orders, users, clients, invoices, product information etc.
How would you transform this application in an application that makes use of multiple 'microservices' (SOA?) with the use of Lumen for example.
Would you create a microservice that is only responsible for accepting new orders? And one microservice that is only responsible for creating invoices and sending them to the ERP? And one for updating product information from external parties?
How does this work with the data of each microservice? Do you have one database server that is used by all of the microservices? This defeats the idea of separation of concern. Should every microservice has it's own database?
I think I understand the principle of microservices but I am a little bit confused on how to implement this in a real life project.
Does anyone has an example project where multiple microservices are being used. Or maybe an article of a real life implementation?
Please or to participate in this conversation.