diff --git a/reactor/README.md b/reactor/README.md index 50ee482cb..ce6109111 100644 --- a/reactor/README.md +++ b/reactor/README.md @@ -38,6 +38,10 @@ Wikipedia says > The reactor software design pattern is an event handling strategy that can respond to many potential service requests concurrently. The pattern's key component is an event loop, running in a single thread or process, which demultiplexes incoming requests and dispatches them to the correct request handler. +Sequence diagram + +![Reactor Sequence diagram](./etc/reactor-sequence-diagram.png) + ## Programmatic Example of Reactor Pattern in Java The Reactor design pattern is a concurrency model that efficiently handles multiple simultaneous I/O operations using a single or a limited number of threads. It is particularly useful in scenarios where an application needs to handle multiple clients sending service requests concurrently. @@ -157,10 +161,6 @@ Running the code produces the following output: This concludes our detailed explanation of the Reactor design pattern. The Reactor pattern allows us to handle multiple simultaneous I/O operations efficiently using a single or a limited number of threads. -## Detailed Explanation of Reactor Pattern with Real-World Examples - -![Reactor](./etc/reactor.png "Reactor") - ## When to Use the Reactor Pattern in Java Employ the Reactor pattern in scenarios requiring low-latency and high-throughput in server-side applications, making it an essential strategy for modern networking frameworks and web servers. diff --git a/reactor/etc/reactor-sequence-diagram.png b/reactor/etc/reactor-sequence-diagram.png new file mode 100644 index 000000000..11b7cc83e Binary files /dev/null and b/reactor/etc/reactor-sequence-diagram.png differ