Realtime P2P communication between mobile devices

fernandohur picture fernandohur · Aug 21, 2012 · Viewed 20k times · Source

I am building a mobile device that needs to send realtime information to other devices. I have considered XMPP but I do not have a server, so the communication must be only between the devices.

Is there a way to communicate using XMPP between mobile devices without a server (Or using the mobile devices as servers)?

Is Sockets a good idea ? i.e. Having a ServerSocket and client Socket and communicating this way.

Is there a smarter way? I have heard of jWebSocket but I dont really know how it works or if it's worth it.

EDIT

The process is as follows:

  1. I'm using Parse as a server/backend http://parse.com
  2. When the user runs the app, a user list is retrieved from the parse server
  3. The user then has (Could have) the ip of other clients and then attempt to communicate with them.

Problems
1. Parse does not support a XMPP server or other type of servers

Answer

Chris picture Chris · Aug 22, 2012

You might look at using an IRC client library like http://jerklib.wikia.com/wiki/JerkLib_Wiki. This way you can use a public IRC server to communicate with your other devices...

I've not used it, but I did bookmark it for further reading because I thought it a novel concept ...

I hope it helps...