Entities B and C interact in the same way. These two factors turn out to be very important in distributed systems. For our agent communications, I've decided to go with the mailbox mechanism. First, the mailbox method avoids hiding the flow of execution. In a distributed system, with processing often spread across a number of machines in a network, tracing the flow of execution is already difficult.
Callbacks only make it more difficult.
Second, agents are, by their very nature, autonomous, independent, distributed software entities. In a network environment, with its inherent delays, agents can't afford to wait around for something they need at some future point. While there are other reasons why I believe the mailbox mechanism is the right choice for the job, I think the previous two are the most compelling. Before I move on, let's take a look at how the mailbox mechanism will work within our agent environment. First, the sending agent creates a message containing the arguments it wishes to pass to the recipient agent.