简单描述“反应器模式”。及其应用 [英] Simple Explanation for the "Reactor Pattern" with its Applications
问题描述
Reactor模式在 Wikipedia 中进行了解释,它有点抽象。您可以更具体地描述这种模式吗?理想情况下,使用代码片段或描述反应堆模式的某些应用的高级类图。
Reactor pattern is explained in wikipedia, and it's a bit too abstract. Can you describe this pattern in a more concrete way? Ideally with code snippets or high-level class diagrams describing some applications of reactor pattern.
推荐答案
您可能需要检查原始论文描述它 http://www.dre.vanderbilt.edu/~ schmidt / PDF / reactor-siemens.pdf
You might want to check the original paper describing it http://www.dre.vanderbilt.edu/~schmidt/PDF/reactor-siemens.pdf
Reactor设计模式处理并发交付的
服务请求到一个或多个
客户的应用程序。应用程序中的每个服务可能包含
个服务器方法,并由一个单独的事件处理程序
表示,该事件处理程序负责分派特定于服务的请求。
事件处理程序的调度由启动
调度程序执行,该调度程序管理已注册的事件处理程序。
服务请求的多路分解由
同步事件多路分解器执行。
The Reactor design pattern handles service requests that are delivered concurrently to an application by one or more clients. Each service in an application may consist of serveral methods and is represented by a separate event handler that is responsible for dispatching service-specific requests. Dispatching of event handlers is performed by an initiation dispatcher, which manages the registered event handlers. Demultiplexing of service requests is performed by a synchronous event demultiplexer.
这篇关于简单描述“反应器模式”。及其应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!