pgo
pgo copied to clipboard
Registering data types with gob
archetype A(ref network) {
a:
network[LEADER] := [type |-> HELLO, messages |-> [log |-> <<>>]];
}
An archetype like defined above leads messages failing to be sent across nodes. Our mailbox implementation relies on gob for serialization, and gob requires the user to "register types" that it doesn't know about. In this case, we have a slice of interfaces.
PGo should recursively check the read and write types of archetype resources and register types appropriately (by calling distsys.DefineCustomType).