November 20, 2011

Understanding Jeuron

How Jeuron works

Jeuron is configured on a network as a series of interconnected instances, called nodes, which form a messagebus. Nodes connect to each other and can be setup to initiate connections to and listen for connections from other nodes. Each node can implement any number of initiators or listeners, and when nodes connect, they not only exchange their individual node names, but also exchange the list of nodes they know about. This allows nodes not directly connected to each other to exchange messages. Along with exchanging node lists, Jeuron also exchanges service lists. A service is an end-point on the messagebus that can receive messages. A service can be any POJO and is connected to the messagebus using a service adapter. A service adapter registers namespaces, which are used by the nodes to communicate with the services. Namespaces are simple strings that typically follow the package structure of your application, e.g. “com.mycompany.myapp.customer.ADD”. To communicate with a service, an application creates a message, sets the contents to whatever form of data the destination service expects (e.g. XML, bytes, Objects), sets the destination namespace property to the service’s namespace, sets the response namespace property to where the application wants messages returned, and puts the message on the messagebus. It is the messagebus’ responsibility to locate the service and deliver the message. Messages are returned by the service to the application using the namespace in the message’s response namespace property.