> Hi,
> This is more of a theory type question than anything else.
> My friend and I have IM installed and I send him an instant message.
> We are both behind firewalls but he gets the instant message
> instantly!
> Now, my IM can't just open a socket to his as he is behind a firewall
> so it must go through a server. But if it does that his IM must be
> checking/polling for messages every .2sec to account for the fact that
> he gets it instantly?
> Now, that can't be right can it? That every installation of IM in the
> world is polling a central server for messages every .2/.5 sec? That
> would be huge network overhead?
> How are they doing it?
When you send a message to your friend, it gets routed to him through
the firewall host on his end. The firewall is (more or less)
continuously polling its incoming queue for packets. When it finds one
and sees that it's intended for your friend's host, it forwards it on to
him straight away. Since CPUs and internal data buses are orders of
magnitude faster than network links, the delay is too small for you to
notice. This is why people like to use old, otherwise-useless 386 and
486 machines as stand-alone firewall hosts.
Note that none of this requires polling a central server.
--
To reply by email, replace "deadspam.com" by "alumni.utexas.net"
|