Date: 2019-07-15
Log date: 2019-11-09
Accepted
As we want to base inter-modular communication on asynchronous communication in the form of event-driven architecture, we need some "events bus" to do that.
In memory Publish/Subscribe implementation without any external component.
- very easy to implement
- no network communication needed
- performance (it depends)
- no need to learn anything
- simple solution
- does not support more advanced integration scenarios, everything needs to be implemented
- does not have configuration
- does not have other features (who have messaging brokers)
External middleware component. It could be a low-level broker (like RabbitMQ) or a high-level broker (like MassTransit, NServiceBus).
- only integration with platform code needed
- more advanced integration scenarios
- richness of configuration
- a lot of features
- complex solution
- network communication
- new platform learning needed
- performance (it depends)
Solution number 1 - In Memory Events Bus
At that moment we don't see more advanced integration scenarios in our system than simple publish/subscribe scenario. We decided to follow the simplest scenario and if it will be necessary - move to more advanced.
- We need to implement Publish/Subscribe in memory
- All modules will have dependency to In Memory Events Bus to publish events/subscribe to events
- if we ever want to separate a module to another process (microservices architecture), we will need to switch to middleware