Skip to content
laforge49 edited this page Apr 22, 2012 · 4 revisions

Jid trees are composed from Jid Actors (actors which extend the Jid class), with the root node of the tree always being an instance of the RootJid class. The internal nodes of a Jid tree are always instances of a subclass of ActorJid, TupleJid, ListJid or MapJid (or the instances of these classes). While BooleanJid, IntegerJid, LongJid, FloatJid, DoubleJid, StringJid and BytesJid are always leaf nodes. RootJid, ActorJid, TupleJid, ListJid and MapJid all serve as containers for one or more Jid actors, and only instances of RootJid do not have a container.

A Jid tree can be serialized to byte arrays that can be written to disk or passed to another program and subsequently deserialized back into a Jid tree with equivalent content.

The objective of the JID project is fast updates, where a byte array is deserialized into a Jid tree, which is then modified before being reserialized to a byte array. Deserialization then is only done incrementally on the parts of the Jid tree which are accessed and, when reserializing, the serialized form of the unmodified portions of the Jid tree are reused.

###Navigating a Jid Tree

The ResolvePathname request is supported by all Jid actors and is used to navigate down the tree. I.E. Only relative pathnames are supported and .. is not supported. Pathnames consist of a series of names separated by '/'. The empty string, "", is used to designate the Jid actor which received the ResolvePathame request.

The names used in a pathname are generally numeric, with "0" being the name of the first actor in a container. The exception here is MapJid, where the keys are used as the names for the values in the map. (An ActorJid holds, at most, one actor and the name for that actor is "0".)

Up: Home Next: JidFactories

Clone this wiki locally