[cap-talk] OO interoperation via OCap, presentation level issues
Karp, Alan H
alan.karp at hp.com
Tue May 20 11:37:00 CDT 2008
Jed wrote:
>
> >The initial Client Utility protocol had such a bootstrap
> >mechanism. Negotiation was simple, "Initiator makes right."
>
> You lost me in the above. Can you explain what code handles
> such negotiations? Can you imagine Client Utility methods
> being used by Coyotos (or E or Caja or ...) programs?
> If so, how would that work? Do you believe this approach
> avoids the combinatoric coding problem that I'm concerned
> about?
>
There are two parties in the communication. The Listener waits for someone to connect; the Initiator makes the initial connection. In the protocol, the Initiator sends a single byte FF, and the listener responds with two bytes that describe such things as word size, endian, floating point format, character set, etc. (Recall that this was defined in 1997 when everyone was still using binary.) The initiator can choose to use those specifications in subsequent communications or simply walk away. That's what I mean by "initiator makes right." Next, the listener used those elements to describe the versions of the protocol that it supported. Again, the listener could choose one or walk away. Subsequent communications used a serialization based on these primitives. Capabilities were not specially designated but were treated as such because the API defined one at that point in the serialization.
The normal way to solve the combinatoric problem is to define an intermediate form that everyone translates to. In my experience, those become the lowest common denominator, in which case they don't cover all cases, or a kitchen sink, in which case they lead to untranslatable items. CU did not try to solve this problem. We simply said that it may not be possible for two parties to talk directly. If it was important enough, we felt people would provide translation services. Note, however, that you can get global communication if each of the M participants supports N serializations. While the scaling is multiplicative, it is linear for each participant.
________________________
Alan Karp
Principal Scientist
Virus Safe Computing Initiative
Hewlett-Packard Laboratories
1501 Page Mill Road
Palo Alto, CA 94304
(650) 857-3967, fax (650) 857-7029
http://www.hpl.hp.com/personal/Alan_Karp
More information about the cap-talk
mailing list