Best Flight Itinerary system (Midterm 252): a Passenger App sends a trip request to the Trip Planning Service, which creates an empty itinerary draft in the Draft Itinerary Record. The Route Builder lists possible routes, the Constraint Checker filters out routes that break the passenger’s or airline’s rules, and the Best Option Selector picks the best one; each step retrieves the current draft, improves it and saves it back, until the draft is stable and the service returns it to the app. Write the name of the most suitable architectural pattern for this system.
Show answer
Blackboard. Several independent components (Route Builder, Constraint Checker, Best Option Selector) repeatedly read and update one shared data store (the Draft Itinerary Record) until the solution is stable, and a controller (the Trip Planning Service) decides which one runs next. Pipe-and-filter is the tempting wrong answer: there, filters pass output directly to the next filter and no shared store is repeatedly updated.