sillysky software labs

Messages

Messages

Messages are the most important instrument for communication between objects that are separated from each other, whether for reasons of encapsulation or physical distance.

A message in nyssr.net consists of an Envelope and a Record.

A nyssr.net message split into an Envelope for routing and control metadata, and a Record for the message ID and typed data slots
A message separates transport concerns from business data: the Envelope answers where?; the Record answers what?.

A message is directed, which means that it is always transported from a sender to a receiver. The sender address as well as the receiver address is part of the envelope. All other patterns like Observer, Notification, Services, Broadcasts and so on are based on this principle. Messages can be sent and received freely, they do not require any further infrastructure. For the reception of messages only a Java object is necessary, which was registered at a TargetRegistry of a Namespace (called a Target).

If the sender and receiver are located in different nodes, the messages are forwarded from node to node, until they reach the destination. Routing within nyssr.net is done via the channels to which the nodes are connected. The system chooses the route with the lowest cost (time).

Related Pages