|HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT|
A participant is interacting with multiple, independent services, which change their state based on the interaction. Some of the interactions may fail.
How can a requestor ensure a consistent outcome across multiple, independent providers?
The consumer performs a Tentative Operation, and confirms it later, possibly after it interacted with other services.
The Tentative Operation conversation involves the following participants:
Tentative Operation comes in two variants:
Tentative Operation with implicit cancellation is similar to Lease, except that it is a one-time confirmation, not a periodic renewal.
Expressed as a state transition diagram, Tentative Operation consists of 3 states: initial, reserved, and confirmed [REST].
One major aspect of this conversation is whether the Confirm operation can fail. If success is guaranteed, the provider's implementation of Tentative Operation resembles that of Compensating Action as the Tentative Operation has to allocate all required resources. The only difference is then in the conversational aspect: Tentative Operation require explicit confirmation and implicit cancellation while Compensating Action has implicit confirmation but explicit cancellation.
Not all service providers support Tentative Operations. Tentative Operations complicate the conversation. If Tentative Operation is not available, a service consumer should attempt to PERFORM MOST LIKELY TO FAIL ACTION FIRST and/or PERFORM HARDEST TO REVERT ACTION LAST to minimize the risk of ending up in an inconsistent, not not reconcilable state.
Tentative Operation can cause yield management issues for the resource provider because many customers may cancel tentative resource allocations they previously made. If there is not penalty for cancellation, requestors are incentivized to perform the Tentative Operation first in a services of operations, following the PERFORM HARDEST TO REVERT ACTION LAST pattern. This can lead to a large volume of Tentative Operation and subsequent cancellations. Many real-life providers have hence setup cancellation charges or incentivize requestors to perform firm operations with reduced pricing.
Example: Travel Booking
A traveler needs to book a hotel and a flight for a trip. Both resources are provided independently by different providers. If a hotel is not available for the flight dates, the customer needs to change the flight reservation, which may incur penalties. Therefore, the customer may ask the airline to “hold” a reservation without submitting payment, so he can confirm the availability of a hotel. Once the hotel is guaranteed, the customer will complete the purchase of the airline ticket and submit payment. If the customer does not confirm the reservation within the agreed-upon time window, the airline with cancel the "hold".
Holding reservations incurs a cost to the airline, partially compensated by yield management, i.e. confirming more seats than are actually available. Airlines therefore encourage customers to use Compensating Action by offering lower prices on early firm bookings. Canceling such bookings usually carries a heavy penalty.
|© 2003, 2017 • All rights reserved.|