Software
JIPC (Java Interprocess Communications)
JIPC provides a simple implementation of the publish/subscribe communication model in Java. It provides a similar interface to IPC. JIPC was fully developed on Java and extended for multi-robot and multi-user applications. Some of the issues why we implemented this JAVA implementation are:
- Platform-independent: The Web User Interface is, for most of the applications, a Java applet in a web page that can be started from any web browser. JIPC is fully developed in Java and can also be used for android applications.
- Multi-robot: Most of the publish/subscribe IPC mechanism are broadcast. Modules subscribed to a kind of message will receive all the messages of that kind that any module publishes. This is a nice feature when thinking of a single robot control. However, due to the symmetry of the multi-robot multi-user framework, a problem arises when dispatch wants to send a command (such as go to point A) to only one robot, since all the robots will get the message.
- Multi-user: Again, because of the broadcast nature of messages in many IPC systems, a GUI could not subscribe only to messages from one robot. For example, if it subscribes to the laser message, it will get the laser messages of all robots.
- Polling mechanism: To use the user interfaces behind NAT mechanisms and solve the private/public connectivity problem.
- Requirements
Java 9+
- Download
You can download the latest version here
- Install
To install JIPC you should:- Create the workspace directory (example ~/jipc_ws)
- Uncompress the downloaded file in the workspace directory
- Add the class directory (example ~/jipc_ws/JIPC/class) to the CLASSPATH evironmet variable
- Running
After installing the system as described in the previous section, you should be able to use the JIPC-1.0.jar library in your project as in the examples provided here . Remember to execute jcentral before your modules. For testing purposes, we include a publisApp and subscriberApp. The scripts should be available in the bin directory (In our example~/jipc_ws/JIPC/bin). It will be necessary to execute:- jcentral that is the central node that controls all connections:
~/dgp_ws/DGP/bin$ ./jcentral
- A subscriber that is a module that connects to jcentral and subscribes to topic "hello".
~/dgp_ws/DGP/bin$ ./subscriber
- A publisher that is a module that connects to jcentral and publishes every second a message to the topic "hello".
~/dgp_ws/DGP/bin$ ./publisher
- jcentral that is the central node that controls all connections:
- Example
JIPC provides two different interfaces with a variety of handlers that can notify many events such as the conexion of a module to the system, etc. Examples about the use of those interfaces to connect and publish broadcast and unicast messages are provided here .