Is it possible to code an application that can detect and connect to peers without a central server? How?
I believe this is what some peer-to-peer applications do, but my knowledge in programming is much better than in networking.
Let's say you want to create a private chat application that works the following way:
- You define a list of IDs you trust
- The application displays all the peers that have the same application and have a trusted ID
- You establish a connection that allow you to chat and send small documentations (source code, odt files, etc.) without the need to open a port in the router.
I'm not, of course expecting, a silver bullet answer, just some clues of the feasibility, and the technologies this would require.
That is depend in what type of network your application going to run in to, for LAN networks, you can do this:
Of course, you have to design a broadcast protocol to get list of available peers. A simple broadcast protocol could have the following options: The IP address of peer who queried for available peers, so others will respond to this IP, port number of broadcast protocol. The available peers will respond with this information: IP address, port number of the chat application. Now the chat application can use this information to connect with those peers. This will apply for LAN networks, but to identify peers on internet I didn't find a solution with out relying on central server.
Sorry for my English, and I hope at least you have an idea now.