1

Design problem for multiple devices with no host

asked 2015-04-21 16:26:12 -0700

jnbrunet gravatar image

updated 2015-04-21 16:28:51 -0700

I have a system where there is multiple devices all running an alljoyn app with the bundled router. Every application is the exact same copy of the others, when we plug in the device, the app start and must discovers the other devices on the network. They also start to broadcast values at an interval of 500 ms.

The conditions are:

  1. Every devices run the exact same code
  2. They broadcast a set of values at an interval of 500 ms
  3. They must know about each other devices connected and receive the values (sent by #2)
  4. There is no dedicated server or host other than the devices (since they all run the exact same code)
  5. They run on dangerous material, the synchronization of the other devices values (sent by #2) is extremely important

I tried the following scenario:

Scenario 1

Implemented: When a device receives an about signal, it create a 1-1 session with the discovered device. Since they all run the same code, two sessions will be created between them (the other device discovers this device as well, so it create a session too). We broadcast the value using ALLJOYN_FLAG_GLOBAL_BROADCAST with 0 as the sessionId (to broadcast to all opened session).

Problem: At about 7-8 devices connected, the session creation start to fail and the already started session are lost randomly.

Scenario 2

Implemented: When a device receives an about signal, it joins a multipoint session with the discovered device. In this way, a device host a multipoint session and the other devices join this session to received the values. Since they all have the same code, we got n multipoint sessions in a system of n devices. We broadcast the value using ALLJOYN_FLAG_GLOBAL_BROADCAST with 0 as the sessionId (to broadcast to all opened session).

Problem: Same as the first scenario, at about 7 or 8 devices connected, the session creation start to fail and the already started session are lost randomly.

Scenario 3

Implemented: No session are used. We broadcast the values using the sessionless signal.

Problem: Now we are capable of connecting more than 8 devices, but the values sent at 500 ms of interval are received with a delay between 1 and 20 seconds by the other devices, which is very dangerous in our case.

What would be here the good way to use Alljoyn for our problem?

Thank you for your help!

edit retag flag offensive close merge delete

Comments

Could you update your question to describe the networking environment when sessions are randomly lost?

stevek ( 2015-04-24 09:35:18 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-04-24 09:34:33 -0700

stevek gravatar image

Have you tried just setting up a single session between each device and sending session cast signals? If not, this is how I would try it:

  • Everybody advertises using About and each device has a unique device ID
  • When a device receives an About message, it compares the device ID in the About message with its own.
    • If the remote device's ID is greater than the local device's ID, then the local device joins
    • If the remote device's ID is less than the local device's ID, then the local device waits for the remote to join
  • When a device sends its signal, it sends that signal over all the sessions it is a member of (either joined or hosted) by looping through the list of sessions.

I'll try to update this response regarding lost sessions if you can update your question with more information.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
3 followers

Stats

Asked: 2015-04-21 16:26:12 -0700

Seen: 64 times

Last updated: Apr 24 '15