Currently, sms usage is crucial for humanitarian tasks in the field (see Ed links). Due to this concern, we are working in a mesh4x adapter for sms that allows two-way synchronization of arbitrary data over basic cell phone SMS. Following this direction, in collaboration with JavaRosa, an OpenRosa java implementation which supports XForms for J2ME, we have migrated Mesh4J to J2ME and an experimental version is available here: Mesh4j2me Demo.

The main idea is to provide multi-node XForms editing and sharing on mobile phones (a.k.a. mesh ;)). Imagine the following scenario:

The server is receiving data from multiple mobile clients.

The user enters data on his phone (using JavaRosa XForms).

Upon synchronization, the mobile client updates its local data by merging the the latest changes from the server via an HTTP data connection, and the new local data is pushed to the server the same way.

Cool! You could share your information with other people in the world. Your data is stored in a centralized server (but which can also be just a node in another mesh!), so you can also view your data from a PC if you want.

Important: You don't need to develop special code for sync, just use the provided Mesh4J2me library.

But, what happens when you do not have an Internet connection but still need to synchronize information in a peer-to-peer fashion? Isn't that the whole point of "mesh"?

Now, we can imagine the following scenario:

Mobile1 - User enters data

Send data from Mobile1 to Mobile2 using sms (with a different adapter this time)

Mobile2 – The data is merged locally executing the sync algorithm

The magic is done! Mobile2 - User has the information available locally in his device.

Cool,... sounds great, but...., Sms is not a reliable channel, messages can be lost and arrive not necessarily in the same sequence they have been sent. FeedSync is an XML-based format and it can be very long. How does Mesh4X manage those issues?

The adapter we mentioned above, called the SmsAdapter, defines an asynchronous protocol that provides a reliable connection; the main goal is to ensure that all the messages will arrive, each data is expressed as XML, it is compressed and split in a batch of messages with sequence ordering, and only when all the messages have arrived the XML is regenerated and the next protocol step is executed. Retries are used for re sending lost messages.

The protocol is based on Rsync ideas to send only the differences in data between the mobile phones.