I’ve created about a dozen services for a intranet. Now I’ve gotten to the point that these services are more coupled to each other than I’m comfortable with, and I’ve been having problems where once service can cause a few other service to degrade.
I’ve been working on a EDA design so that I can make these services decoupled from each other but as I’m the only programmer here I need some feedback.
The design aims to solve these scenarios:
Scenario 1: Client requests data from Service A, to fulfill that request Service A needs data from Service B but Service B has failed and is unresponsive
Scenario 2: Client updates an entity in Service B, the reference to this entity needs to be updated in Service A and C
I’ve split the design into two parts, Operations and Events
An operation is sent by a service or client to change an entity in a service. This always results in an event being fired. Each operation contains a user id, operation id and a few timestamps.
An event is a reaction to a operation, it notifies anyone who’s listening that a change has occurred. Each event contains the id of the operation that started it, the id of the user that caused it and some timestamps. Each event also has a hash of the complete entity so that any listeners can compare against their versions.
I’m using RabbitMQ as a message bus and each service has persistent durable queues to store any pending events or operations.
In order to decouple service from each other, each service caches any entities it depends on that belong to another services.
When a service requires a entity from another service it fetches it and stores it in a table in its database. It then listens for any changes made to any entities in its cache and updates them when an event related to it occurs.
When storing or fetching an entity from the cache fails, it will re-fetch it from the appropriate service.
For auditing, I’ve got a service that listens to events from all services and stores them. It can then recreate any entity at any given point in time.
I hope this made some sense and appreciate any feedback.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!