2

I want to know the best way to implement a system where 2 or more instances of an application deployed in different systems in a network communicate with each other without using any central server(either db or on application acting as server).

I am trying to develop an IP Messenger type application in C#.net.

Prisoner
  • 27,391
  • 11
  • 73
  • 102
Vamsi
  • 4,237
  • 7
  • 49
  • 74

1 Answers1

2

you can use WCF and netTCP binding, see here for more information:

Peer-to-Peer Programming with WCF and .NET Framework 3.5

Davide Piras
  • 43,984
  • 10
  • 98
  • 147
  • That was a great link , but can you suggest something that does not involve wcf, I mean using traditional socket programming in C#.net (I am not a very food in WCF). In the meanwhile i will try to go through the complete content of the link you provided once again thanks for the link – Vamsi Oct 17 '11 at 12:44
  • then just use TCP: http://stackoverflow.com/questions/1354348/tcp-client-two-way-communication-help – Davide Piras Oct 17 '11 at 12:46
  • Using TCP means you should now the IP address of the other applications before hand, but i want to build a messenger application where the clients keep updating dynamically, based on the login and logout – Vamsi Oct 17 '11 at 12:50
  • 1
    yes and where do you store data? central database or server? you do not want to use a server process, would a shared database be ok or not? alternatives could be UDP broadcast... http://stackoverflow.com/questions/746519/udpclient-recieve-on-broadcast-address – Davide Piras Oct 17 '11 at 13:00
  • This is how i was expecting it to be. each application tries to listen to a particular port and when ever a user logs in to the application the application tries to ping all other application on the port they would be listening, but i just don't know how the application that has ben logged n knows the IPaddresses of the remaining applications to ping – Vamsi Oct 17 '11 at 13:02
  • Regarding storing of the data, i want each instance to hold its own data rather than depending on the server, that way even if the server is logged out of network the other applications can still communicate. – Vamsi Oct 17 '11 at 13:17