Overview

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

FAQ

What is the Fast Flower Delivery application about?The application coordinates flower stores, drivers, and delivery monitoring. It broadcasts delivery requests to nearby qualified drivers, assigns a driver, tracks pickup and delivery timing, evaluates driver performance, and produces monthly reports.
What are the main phases of the Fast Flower Delivery application?The application has five phases: BID Phase, Assignment Phase, Delivery Process, Ranking Evaluation, and Activity Monitoring.
What event starts the delivery lifecycle in the system?The lifecycle starts when a store places a Delivery Request event into the system.
How does the system decide which drivers receive a bid request?The system enriches the delivery request with the store’s minimum ranking requirement, translates driver GPS data into neighborhood information, and then selects only drivers who are authorized, meet the ranking requirement, and are in nearby regions.
What is the difference between automatic and manual assignment?In manual assignment, the store receives the top five bids and chooses a driver itself. In automatic assignment, the system selects the first acceptable bidder and creates the Assignment event automatically.
When are alerts generated during the assignment and delivery process?Alerts are generated if there are no bidders, if manual assignment is not completed within 1 minute, if pickup is not confirmed within 5 minutes of the committed pickup time, or if delivery is not confirmed within 10 minutes of the required delivery time.
What contexts are used in the application?The application uses segmentation contexts such as Driver and Request, temporal contexts such as Monthly and Daily, and composite contexts such as Bid interval, Response interval, Pickup interval, Delivery interval, and Monthly driver.
Which event producers and consumers are defined in the application?The event producers are Store, Driver, GPS sensor, and Vehicle. The event consumers are Driver, Store, and Drivers' Guild.
What global state elements does the application use?The application uses three global state elements: Neighborhoods, Driver status, and Store reference.
How are drivers evaluated for ranking and performance reporting?The system increases or decreases a driver’s ranking based on delivery alerts every 20 deliveries, and it generates monthly reports that identify weak, idle, consistent, or improving drivers based on daily assignment patterns and relative performance.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Event Processing in Action Event Processing in Action ebook for free