JION overview

JION ( JavaSpaces Implemetation for Opportunistic Networks ) is a JavaSpaces implementation that I have developed during the second year of my Ph.D. In fact, JavaSpaces technology was primarily designed to provide persistent object exchange areas (spaces) act as servers through which processes coordinate actions and exchange data; and this has remained its typical usage scenario. A server-based model is hardly compatible with the characteristics of D-MANETs as no host can act as a reliable server for all other hosts. A server-less JavaSpaces implementation must then be developed in order to provide JavaSpaces services in D-MANETs.
JION is a middleware that acts a critical level between D-MANETs and application levels. So all of services offered by D-MANETs will be moved from multiple instances into a centralized offering. This central provision of services makes the developers independent from D-MANETs challenges. Consequently, they could be able to develop their applications in less time and in a somehow standard way.

Web Template

JavaSpaces, coordination middleware, peer-to-peer computing, D-MANETs, opportunistic networking

Quick Links


Before you start using JOMS, you will need to download and install DoDWAN platform.


JION new features
JION v2.1.1 new features

JION v2.0.1 new features

JION v1.0.2 features


Web Template
Do you know?

What most application developers realize is that nearly all of middlewares developed for D-MANETs have only been described in purely academic papers as ABSTRACT algorithms, and tested using pseudo-code in SIMULATORS. Actually, These middleware has no real bearing or impact on the REAL WORLD.

One of my PhD's goals is to provide App developers with REAL middlewares which will help them to develop REAL applications that work perfectly over D-MANETs. Go for broke and see how easy it is to develop a real application in D-MANET using JION, hers is:
JION v2.1.1: binary files with depedencies, binary files without depedencies.
JION v2.0.1: binary files.
JION v1.0.2: Source files, binary files.


Getting started

Once you have downloaded and installed JION, you can start testing it using the console provided in the source code. Please notice that the console is located under JION/console directory.
If you are not familiar with JavaSpaces, then the JavaSpaces Service Specification from Apache River News is a useful guide. But, if you feel like you do not have time to read every thing in that specification and JavaSpaces sounded so much familiar to you, then I suggest you something else. Sit back, relax and give the following example some thought.


JION tutorial
Step 1: Import the required Packages
Step 2: Launch the Space service on the local host
JavaSpace space=JavaSpaceSingleton.getInstance();
Step 3: Writing an Entry on the space
// Instantiating your own entry
Entry entry= ...;
// Write the entry into the space
space.write(entry, null, Lease.FOREVER);
Step 4: Reading or Taking an entry from the space using a Template
// Create your own template
Entry template=...;
// Read a matching entry from the space, null, Long.MAX_VALUE);
// or Take a matching entry from the space
space.take(template, null, Long.MAX_VALUE);
Step 5: Notifying a client with a Event that has occurred
// Create your own template
Entry template=...;
// Register a notify request
space.notify(template, null, listener, Lease.FOREVER, null);


The Console

Have you found yourself daydreaming during reading theoretically nonsensical researches in D-MANETs?
Have you read a lot of such topics and still had problems to really grok that it is possible to see something real in D-MANETs?
So you need to have some image or reality back in your mind... Okay here we go. I have tested the previous tutorial in real conditions using a console provided with JION. The console’s source code is available at JION/console directory.

Attention: The console is only availabe for JION v1.


You can check the scenario in the following interactive figure: there are four devices which are pre-configured with JIONv1. Firstly, click on JION (The earth) to see how to use the Console. Then, you can click on each device to see the commands executed on that host using the console.

Step 1: Launch the console
java -cp JIONv1.jar casa.JION.console.TCPConsole
Step 2: Access to the console
// The port number could be changed using the configuration file
telnet localhost 8800

Congratulation! you can now use it. The following examples demonstrate how to use some of the console commands:

To see the full list of console's commands on any device, type:
js h
To write an entry with two fields "board=sports, topic=football" and TTL=999999 ms, type:
js write -e board=sports,topic=football -d 999999
To find all entries stored in the local space, type:
js list
To read an entry from the board=sports under the topic=sport and wait 999999ms for this operation until you have the answer, type:
js read -tmpl board=sports,topic=football -t 999999
To take the previous entry, type:
js take -tmpl board=sports,topic=football -t 999999
To register a notify request for all the changes in the board=sports for 999999ms, type:
js notify -tmpl board=sports -t 999999


Environment variables

If you do not have any background information on the environment variables in Java, I can suggest this link as a good place to start learning about them. Here you can found the list of the environment variables supported by JION:


API specification

Building an effective JION application requires you to read JION APIs. The documentations and API specification for JION are included in the source code, and can also be accessed online here.