Enterprise Integration Patterns
Conversation Patterns
Conversation Patterns
Introduction to DiscoveryConversation Patterns » Discovery

Conversations occur by multiple conversation partners exchanging messages. Identification of the conversation participants is a necessary precondition to any conversation and occurs at two levels:

To get a conversation started, the conversation initiator must identify the instance of the conversation partner that it will send a message to. Typically, the participant addresses should not be hard-coded, but the initiator should identify the best participant to talk to. We call this process Discovery. Designing Discovery revolves around the following considerations:

Based on these considerations we discuss the following Discovery patterns:

In typical systems, a combination of these Discovery patterns is common, driven by different numbers of participants to be discovered and different rates of Discovery. For example, directories may Advertise Availability to announce their presence so that they can subsequently support Consult Directory. This works well because the number of directories is small compared to the number of Discovery requests. Alternatively, participants may use Dynamic Discovery to discover directories and then engage in Consult Directory. Once a participant has discovered an initial conversation partner through Consult Directory he may be receive a Referral to related services.

Using see Intermediaries pushes the need for Discovery to the intermediary so that conversation initiators do not have to deal with it. The identity of the intermediary may be hard-coded so that no discovery is needed to start a conversation with the intermediary.

Reference: Pattern Language for Service Discovery in [PLoPD5].

Reference: [POSA3]