mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 06:58:54 +00:00
docs: reactor diagram
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Reference in New Issue
Block a user