Tracking XPRISO Messages

XPRISO is the messaging protocol used by InfoGrid to keep distributed information consistent. The acronym stands for “eXtensible Protocol for the Replication, Integration and Synchronization of distributed Objects”.

The current version of InfoGrid uses XPRISO mostly for communication between an application’s main NetMeshBase, and the ShadowMeshBases that track (“shadow”) external data feeds.

Sometimes it is really useful to track XPRISO messages.The simplest way o track all XPRISO messages in your application is this:

  1. Determine the classes that your application instantiates that implement the NetMeshBases communicating via XPRISO. For example, that might be and org.infogrid.probe.shadow.m.MShadowMeshBase, or perhaps and
  2. Set their logging level to INFO.

This might be as simple as adding the following two lines to your file:

Voilá, all XPRISO messages are written to your logger. (Some detail is omitted to make the log readable.)

Here is an actual example:

INFO  2009-10-12 15:32:14,992 [pool-1-thread-1] (
 @ org.infogrid.util.logging.log4j.Log4jLog.logInfo:152
    route: http://localhost:8085/app1/ -> http://localhost:8085/app2/, requestId: 1255386734969

INFO  2009-10-12 15:32:15,018 [pool-1-thread-2] (
@ org.infogrid.util.logging.log4j.Log4jLog.logInfo:152
    route: http://localhost:8085/app2/ -> http://localhost:8085/app1/, responseId: 1255386734969
        id: http://localhost:8085/app2/

Here, the first NetMeshBase asked the second for an object, and promptly got a replica in return.

If you don’t like the logging format, or want to log them differently, you can use your own XprisoMessageLogger simply by invoking setXprisoMessageLogger on the NetMeshBase whose messages you like to track.