A Code ID is computed as an MD5 checksum over the actual code, as an byte[] array. (Called a MethodID or mid in the code, probably should be called a 'CapsuleID'.) A Group ID is computed by taking the (capsule) code ids, sorting them, and computing an MD5 checksum over it. A ProtocolID is computed by taking the (code) group ids, sorting them, and computing an MD5 checksum over it. Note: A protocol ID can be computed even if only one code group was transmitted (using DLResponse/DLRequest) because any DLResponseCapsule contains *all* GroupIDs for the Protocol! A Method ID is computed by sending a Code ID, its Group ID, and its Protocol ID through MD5, in that order. Thus, a method ID describes a triple (Capsule_i, Code Group_j, Protocol_k). NOTE: It is the Method ID that is sent in the header of a capsule. It is hence the basis for demultiplexing. --------------- Format of DLRequest: offset len type 0 16 TypeID Code ID that I want code for 16 4 int bit vector for parts of CodeGroup that I don't have already -------------- Format of DLResponse: offset len type 0 16 TypeID Code ID of contained code chunk 16 16 TypeID CodeGroup ID 32 2 short # l = of groups in the protocol 34 16*l TypeID[] code group id of other "groups" in the protocol 4 int "part"th code part this capsule includes 4 int "clen" -- total length of code ? String _cn - Name of capsule class ? ByteArray chunk of byte code -------------- Activities performed by DLThread - unknown capsule received - create DLBootstrap - first time? -> make entry in code cache - create and send DLRequest - DLRequest capsule received - service for other nodes - DLResponse capsule received - find target method - retrieve or, if necessary, create code group - add method to group - allocate byte array for code the first time - copy code part into code - if all done, activate code group - compute code ids - compute protocol id