Message participants
Let's imagine that I need to write a thank-you note to my friend Rusty because he gave me a ticket to a football match last week. We assume that we need to mail the letters to Rusty's office. In real life, sending emails to Rusty may be a more convenient and cost-effective way. That might be a more complicated example, and sometimes it would be more appropriate to write letters. So how many steps do I have to go through mailing a letter?
As you know, normally I need to write a thank-you note before I mail it. When I write, I need to mention the football game, because it would be very strange to write a thank-you note to a person for no reason. Next I will put the letter in the envelope, then write the delivery address and put a stamp on it. The final step is to put the letter in the mailbox, let the Postal service agencies to transfer the letter to Rusty. Imagine that Rusty will know that I wrote the thank-you note, and that I thank him for the football ticket.
When we describe the message participants, it is useful to map them to the role of the message-sending process. Typically, there are three types of message participants: The initial sender, the final recipient, and the mediator.
Let's imagine a more realistic business scenario-the order Processing system for Contoso's Boomerang company. Basically, the customer orders the boomerang on the website, and the site generates a message and sends it to other systems to process and complete the order process, as shown in Figure 2-1.
Figure 2-1:contoso the message flow back to the flying rod Company
Several facts implied in the scene:
The website and several other systems have already reached consensus on the message format.
A Web site can create messages based on previous formats
The web site knows how to send messages to other systems
The internal system can use the data area of the received message to populate the order, send confirmation information, and submit the order.
The Contoso Order Processing system has at least two message participants. The website is the sender of the message, and the internal system is the message recipient. There may also be a load-balanced route that is responsible for forwarding messages to the appropriate system. As shown in Figure 2-2, we can assume that routing is the Mediator.
Figure 2-2: Message flow in a message-routed Contoso back to flying stick Company