Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 22nd, 2013, 02:19 PM
sim085 sim085 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2004
Posts: 580 sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level)sim085 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 5 h 54 m 19 sec
Reputation Power: 139
How do Instant Messengers work?

Hello,

I would like to learn more about network programming. I have been thinking about how Instant Messengers work (ex: Live Messenger).

From what I read on the Internet I understand that when I start the client on my PC this will connect with a server somewhere on the net. Like this the server knows that I am on line. I guess the server or client can poll every 30seconds to see if I am still on line (not sure of this).

What I am finding hard to understand is what happens when someone wants to chat. The most simple model I can think of is that if John wants to chat with Ben then John sends his message to the server and the server (from some header information) forwards the message to Ben.

However this means that all messages have to go through the server, the server has to process every message to see who the recipient is. This I guess would work for a few clients. However not sure if it would work for millions of clients.

Or maybe the server exposes the information of a chat client with another chat client so that these can communicate directly together?

Reply With Quote
  #2  
Old January 22nd, 2013, 05:33 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,931 E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)E-Oreo User rank is General 90th Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 7 h 43 m 47 sec
Reputation Power: 6991
Both methods are possible, the first is easier to implement and generally more reliable. Skype uses a variation on the second method, most other networks use the first method as far as I know.

* The reason Skype uses a peer-to-peer based model is because the bandwidth requirements for voice and video are a lot higher than for text, so it's impractical to offer a free server-based solution for it.
Comments on this post
sim085 agrees: Thank you!
__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > How do Instant Messengers work?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap