This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IM Chat Client/Server flow?

 
Rob Poulos
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hopefully this is the right forum for this

I am currently working on an instant messaging chat application and was wondering how the flow of communication should go between Client A and Client B

My initial thought was to have Client A & B connect to Server A and pull down the connection information (IP's, Ports, etc..) for their "buddies". at this point Clients A & B would be able to iniitiate a direct connection between themselves, leaving Server A out of it. Server A would periodically broadcast changed data to clients but thats about it. It would be the clients responsibility to manage its connections (chat sessions). Might run into some difficulties doing this with firewalls, routers, etc...

or... all communication between Clients A & B must pass through Server A before that communication is passed on to Client B, making Server A the manager of all connections (chat sessions). This is definitly more overhead for the Server and more hops means more points of failure. But, this drasticaly reduces the potential issue stemming from Firewall/router issues.

your thoughts?
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your "initial thought" is a common "peer-to-peer" networking scheme. Your second thought is a typical "client-server" scheme. They're both valid ways to implement a network application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic