Search code examples
network-programmingserverclientclient-server

Communication without server


Thinking about collaborative applications like online gaming, whatsapp, and many other distributed systems, server plays a major role. It performs many critical functions which are needed for smooth functioning of the application as a whole.

But suppose I want to develop an application which users can use to connect online and share data, like text, images, drawings in real time. For example, one user may be working on a maths problem and want to discuss it with another user. So application enables those two users(and more, if needed) to connect and share their ideas.

Can users have this sort of communication without having a server as mediator? If yes,what networking technologies enable this? And what are the advantages application miss upon on lack of a mediating server?


Solution

  • there are many problems you need to solve if you want to build such a distributed topology.

    1. NAT must be think. It is the first thing that must solve, you may need to build Natpmp or upnp or ICE to realise nat traversal.

    2. The second problem is how to find other users without a server. You may need to use LSD or DHT

    3. You need to think about security of network without a certification such as the server which can store users infomation and make sure they are really unharmful.

    If you solve all the prolems by using these technologies I mension above or some others, than you will find it's better to use a server cause it's relatively simple. That is the trade-off in a commercial production.