Jump to: navigation, search

Marshaling functions and statements are intended to make it easier to transfer data between server processes, or client and server. Data is marshaled to a buffer (currently we use strings); the buffer is transmitted and received; then the data is unmarshaled back out of the buffer.

As an alternative to sending marshaled node data, Replication is more efficient and allows Bandwidth Control.


To support client/server communication, fields are identified by name in the marshaled buffer. When unmarshaling, each field name in the buffer is looked up in the class or node. If the fields are not of a compatible type, it is a runtime error unless suppressed by the function parameters. Fields that are not present in either the buffer or class/node are ignored.

With either fields on a node or a value in script, marshaling and unmarshaling handle all of the possible types except RawData, Timer, and Association. Fields of unsupported types are ignored during marshaling. NodeRefs are a special case explained below.

Marshaling deals with NodeRefs by "shallow copy". This means that only the ID of the node for a NodeRef field is saved. Nodes are not created by unmarshaling. It is the caller's responsibility to create the node(s) before unmarshaling.

See also

Personal tools