Broker topology

Broker topology does not contain any event queue. In fact, the processors themselves are responsible for extracting the events and processing them. After one event is done processing, the processors have to indicate to another event, and then extract and process it. As per the name of the topology, the processor here acts as a broker to the chain of events, processing one event and then publishing another to process, and so the cycle goes on.

Some of the event-driven web frameworks include:

  • Spring Reactor (JAVA)
  • ReactiveX
  • Netty (JAVA)
  • Vert.X (JVM Languages)
  • React PHP (PHP)

Since the event-driven architecture is asynchronous, the pattern lacks atomicity because no execution sequence is available for the events. The event processors are implemented to be highly distributed and asynchronous, hence the results are expected to be provided at any time in the future, most probably depending on the sequence of the callback.

Testability of this pattern is a bit difficult because of the asynchronous nature of the event-driven architecture. However, the performance of the event-driven architecture patterns is great because of the asynchronous and non-blocking nature of its executions. This allows the processes to be parallel and there is no queuing overhead involved.

Even though the scalability score of event-driven architecture is high, the effort of development is doubled. While the asynchronous nature of the pattern allows the architecture to be highly scalable, it also makes the testing of the pattern and its components difficult. The decoupled nature of the architecture also allows the processors to process the events parallel to each other, parallelism increasing the scalability even further.

One of the resulting benefits of the event-driven architecture pattern is that it allows the application to maintain data consistency over multiple servers and services without the help of any distributed transactions. However, this functionality also makes the complete model more complex, making it harder to understand and more difficult to be developed. The application will also automatically update the database and publish events.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset