how do the electrons move inside my computer
August 25, 2004 8:28 AM   Subscribe

Once a message comes through a cable and into the back of a computer, what path does it follow to get to the application (i.e. browser, e-mail client, etc.)?
posted by archimago to Science & Nature (14 answers total)
 
Mom?
posted by bondcliff at 8:42 AM on August 25, 2004


Are you asking about the physical path or the software path?
posted by bshort at 8:51 AM on August 25, 2004


Here's a good diagram of the various layers involved (in this case P2P, but it's a similar concept).
This metaphor is useful for understanding many of the more complex concepts of your OS.
posted by milovoo at 8:56 AM on August 25, 2004


Response by poster: sorry, should have been more specific, the software.
posted by archimago at 8:57 AM on August 25, 2004


Also, here's the Wiki entry and a better diagram.
posted by milovoo at 8:58 AM on August 25, 2004


It is a long and tortorous journey.
What you need is a metaphor involving James Bond
posted by seanyboy at 8:59 AM on August 25, 2004


I have a feeling you need something a little more layman-suited...
posted by inksyndicate at 9:12 AM on August 25, 2004


I'm also interested. Can someone write a "first-person narrative" walkthrough from the point of view of the data signal as it's approaching the computer?
posted by Gyan at 9:23 AM on August 25, 2004


This is (or can be) an extremely involved question. I was interviewing for a tech job a month ago, and the interviewer asked how a single letter gets displayed on screen. We talked about computers, software, networks, and electronics for a good 90 minutes, and barely got around to putting a single dot up.
So...sit right back and you'll hear a tale,
a tale of a fateful trip,
that started from this tropic port,
aboard this tiny ship...
posted by spacewrench at 10:33 AM on August 25, 2004


Short answer: it gets on the bus.

Long answer: "A Proud Shepard Tethers No Duroc Pig."
posted by Smart Dalek at 10:42 AM on August 25, 2004


Teeny-tiny little robots.

To be more serious, I think the answer to your question would vary depending on which operating system we're talking about, what kind of networking you're using, and so on.
posted by reklaw at 10:46 AM on August 25, 2004


If you just want to name the software task, from the wire "up" that would be IP, TCP (or less often UDP) and then one of many applications (HTTP for browsing, IMAP/POP/SMTP for mail, etc.)
If you want to delve deeper you should first understand the whole "Layered Model" idea and the concept of encapsulation.
Once you more or less got that you should learn the actual 5 layers model used in the internet (as opposed to the pie in the sky OSI model) and understand the basic services that each layer provides to the ones above it (for this you'll probably want to briefly check out the concept of "connection-oriented protocols").
I say this because there is no catch-all answer, it depends on several factors.
On preview, a first person account probably would involve the data shedding the layers it acquired on the way to your computer. It would be more appropriate to describe it from the point of view of the tasks in the computer(s).
posted by golo at 10:54 AM on August 25, 2004


Response by poster: too much to process, head hurts . . . but thanks for setting me in the right direction!
posted by archimago at 11:15 AM on August 25, 2004


Exactly, It's not that simple. I got carried away before I knew your head was hurting so you may want to leave this for later:

An Ethernet frame arrives to your network card. The Ethernet card will handle only frames addressed to it directly (or to a multicast group to which it belongs or to all the cards in that network). It checks the frame’s integrity and analyzes the contents only of the very first bytes of the frame called the Ethernet header (added by the cable modem or what not).
From the Ethernet header the network card (or probably the card driver) knows which protocol is being transported. It strips the Ethernet header and passes it on to the next layer, usually IP.

IP for its part analyzes only the first bytes that arrive to it, the IP header added by the IP task at the remote host. The next layer protocol (the one carried by this specific IP packet) is specified there. The IP header also specifies if the original upper layer data has been cut into small pieces on the way (fragmented). If it has, IP needs to wait for all the parts and reassemble it before it passes it on to the layer above, not before stripping the IP header.

There are two main protocols that can be carried by IP (aside from management protocols which are numerous): UDP and TCP.

• UDP is simple, the “D” stands for datagram and it is like a (non certified) telegram, the sender can not be sure it will arrive. UDP obviously also adds a header (are you starting to get a hang on the whole “encapsulation” deal?). The UDP header is a very simple one with basically only the “Port Number” which indicates to what application the data should be routed.

• TCP for its part is a reliable protocol. The TCP tasks on both ends of a connection engage in a kind of dialog, with one side acknowledging that the data has been received (in the proper sequence) and the other one resending packets that get lost (actually both sides do both task simultaneously, each TCP header has space for including an acknowledgment of data receive).
Finally TCP passes the data to the application specified by the TCP destination port (part of the TCP header).

As you can see each protocol deals only with the extra information added by its counterpart in the remote end and doesn’t care for the data contained within.
posted by golo at 12:01 PM on August 25, 2004


« Older Soap recycling   |   Why will Windows only let me format a hard drive... Newer »
This thread is closed to new comments.