Appendix B. The Fast Flower Delivery application
The appendix presents a complete event-processing model for a flower delivery service in which stores post delivery requests, nearby drivers bid for jobs, assignments are made either automatically or by the store, and the system tracks pickup, delivery, and driver performance outcomes. It explains the application in terms of event types, contexts, consumers, producers, global state, channels, and event processing agents, showing how a delivery request is enriched with store preferences, matched to qualified drivers using location and ranking data, and then turned into bids and assignments. The overall design emphasizes how raw events are transformed and routed through a network of processing components to support operational decisions in real time.
The delivery workflow is organized into phases that begin with a bid request and continue through assignment, fulfillment, and ranking evaluation. During bidding, requests are enriched with minimum ranking requirements and geographic proximity rules, then broadcast to eligible drivers. During assignment, the system either selects the first acceptable bidder or sends the top five candidates to the store for manual selection, while alerts are generated if no bidders appear or if the store does not act in time. After assignment, pickup and delivery confirmations are checked against deadlines to detect late or missing actions, and driver rankings are adjusted based on accumulated delivery alerts and delivery counts.
Beyond the operational flow, the appendix also defines the supporting structure that makes the application work: segmentation contexts for driver and request identity, temporal windows for monthly, daily, bid, pickup, delivery, response, and evaluation periods, and composite contexts that combine these dimensions for pattern detection. It details the producer and consumer roles for stores, drivers, vehicles, and the drivers’ guild, along with the global state elements that store neighborhood data, driver status, and store preferences. The channel definitions and pattern-detection agents tie everything together, enabling alerts, ranking updates, reporting, and monthly performance classifications such as weak, idle, consistent, or improving drivers.
Figure B.1. Parts of the Fast Flower Delivery application
Figure B.2. StreamBase representation of the Fast Flower Delivery application
Figure B.3. The bid request system, showing its two Enrich event processing agents
Figure B.4. Location service event processing agent
Figure B.5. Event processing agents that make up the assignment system
Figure B.6. The event processing agents that make up the control system
Figure B.7. The event processing agents in the ranking and reporting system
Event Processing in Action ebook for free