• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multipeer Networking for groups > 8?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multipeer Networking for groups > 8?


  • Subject: Re: Multipeer Networking for groups > 8?
  • From: David Hoerl <email@hidden>
  • Date: Wed, 12 Jul 2017 11:03:06 -0700

Andreas,

Thanks so much for your response! The desired solution is targeted at an environment that currently uses "Firebase". The problem now is that if the iOS devices lose internet access, the whole network goes down.

The application is as follows. A few up to say 16 iOS devices need to communicate to each other to keep all devices synced to a distributed data set - something that changes over time, but doesn't require a lot of bandwidth. A contrived example: a local farmers market has a standalone WIFI network. At a very slow rate, new sellers show up, and some leave. When a new seller shows up, their iPad goes on line, uses Bonjour to find all other sellers on the network.

Every seller is assigned a Bonjour address (broadcast name) that fits a pattern so other devices can periodically poll for all devices and notice a new one has appeared (or gone away).

Each seller sets up a connection to every other seller, and every sale is known by every other seller. When a new seller appears, it uses some heuristic to have one of the other sellers inform it of all sales made that day. Thus, after a short period, everyone knows every sale everyone else made.

One seller's iOS device could fail (or run out of battery power) and be replaced. It would be replaced by a spare device with the same Bonjour name as the previous device.

Each iOS device needs to use some guaranteed delivery protocol, but the data rate is low. TCP could be considered overkill as the data payload size is probably low relative to WIFI speeds.

Multicast doesn't really seem a good solution since data packets should not get "lost" - it would be more efficient, and I suppose I could provide some capability to deal with lost data. It would seem trading one headache for a different kind of one.

Multipeer Connectivity would be great if it handled 24 peers (and gee - it is just me or does a peer group of no more than 8 seem a bit limited?)

David

On 7/11/17 11:22 AM, Andreas Fink wrote:
Of course you can use a IP multicast using UDP but you have to do it by hand.

SCTP point to multipoint might be an option but Apple lacks support of SCTP by the kernel. There' a OS X kernel driver adding it but under iOS you are again in dead water. Furthermore the API to load a layer 4 protocol under xnu is kerne specific and there is no "public" API yet (I wonder if this will change in 10.13 given some networking stuff ends up in userspace I read)

It sounds easy to use UDP but at the other hand with all networking, it _sounds_ easy but really is hard due to changing network interfaces, unreliable communications etc. I've wrapped a lot of network code directly from unix calls to my own objc library (https://github.com/andreasfink/ulib) but multicast I never had the need yet. If theres good demand I might add it. RUDP goes into this direction but you would have to do some work to make it multicast capable. What kind of high level API where you looking for and what is really the dataflow?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Multipeer Networking for groups > 8?
      • From: Jens Alfke <email@hidden>
References: 
 >Re: Multipeer Networking for groups > 8? (From: Andreas Fink <email@hidden>)

  • Prev by Date: Re: Multipeer Networking for groups > 8?
  • Next by Date: Re: Multipeer Networking for groups > 8?
  • Previous by thread: Re: Multipeer Networking for groups > 8?
  • Next by thread: Re: Multipeer Networking for groups > 8?
  • Index(es):
    • Date
    • Thread