Chapter 11. Event Demultiplexing and Dispatching

Event Demultiplexing and Dispatching

Taxi stand in Munich © Frank Buschmann

At its heart distributed computing is all about handling of, and responding to, events received from the network. This chapter, therefore, presents four patterns that describe different approaches for initiating, receiving, demultiplexing, dispatching, and processing events in distributed and networked systems.

Distributed computing is ultimately event-driven, even when middleware platforms offer applications with a more sophisticated communication model, such as request/response operations or asynchronous messaging. There are a number of challenges that differentiate event-driven software from software with a 'self-directed' flow of control [PLoPD1]:

  • Asynchronous arrival of events. Behavior in event-driven software is triggered largely by external or internal events that can arrive asynchronously. Most events must be handled promptly, even if the application is under heavy workload, or while it is executing long-duration services. If not, response time will suffer, and hardware devices with real-time constraints will fail or corrupt data.

  • Simultaneous arrival of multiple events. Event-driven software typically receives events from multiple independent event sources, such as I/O ports, sensors, keyboards or mice, signals, timers, or asynchronous software components. Consequently, multiple events can ...

Get Pattern-Oriented Software Architecture: A Pattern Language for Distributed Computing, 4th Volume now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.