Enterprise Integration Patterns
Conversation Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Conversation Patterns
Renewal ReminderConversation Patterns » Resource Management

A provider engages in long-running conversations with multiple partners. Each of these conversations requires the provider to allocate resources.

How can a service provider avoid holding resources for clients who are no longer interested?

Have the provider periodically check whether the requestor still requires the resource. If the requestor answers "no" or is unreachable, the provider relinquishes the resource.

The Renewal Reminder conversation involves the following participants:

Renewal Reminder consists of multiple Asynchronous Request-Response conversations, one initiated by the Requestor and recurring instances initiated by the Provider. For both occasions, the participants may use Request-Response with Retry. Especially for the Ping message, through, retry counts will be low as its purpose is to detect unresponsive Requestors.

Renewal Reminder gives the provider more control but also burdens it with more house keeping. In the flip side the consumer can be simpler as it does not have to track the expiration of the lease or initiate renewals. It does, however have to be able to respond to incoming request messages to process the Ping message.

If resources are plentiful, this conversation can result in very low traffic as the provider will have little need to ping requestors. As the provider gets into a space crunch it can react by pinging, hoping that some clients are no longer present or no longer need their resource.

If a client is unreachable, the Provider can decide to retry the request or relinquish the resource on the spot. This can leave provider and consumer in an inconsistent state: the consumer, not aware that the provider tried to contact it, might be under the impression that the resource is still available whereas the provider has already cancelled it.

Generally, Renewal Reminder exhibits more coupling between participants than : the provider has to track all requestors and their addresses as message exchange occurs in both directions.

Example: Magazine Subscription

In this case the provider is eager to have the requestor renew the resource because it is paid. It uses the Renewal Reminder conversation but with a Request-Response with Retry conversation for the Ping with often an (annoyingly) high retry count.

Related patterns: Lease, Asynchronous Request-Response, Request-Response with Retry


Creative Commons Attribution License

You can reuse the following elements under the Creative Commons Attribution license: pattern icon, pattern name, problem and solution statements (in bold), and the sketch. Other portions are protected by copyright.