Skip to content
sanity edited this page Mar 14, 2011 · 18 revisions

Tahrir's messaging framework is responsible for sending, receiving, and responding to messages transmitted between peers across the network.

Tahrir's approach to messaging, like all of Tahrir's building blocks, is intended to make it as easy as possible for more sophisticated functionality to be built on-top.

To achieve this, as with Tahrir's serialization mechanism, Tahrir is unafraid to make full-use of Java's reflection functionality, to make life as easy as possible for users of the messaging framework.

Tahrir's approach is similar to the RPC implementation used in GWT. Dynamic proxy classes are used to allow messages to be sent to remote Tahrir nodes just by calling a method, as if it was a local object.

We do impose some restrictions on the types of methods that can be called, for example, they may not return values. This avoids any requirement to have threads waiting around for responses. Instead, a remove Tahrir node may respond by calling a method on the local node. It is possible that this will change in future as it may be a premature optimization.

See here for the source code. Note: Currently incomplete.

Clone this wiki locally