Fully peer-to-peer connection

peacemaker

Expert
Licensed User
Longtime User
Is it impossible over the internet for Android PDAs?
Is a server always required to share data between Android PDAs under GPRS\EDGE or isolated WiFi networks?

I mean if to develop an application that shares its data between users ?
 
Last edited:

wl

Well-Known Member
Licensed User
Longtime User
There is a quick check you can do.

If you run the B4A server using your Mobile connection (instead of your local WiFi) you will notice it will display an external IP (so no 192.168.x.x or 10.x.x.x).

If you are still able to debug your app on your device (using the B4A server on the mobile connection) it would mean that at least your mobile provider is allowing incomming connections.

My provider at least does.

If your provider does not, you will need to have a server in between so that each Android device can open a client socket connection to this server: the server will act as a relaying system passing messages/data back and forth.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Interesting, is there any update for this subject now ? Any possibility to build a p2p app sample ?
How host in p2p net searchs each another ?
 
Last edited:
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
you might be able to do it using GCM pushes but you'll probably need to know the key's prior or at least retrieve them from a DB, therefore you could use google server's to send your messages, up to 4kb.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Thanks for info. I think about a network game development , so rather fast data exchange is needed.
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
GCM is quite fast, at least in my experience. Not sure what your needs are but It's definitely worth looking into. No server and connections to maintain, just need to maintain client keys.
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
It's worth a shot. With GCM as long as the "gamers" are online either wifi or cell, they can always get invitations, etc. Only issue is maintaining a list of gamers but at least you don't have to really mess with the "exchange" server. You could probably use a Google cloud db to handle the "gamer" db.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I think this Google GCM may be useful exactly as the main central "DNS" server (list) that registers the "world" game servers, started by end-users.
And players once connected - receive the servers list to be saved locally.
And gaming process next is via a chosen server from this list.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I don't understand yet the "GCM email-server" of Erel - how email is used ? Only for registration the user only once ?
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
The email server example is just a simple way of implementing/testing GCM. The email was just a way of telling the server the client's ID. I'd use a DB server and send/update the reg id. Since you wanna go P2P you'll probably have to send the google API key to the client after storing their regid.

At first I was a little overwhelmed with the whole push service but it's pretty simple at the end of the day.
 
Upvote 0

qsrtech

Active Member
Licensed User
Longtime User
The email server example is just a simple way of implementing/testing GCM. The email was just a way of telling the server the client's ID. I'd use a DB server and send/update the reg id. Since you wanna go P2P you'll probably have to send the google API key to the client after storing their regid.

At first I was a little overwhelmed with the whole push service but it's pretty simple at the end of the day.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Still uncrear ... :-(
So, if we would have:
1) Game client Android app
2) Game server app with limited players qty (i'm planning Android one server and B4J for PC, i guess, network part may be the same code module)

So, where\when should be a single common Google project ID ? And other communication ids.....if planned:
1) when a new game server is started - it must send its address to the shared list (on what server ?)
2) Game clients need to get the servers list firstly, or at updating the game servers list
3) then connect to a chosen server for playing.

And how GCM can help here, if say 20 game servers, 640 gamers (clients) on them, and data exchange the server-client maybe should be 3 times per a second ?

UDP (as usually) here is impossible, i think, as no ensurance in input mobile connections possibility, "white"-IPs for servers.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…