Copy link to clipboard
Copied
Hi people!
I'm thinking of making an app with the following characteristics:
My question that I need your help with:
Notes:
Does anyone have any experience with this kind of network discovery in AIR?
Thank you
Message was edited by: Tamas Sopronyi
IGZN wrote
Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for
read the materials, it is what you're looking for: network discovery
it works on LAN and without a server
...
IGZN wrote
First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.
Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clien
Copy link to clipboard
Copied
IGZN wrote
- All of the apps are on the same network (home or office WiFi for example), no internet connection is needed
My question that I need your help with:
- Is there any non-intrusive way for the clients to discover the server's IP address and port?
Yes, you want to use RTMFP
and it is available in Flash Player and Adobe AIR
read this about RTMFP
Peer-assisted networking using RTMFP groups in Flash Player 10.1 | Adobe Developer Connection
read this to use it on a local network (without the need of a server)
P2P on the local network
(code example from slide 38)
Copy link to clipboard
Copied
Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for.
First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.
Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clients, client apps would not know where to connect, or every client would be connected to the same group which is just not good.
While I appreciate your reply, it's not really what I'm looking for.
Copy link to clipboard
Copied
IGZN wrote
Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for
read the materials, it is what you're looking for: network discovery
it works on LAN and without a server
IGZN wrote
First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.
Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clients, client apps would not know where to connect, or every client would be connected to the same group which is just not good.
While I appreciate your reply, it's not really what I'm looking for.
RTMFP on a local network does not need a Cirrus server or any kind of central server
each clients are at the same time client and server, it is called a P2P network
it is all there in the link provided above
and does support the scenario of having 2 different servers etc.
your clients can not magically connect to the right server
that's what is network discovery: the client provided with a list of networks decide to which one to connect to
it would be the same with other auto discovery protocols like Bonjour, etc.
Copy link to clipboard
Copied
Thanks, man. I wasn't aware it has a serverless connect() method. Looks to be working perfectly fine!
Copy link to clipboard
Copied
I found the cirrus system to be fairly slow, is it faster locally?
Copy link to clipboard
Copied
I didn't run any extensive tests yet, and for what I'm using it is sufficient (sending small packets and objects), but I noticed a slight delay in response times. Did not measure it yet though, feels like half a second on connection events.
Copy link to clipboard
Copied
it really depends on many parameters
number of clients you want to sync for example
a RTMFP P2P network is a mesh of clients in a ring topology
that has a max capacitiy of 14 (16?) clients to create a full mesh
when the clients are on the full mesh (the ring)
they can send to their direct neighbour and it is fast
but if your whole P2P network is much bigger like 100 of clients
you will have to send to the nearest neighbour or all neighbour
to reach everyone and there you will have a delay
(the time your message bounce from neighbour to neighbour till it is fully propagated)
you can find much more details in the PDF stored there
Google Code Archive - Long-term storage for Google Code Project Hosting.
and it also depends on how you sync the data
to share a file for example
scenario 1
all cilents connected to the same P2P group and you can send the file data to all the clients of the group
that can be slow for the clients at the very end of the network (the farthest neighbour)
or
scenario 2
all cilents connected to the same P2P group where you coordinates stuff
and when client X want to share a file it create a P2P group for the file itself
so any other clients who want to grab the files can connect to this "file P2P Group"
and there use direct connection to sync the file
that is pretty fast as long only max 16 clients subscribe to the the same P2P Group
or
scenario 3
like scenario 2 but then you manage many P2P group for the same file
for ex: "document.zip"
you create "group_document_zip_001", "group_document_zip_002", "group_document_zip_003", etc.
your "main" network keep track of how many clients is connected to each group
and do the "routing"
client 123: I want to get the file "document.zip"
main_network: ok go to slot "group_document_zip_003" as I know there are only 8 out max 16 clients
client123 connect to P2P group "group_document_zip_003"
etc.
You can do a lot of very advanced stuff with RTMFP, it is a shame it is not used more.
Things like a Distributed Hash Table (DHT) allow to keep a list or index of files, clients, etc.
wether you're only in a LAN or decide to share the same data over the internet is is very efficient
Other things like synching video, VOD, etc. would be much trickier but still very possible