Friday 6 July 2007

not much time,

Just to say what is a protocol: a user-level (or application level) protocol, such as a financial protocol, is a predictable sequence of interactions among participants.

Since it is predictable it has some structure. This structure is articulated not at the level of e.g. packet switching (such as description of TCP as a system-level protocol) but at the level of high-level interactions.

A very simple protocol is a remote method invocation: in fact a local method call may already be regarded as a protocol. It has the following structure: there are two guys, say you and another person. You call the other guy, and you get a result (or an exception) from him/her.

So there is first one-way message from A to B: then there is another one-way message from B to A.

Well not only that: this second message is received by A with the understanding that this reception is understood to be the return associated with the first message.

That is A knows that this second message is in the same conversation as the first one was in.

Well this is one of the simplest forms of non-trivial conversation: you ask, and you get an answer.

The type structure associated with this special form of protocols is called signature. We recall: it is two-party interaction, one calls and the other returns. That's how this protocol is. Very predictable.

Well in fact it has a bit more: an object (or associated class) can have multiple methods: in that case you can invoke with different methods. That is also part of this protocol: you can call the other guy with one of the different options (with arguments), and the other guy reciprocates it with her/his own message, which consists of a single value.

Of course in real computation you use a lot of method calls: .but we are content with having a single method --- or a collection of methods for a class --- as a basic static structure for sequential computation.

Why so? We did say something about this the day before ---- and yes it is related with sequentiality in computation. But we need to further explore this point in the next post (I am sorry I am trodding with the pace of a tortoise, today is not the best day for a jump).