4 ms·
Disclosure: It's only my opinion, that I developed through trial and error during building ecommerce applications in a small team. Problems that I solved may be
by yeneek 6y ago
Disclosure: It's only my opinion, that I developed through trial and error during building ecommerce applications in a small team. Problems that I solved may be different than problems you will encounter.
I aim for the system that will fix itself. So for example, when new product comes to product service, product service stores the product in a strict consistent manner without relying on other services. Other services, which want to know about that new product, polls the product service in regular interval and gets new products. Also you need to make endpoints idempotent.
The good thing is, that when something bad happens, the system data will eventually converge. Sometimes there will be bugs, so you will fix the bug and then wait, until system fix its data.
The bad thing is, that the system is only eventually consistent. You will need to track the delay and keep it short.
As adrianmsmith mentioned, its usually better to create monolith when possible.
I hope it was helpful.