Highlighted

Network Discovery

Participant ,
Jan 25, 2018

Copy link to clipboard

Copied

Hi people!

I'm thinking of making an app with the following characteristics:

  • 1 master (server) app with SocketServer (or anything else that works). This can be a mobile app and/or a desktop app
  • Several client apps can connect to this server app where users can do specific things (mobile apps) over a Socket (or any other working connection)
  • 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?

Notes:

  • I want to avoid IP and port scanning since they're somewhat intrusive (WiFi routers might have firewall rules enabled), resource-intensive and and slow if the response is from the scanned IP address is slow. Scanning 65536 ports for 256x256 ip addresses is not really feasible (edit: even if the server app is using one specific port like 6666, it's still a lot of IP addresses to check for a running server)
  • I want to avoid that users have to enter IP address and port, it's not really a user-friendly way to connect to a server
  • I kinda like to make it how it works on VLC media player or on my TV which can easily found my running UPNP/DLNA server on my PC without any user interaction and play videos with a few taps

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 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.

TOPICS
Development

Views

491

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Network Discovery

Participant ,
Jan 25, 2018

Copy link to clipboard

Copied

Hi people!

I'm thinking of making an app with the following characteristics:

  • 1 master (server) app with SocketServer (or anything else that works). This can be a mobile app and/or a desktop app
  • Several client apps can connect to this server app where users can do specific things (mobile apps) over a Socket (or any other working connection)
  • 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?

Notes:

  • I want to avoid IP and port scanning since they're somewhat intrusive (WiFi routers might have firewall rules enabled), resource-intensive and and slow if the response is from the scanned IP address is slow. Scanning 65536 ports for 256x256 ip addresses is not really feasible (edit: even if the server app is using one specific port like 6666, it's still a lot of IP addresses to check for a running server)
  • I want to avoid that users have to enter IP address and port, it's not really a user-friendly way to connect to a server
  • I kinda like to make it how it works on VLC media player or on my TV which can easily found my running UPNP/DLNA server on my PC without any user interaction and play videos with a few taps

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 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.

TOPICS
Development

Views

492

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 25, 2018 0
Enthusiast ,
Jan 29, 2018

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)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 29, 2018 1
Participant ,
Jan 30, 2018

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0
Enthusiast ,
Jan 30, 2018

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0
Participant ,
Jan 30, 2018

Copy link to clipboard

Copied

Thanks, man. I wasn't aware it has a serverless connect() method. Looks to be working perfectly fine!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0
Advocate ,
Jan 30, 2018

Copy link to clipboard

Copied

I found the cirrus system to be fairly slow, is it faster locally?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0
Participant ,
Jan 30, 2018

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0
Enthusiast ,
Jan 30, 2018

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)

p2p_direct_routing.png

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 30, 2018 0