0

How to realize 1 client to multiple server network

asked 2014-12-25 17:25:56 -0800

redglass gravatar image

Dear All; I am a newbie for Alljoyn and just stared learning on it. My target is to make a sensor network, one client to monitor, serveral node to measure data. Am I right to realize the design as below? 1. Every node(Server) Advertise "same service name" + different ID 2. Client use find mBus.findAdvertisedName("same server name") to discover all nodes, and can get different name+id. 3. Client joinSession to differnt nodes name with different port(random arrange port number) and session ID 4. Client create different Proxy for each node with different sessionID 5. Use the different Proxy to get the data from different node.

Thanks a lot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-13 13:19:49 -0800

bspencer gravatar image

updated 2015-01-13 13:20:39 -0800

What you have is one way at which you an use the legacy method of AdvertiseName. What I would propose is that you issue the following:

1) Every sensor device use the About Feature to advertise presence.

2) Client applications discover the capabilities and have can identify the sensor devices as unique ones based on deviceId field and/or the different interfaces supported (if you have multiple sensors with different capabilities then you should have different interfaces to define the capabilities of the sensor).

3) To pull data

3a) JoinSession to acquire a sessionId

3b) Create a ProxyBusObject to make method calls

3c) Call methods

3d) Disconnect

If the data that you are using is not that frequent (IE once every 3-5 minutes) you may wish to consider using a Sessionless Signal instead of needing to explicitly join and call a BusMethod.

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

Question Tools

Follow
1 follower

Stats

Asked: 2014-12-25 17:25:56 -0800

Seen: 151 times

Last updated: Jan 13 '15