We're going to look at a fun example. This is
me, and I'm going to India for Christmas holidays. And
I'm going to make an airline reservation. I'm going to
use Expedia to make the airline reservation. So what I'm
doing on my computer, I'm sending a message to
Expedia, saying, hey, make a reservation for me. And Expedia
chooses to make the reservation using Delta, so it sends
a message. a to b is a message that I
sent to Expedia saying I need a ticket to
go to India, preferences, and so on. Expedia then
sends a message to Delta booking the reservation that
I want. Delta confirms by this message, e to
f, that yes, Kishore's reservation is in. And once
Expedia has received this confirmation from Delta, it sends
me a message, g to h. And this message
is telling me that I've go the airline reservation booked.
So all of these are messages. a to b is
a message, a is the sending of the message, b is
the receipt of the message. And c is the sending
of the message from Expedia to Delta. e is the confirmation
that my reservation is in from Delta to Expedia and
finally g to h is the message from Expedia to me
saying that yes, you have your reservation, you can go to
India in December. That's good. And then, what I'm doing is,
I'm directly contacting Delta, message from me, me to
Delta, asking for my preference for food. Fortunately, it's
an international trip, so I'm going to get a
little bit more than peanuts on, on the Delta
flight to India. So I sent a message asking
for my meal preference and Delta confirms that yes,
you have your meal preference. That's the message k
to l, is the message that confirms that I have
my meal preference, I'm all set. So everything
that I've described here is what you probably do
on a routine basis, every time you're making
any travel plans. Either contacting Expedia or some other
web portal to make your airline reservation. All
of this makes logical sense, right? There are several
beliefs that are ingrained in this picture here
about the ordering of events in the distributed system
that makes all of this work. In particular, when we look at the set of events
that you're seeing here as events that I'm
responsible for, we think that these events are happening
in sequential order. So for instance, if you
look at what Expedia is doing, it is receiving
my message saying that I want an airline
reservation to be made, does a bunch of bookkeeping.
Then sends this message over to Delta saying that well,
go ahead and make this booking for him, gets the acknowledgement
back from Delta. And then it does a bunch of
other bookkeeping, once it gets the acknowledgement from from Delta and
then it tells me that, okay, you've got it. And
after that, it does some more bookkeeping to say that, well,
you know to show if booking is done and I'm
going to make some internal notes on the details of this booking.
And so those are all things that are happening
as events within Expedia. So the beliefs that we have
is that processes are sequential, that is, the events
that we see happening in a given process, these are
the events that are happening in a given process,
we expects these events to be totally ordered, right? So
for instance, you wouldn't expect given this ordering of
events, that you see in Expedia's profile that this event
m happened before sending this message c. Right?
So that's the mental model that you have,
that events are totally ordered within a single
process, and that's why we're calling process sequential.
That is, the execution of a process is a textual order that you see. At least
the apparent effect of the execution of the
process that you, as a user, experience is sequential.
So if I look at this particular process, h happens before i,
f happens before g, and d happens before e, so all of these
are things that are ingrained in our mental model of processes being sequential.
The other belief is that you cannot have a
receipt of a message before the send is complete, right?
So you have to send the message before it can
be received. In other words, the receipt of a message,
which is b here, has to happen after
the messages are being sent from here. Similarly, this
message reception f must have happened after the
message was sent from Delta. So those are the
core beliefs that we have about what is
happening with events in a distributed system. That events
within the process are sequential. And across processes,
when you have communication events, send happens before receive.
So these are two core beliefs that we have about the working of
a distributed system. And we call
these beliefs, as they happened before, relationship.