[Thali-talk] Thali for Android

Yaron Goland yarong at microsoft.com
Mon Jul 20 17:12:59 EDT 2015


We do plan on eventually building the high latency mesh but it’s not going to be in the next several months. We have a lot of work to do to build our basic infrastructure first. But we are happy to have you use BtConApp. We are still actively working on it.

The one thing you might want to consider is that wi-fi direct discovery seems to not work terribly well. It can take several minutes for devices to find each other in some cases. We still aren’t clear why. My hope is that it’s some bizarre bug that the right arguments will make go away but I’m not holding my breath. We will also be adding in BLE support (which only works on very modern Android phones) which we will hope will do discover better. But if we do add it in you should get it “for free” as part of BtConApp who will likely support both mechanisms.

Obviously we would love to hear about the work you do on your high latency mesh on top of us. If it’s open source with a MIT compatible license then we will happily look at stealing it. ☺

               Thanks,

                              Yaron

From: Anthony simonigh [mailto:anthony.simonigh at gmail.com]
Sent: Monday, July 20, 2015 1:34 PM
To: Yaron Goland; thali-talk at thaliproject.org
Subject: Re: [Thali-talk] Thali for Android

Hi Yaron,

Thanks for all these precious informations and sorry to answer  so late.
We refine our project in a  rescue system composed of an centralized app ( rescue server) to coordinate operations and smartphone app (rescue companion) which sends position,  through predefined messages, to the centralized one.
So what we need is a high latency mesh : Companion wants to send message to the server, if it can't see it he gives a copy to others companions. Then if others companions can't see server they will give a copy to others etc,  until the message arrive to server.

To achieve this goal, we need to :
- send messages to devices without interaction of the user. BtConApp seems to permit that but only between two devices.
- use simultaneous connections to broadcast messages
- use an opportunistic routing protocol for mesh networks
- run companion app as a background service on  an Android stock rom.

 I intend to built a layer over BtConApp which permits to manage simultaneous connections and route messages to the server.

I hope that everything is clear despite my basic english.

Best,

Anthony


2015-06-30 0:20 GMT+02:00 Yaron Goland <yarong at microsoft.com<mailto:yarong at microsoft.com>>:
Hi Anthony, there are two questions in your email so I'll address them separately.

The first, and I suspect most important, question is - does Thali support some kind of relay capability? In other words if user A wants to send a message to user C and they aren't in range can user A send the message to user B who will send it to user C? In other words, are we creating a mesh?

To answer that first question we have to recognize the two different kinds of mesh, high latency and low latency.

Most folks when they say 'mesh' mean low latency. In other words, user A would expect to, real time, relay bytes via user B to get to user C. This only works in scenarios where everyone is close to each other. Right now we have no plans to support low latency meshes. The reason is that we are right now focused on battery operated devices and with modern batteries trying to run a low latency mesh isn't really feasible. In all but the most limited circumstances one's battery will get eaten.

The other flavor of mesh are high latency meshes. These are really just store and forward networks. In this scenario user A would give a copy of their messages for User C to user user B. User A is hoping that User B will see User C before they do. This can be thought of as a variant of a gossip protocol. We are thinking about potentially supporting this in Thali but we have done no work on it yet. The main thing we are trying to figure out is how useful it would be in the real world. Are people really in situations where they have enough intermediaries to make it worth it?

For right now we only support 1:1 replication. And how we support that replication actually takes us to your second question.

The second question is - do you have to use Cordova?

The answer is no, but it is trickier than that. Thali's "native" runtime is node.js. All the work we did in Android (and iOS) are to build native libraries that then plug into our node.js runtime (JXCore) where they can be used.

At the moment the way we put node.js on the Android phone is by using a cordova plugin. But that is absolutely not a requirement. We will be refactoring it so that it can run as a stand alone node.js instance that you can call from your Android app and talk to over localhost. But we are a few releases from doing that.

The reason why we use Node.js is because that is where we run PouchDB, a Javascript implementation of CouchDB. That is our database and we use the CouchDB replication protocol to let us replicate content between two users.

So, for example, if users A, B and C are all working in the same DB then user A can make a change to that DB locally, synch those changes over to user B who can then synch those changes over to user C.

I know that sounds like a high latency mesh and in a sense it sorta, kinda, is. But typically in high latency meshes users transfer data for other users without knowing who the user is or what the data is. In our model data is only shared between people who have chosen to work in the same DB and where folks have access to that DB.

Now, just in case this email hasn't made your head explode yet, we will be adding in ACLs and using them for filtered replication. So, for example, User A could add in a message to the DB intended for user C but not user B. In that case when User A synchs with user B, user B won't get that record. But this means that user C won't see the record until they are able to directly synch with User A since the ACLs prevented a copy from going to User B. Hence why I don't really call this a low latency mesh.

Did any of that actually make sense or did I just confuse you even more?

Thanks,

     Yaron



________________________________
From: Thali-talk <thali-talk-bounces at thaliproject.org<mailto:thali-talk-bounces at thaliproject.org>> on behalf of Brian Lambert <blambert at microsoft.com<mailto:blambert at microsoft.com>>
Sent: Tuesday, June 16, 2015 7:40 PM
To: Anthony smgh; thali-talk at thaliproject.org<mailto:thali-talk at thaliproject.org>
Subject: Re: [Thali-talk] Thali for Android


Hi Anthony,



Thanks for your note.



It turns out that the author of BTConnectorLib, who would be the most helpful person to respond to this for you, is on holiday this week.



We’ll make sure he sees this message upon his return and he’ll get back to you then.



Best,



Brian Lambert



From: Thali-talk [mailto:thali-talk-bounces at thaliproject.org<mailto:thali-talk-bounces at thaliproject.org>] On Behalf Of Anthony smgh
Sent: Tuesday, June 16, 2015 6:17 PM
To: thali-talk at thaliproject.org<mailto:thali-talk at thaliproject.org>
Subject: [Thali-talk] Thali for Android



Hello all,



I make studies at CNAM Toulouse in France and as a part of a school project i would like to develop an android app which allow to notify user about danger or people in danger particularly  when no network infrastructure is available.



I researched about messaging over an wireless mesh network using Wifi-Direct on Android and I recently found Thali project which seems to have all features needed for my project . I read the documentation at http://thaliproject.org/ and https://github.com/thaliproject/ . I tested BTConApp and everything works great between two devices.

Now, i would like to use Thali with more devices (> 3 ) in order to see how messages travel on the mesh network .

I don't understand clearly if i  shoud use BTConnectorLib or Cordova plugin and if Thali offers already  any routing capabilities or not yet. Can you tell me more about that ?



Thanks for sharing your work.



Anthony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist10.pair.net/pipermail/thali-talk/attachments/20150720/18d0b4f3/attachment-0001.html>


More information about the Thali-talk mailing list