AutoDMC's PICAYUNE INTELLIGENCE

Thoughts of small town life in Minnesota. Circulation 47.

SoftLayer: The Miracle of Email

Tags: , ,

As I said in my INFRASTRUCTURE! post, I’m fascinated by the way things work.  This continues on to my fascination with email;  such a simple protocol, and so important to our lifestyle!

This post on the InnerLayer was my longest ever (including my short story), where I discuss email and how awesome it is…

“You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.”

— Albert Einstein, explaining radio.

Email, like Telephones, the Internet, Power Lines, Credit Card Terminals, ATMs, etc. have become so much part of our daily lives that we just accept it without really thinking about it. You click “New,” put some data into a form, then click “Send.” In a couple of seconds (minutes if your mail servers are suffering a spam blizzard), your LOLCAT Email has zipped from one end of the Internet to the other (This proves that, unlike radio, Email does have a cat). Do we marvel at this paragon of technology? Not really. I generally grumble at the mixed blessing that has brought me spam.

A while back, I made the mistake of reading the Wikipedia article on the Power Grid. I was amazed at the mechanics of the system that allows a handful of uranium melting itself into slag in Glen Rose, Texas to shove electrons across a couple hundred miles of copper, through a handful of coils… all to be stopped by a little switch in my wall before they could excite the gasses in my Compact Fluorescent light bulbs. For two weeks after that, I was a road hazard. In the middle of my commute, I’d glance at my right hand mirror, gaze out my side window, and think “Hey! I didn’t know they were running two phase power out here!” I must say that I couldn’t have been a more dangerous driver during those two weeks if I was dryping.

My latest project at SoftLayer (WHOIS management for ARIN… look in the portal under SWIP) had me doing research on Email (as all transactions are conducted through Email).

Like David Bowman staring into the black monolith at the end of 2001, I was struck by the simplicity and beauty of the Email system!

Let’s tag along with an Email message, so you can see just how cool this is.

Bob is currently taking a vacation in Glen Rose, Texas (taking the tour of the Nuclear Power Plant). Sitting in the lobby of the Visitor’s Center (thinking about this giant reactor being at the beck and call of his little switch), he has a firm wish that Alice could come see this. He’s a cheapskate, though, (that’s why he’s at a local power plant instead of, say, Disneyworld) so he’s not going to waste money on a Power Plant Postcard and stamp at the gift shop. No sir, he opens up his blackberry and sends a short Email to Alice (”Wish you were here!”). A few seconds later, Alice’s Email client pops up an alert that she’s received an Email from Bob. The Email itself is simply a block of text… really! No magic going on here! Here’s what the Email looks like:

From: bob@example.net
To: alice@example.com
Date: Wed, 10 Oct 2007 12:54:08 -0400 (EDT)
Received: From EXAMPLE.NET
 by EXAMPLE.COM with SMTP
 Wed 10 Oct 2007,
 12:55:00 -0400 (EDT)

Wish you were here!

---
Bob
Sending to Alice for over 30 years.

Simple, huh? To help visualize this transaction, Figure 1 shows a “RFC 2822 Compliant Post Card:”

Bob opens up his Email client, and writes “Wish you were here!” in the message area. He then adds his signature, and writes in the subject. The Email client adds headers to the address area of the Email (From, To, and Date), then drops the Email into Bob’s local Email server (EXAMPLE.NET).

The Email server at EXAMPLE.NET looks at the address section of the Email and notices where it is to be sent to Alice (who has an Email box at EXAMPLE.COM), and opens up a SMTP (Simple Mail Transfer Protocol) connection to Alice’s mail server. It then sends the message and moves on.

Alice’s Email server puts a “postmark” header on the Email (the Received header) and drops a copy of the entire text block into Alice’s Email box.

Alice opens up her Email client, which then downloads all the text files from her Email box. It reads the From header and tells Alice that she has an Email from bob@example.com

That’s it! Simple, huh?!?

If Bob’s Email server can’t send the mail directly to Alice Email server, it can send the Email through a relay server. This server adds its own “Received header” to the Email. If you look at the headers of any Email you’ve received (spam is not only a good source of vitamin Sodium Nitrate, but also an excellent resource for Email headers), you can see every single server your Email passed through. It’s like those neat stickers customs officials stick to your luggage as an apology for cracking your locks when you fly internationally.

That’s all there is to it! A simple block of text, passed off to an Email server. And the actual protocol is just as simple. Here’s what the communication between Bob’s Email server and Alice’s Email server looks like (modified from the example on Wikipedia’s SMTP article):

Bob’s server connects to Alice’s and identifies itself:

ALICE: 220 smtp.example.com ESMTP Postfix
BOB:   HELO example.net
ALICE: 250 Hello example.net

Bob’s server then tells the receiving server about the Email:

BOB:   MAIL FROM:<bob@example.net>
ALICE: 250 Ok
BOB:   RCPT TO:<alice@example.com>
ALICE: 250 Ok

Bob’s server then tells Alice’s that it’s ready to send the real message:

BOB:   DATA
ALICE: 354 End data with <CR><LF>.<CR><LF>

Next follows the RFC Compliant Email message from above, ending the data with a “.”, which tells Alice’s server that Bob’s message is complete:

BOB:   From: bob@example.net
BOB:   To: alice@example.com
BOB:   Date: Wed, 10 Oct 2007 12:54:08 -0400 (EDT)
BOB:   Received: From EXAMPLE.NET
BOB:    by EXAMPLE.COM with SMTP
BOB:    Wed 10 Oct 2007,
BOB:    12:55:00 -0400 (EDT)
BOB:
BOB:   Wish you were here!
BOB:
BOB:   ---
BOB:   Bob
BOB:   Sending to Alice for over
BOB:   30 years.
BOB:   .

Alice’s server lets Bob’s know that the message is queued to go, and Bob’s server signs off:

ALICE: 250 Ok: queued as 12345
BOB:   QUIT
ALICE: 221 Bye

I marvel at this technology. Every Email in the world is transmitted by this simple protocol. The whole of electronic communication takes place by handing small blocks of text from one Email server to another, until it finally makes its way to the recipient’s inbox. That’s all! No magic potions, no hocus pocus, no tying messages to carrier pigeons or pulling cat tails.

Not only this, but your message is flying through a blizzard of spam. Because the protocol is so simple, people build simple tools that blast out millions of messages at a time, flying all over the Internet. But the awesomeness of this just makes Email that much more awe inspiring. Email has been running, nearly uninterrupted (as a whole) for DECADES under the most concerted distributed denial of service attack of all time.

And STILL your Email gets to its destination. Benjamin Franklin would be proud.

Think of this the next time you forward the latest list of funny jokes to everyone on your Email list. This incredibly simple protocol will make sure that your vital Email gets to every recipient listed! “Neither snow, nor rain, nor heat, nor gloom of night stays these couriers from the swift completion of their appointed rounds…”

Originally posted on Tuesday, October 16th, 2007 at http://theinnerlayer.softlayer.com/2007/the-miracle-of-email/.

SoftLayer: Where have all the gurus gone?

Tags: ,

FileGuru meditation.gif

When I was growing up, computers were these wonderful things that sat at the back of the classroom (usually one, or maybe two if the class was lucky). If the school was lucky, there was a “computer lab” where you could have access to the latest and greatest in government approved hardware.

My favorite of the time was the Apple IIe. Our school district had so many of them, they handed ‘em out to classrooms (The school district now uses them as very effective door stops). In fact, I got my start with computers by tinkering with a IIe. My first computer experience was hooking up a printer to aIIe, and the wonder of this experience (plug something in, type a command, and print came out!) completely captured me (I was in first grade), and from that moment on I was completely wrapped up in the wonder of computers.

Anyway, I graduated to PC compatibles and DOS. Trying to get a grasp on this computer thing, I got a copy of DOS for Dummies. Near the beginning of the book, they had a paragraph that had some important words of wisdom. While I don’t have the book any more, the message is still with me: “This book will teach you the basics of the computer, what you can do, what you can’t do, and what you really shouldn’t ever do. However, for anything you don’t know, contact your local computer guru.”

Computer Guru? What is this “Computer Guru”?

According to Wikipedia, Guru means “Teacher, in a religious or spiritual sense.” And as luck would have it, I was able to get into contact with Computer Gurus throughout my life. These were the computer equivalents of the small town mechanic: you pull up for some gas and Harvey the mechanic walks around the corner. “Howdy! I heard you pull up. You’ve got a bit of a timing issue, and I think one of your spark plugs are bad. I can change ‘em out in a few minutes, if you like.” It’s almost like Harvey has a supernatural connection to vehicles. He can hear issues, he can smell problems… he’s one with the Motor Vehicle Force.

The same with the Computer Gurus I knew. You walked in and turned on your machine, they’d make a “Hmm” sound (in computer science, “Hmm” is similar to the Indian sacred syllable “Aum” or “Om”. It’s ritually chanted by a computer guru whilst contemplating your computer’s connection to the Universe), type some sacred symbols into the prompt, then tell you the problem and offer to fix it. Most times they would happily fix your computer in exchange for a pizza; sometimes just getting a cup of coffee from the ever present drip dispenser could net you a small fix. And if you were truly interested in computers, you could even ask to become a follower of the Guru. You’d spend your spare time in his or her office, ask meaningful questions about the nature of the Universe, contemplate ancient tomes and user manuals, and take care of the mundane tasks of life (like formatting floppies or installing software) so the Guru could spend their time connecting with his or her latest project (generally spent looking at an arcane flowchart or design document and saying “Hmm” a lot). You knew, one day, with practice and patience, you too could become a Guru, have followers to format your floppies, and say Hmm.

However, the computer industry started changing. User interfaces became simpler, USB made the promise of true plug-and-play a near reality… the command line all but disappeared. Computers stopped being a specialized device and became a commodity. Computers were EVERYWHERE. And there was this belief that computers will become so “user friendly” that there was no need for the long learning process of the Guru.

And for the most part, this has happened. Programs are very user friendly now. There’s tons of documentation, and most don’t expect you to have a PhD in Computer Science to understand them. Workflows have become “point and click link” instead of “chant this esoteric string into the command prompt”.

However, sometimes I really miss my Guru. For example, just this last week, my roommate’s computer (which I built) started randomly crashing. There wasn’t a specific program that crashed, and it didn’t crash at a set time. I knew something was wrong, so I tried to diagnose. ‘Course, Vista being user friendly, the computer would automatically reboot, without showing the Bluescreen, except for the subliminal hint of blue to let you know that the computer had crashed. See, blue screens have “Technical Information” (it says so right on the screen!)… and user friendly computers (1) don’t crash, and (2) are NOT technical. So I was stuck with a computer that wouldn’t run, and a bored Roommate who just realized he has a $1200 paperweight.

As Dr. McCoy would say, “I’m a programmer, not a hardware doctor!” Hardware issues are right outside my realm of experience. I longed for my Guru. I knew how to diagnose; I pulled hardware, changed orders of cards, swapped the memory sticks back and forth… all the standard religious rituals for modern computers. I knew that if I could but approach a Guru, tell him or her my issue, they could give me leads to check. I didn’t have the money to buy all new parts at random; I had to work with what I had. I knew I had all the data for a real diagnosis… I simply wasn’t able to pick out the error. Working the next day at SoftLayer, I mused about my lack of Guru leadership. At the end of the day, I turned to a coworker and said “Now I get to tinker for a few more hours on this stupid computer. I wish I knew a Computer Guru!”

My coworker smiled and asked what the problem was. I told him and he looked at the ceiling. “Hmm” he said. “Could be a power supply issue. Maybe the power coming out of the supply isn’t clean and it’s resetting the motherboard.” Just then, another coworker walked around the corner.

“What about a power supply?” he asked. The first coworker told him the issue. “Hmm,” he said, looking intently at the wall. “I bet it’s a RAM issue. I bet your ram is bad. Swap it out with some good RAM and see what happens.”

So I went home and crosswired some power supplies. Rebooting the machine, I finally got a bluescreen that crashed itself, locking up the computer and letting me read it. “PAGE_FAULT_IN_NON_PAGED_AREA” “Page Fault?” I thought. “Hmm.” My roommate walked in. “What are you doing, meditating? Have you fixed it yet?”

We went to Fry’s and bought some new RAM sticks. Going home, I popped ‘em in and started the machine. And it worked! It’s been running 6 days nonstop. My roommate was really happy. I was finally able to look up the bluescreen message up on the Internet. Sure enough, that specific error almost always pops up when there’s bad ram.

So, where have all the Gurus gone? Where else? They all work at SoftLayer! Whenever I’ve had a software or hardware issue, or an operating system issue, I’ve found somebody here who knows the issue. They look at the wall, say “Hmm”, sip their coffee or Monster (depending on their level of enlightenment), and give me the answer. The guys here are at one with the Network. The DC guys almost seem to be able to FEEL a power issue or a drive problem before it happens. Slales is able to think about your problems and provide a tailor made solution to help. And Development is where all the action takes place; we get to write all the behind the scenes magic.

“You must be some kind of Computer Genius!” shouts my roommate (lucky for me, he’s gotten to play some Call of Duty 4, so he’s already forgotten the previous week of frustration). “No, not yet.” I respond. “I’m working on it, but I’m not a Guru yet.”

Originally posted on Wednesday, January 16th, 2008 at http://theinnerlayer.softlayer.com/2008/where-have-all-the-gurus-gone/

SoftLayer: 640K Ought To Be Enough For Anybody

Tags: , ,

bill_gatesEveryone knows the famous Bill Gates quote.  Smartest Man In The World fails to understand his own industry.  Guffaw, guffaw.

Turns out he didn’t say that at all, as this InnerLayer post discusses:

I was talking with a friend about memory on computers. He said he wanted a computer with tons of memory for Photoshop. I said something to the effect that I’ve never seen a desktop that can handle more than 16 GB, and that most operating systems now don’t want to handle more than that… that Windows will only give a process 4 GB max, 2 GB for the application and 2 GB shared with the operating system. He then said “I can’t imagine having to use more than 16 GB!” This immediately reminded me of Bill Gates’ famous quote, that “640K ought to be more than enough for everybody.” Striving for accuracy, I went to the Internet to find when and where he said this.

Interesting fact came up: HE NEVER SAID IT. He vehemently denies having ever uttered this phrase. Every quote I’ve seen is always un-sourced, so let’s give him the benefit of the doubt. So what makes this quote clog the tubes so easily?

First, the irony that a person renowned for his computer visions of the future would say something so backward causes people to smile. Secondly, there is a nugget of truth. In a 1989 speech, Bill Gates said:

“I have to say that in 1981, making those decisions, I felt like I was providing enough freedom for 10 years. That is, a move from 64k to 640k felt like something that would last a great deal of time. Well, it didn’t – it took about only 6 years before people started to see that as a real problem.”

Bill never said “640K is enough for everybody.” He said “640K should keep everyone happy for the next 10 years.” Turns out he was wrong. Within less than 6 years we started hitting the “640K limit”… which wasn’t a hard limit at all, it was just a limit proposed by the operating system at the time. Mr. Gates thought that 640K was generous, and in the beginning it was. But as the industry marched forward, it started cramping. Pretty soon, we had DOS memory managers, extended and expanded memory, virtual memory… we would do ANYTHING to escape the 640K limit.

So what’s the moral of this story? First, you can’t believe just anything you read on the Internet. Sometimes something gets into the tubes because it’s funny, not because it’s accurate. Secondly, predicting the computer industry is hard. To be a successful computer development company (like the portion of SoftLayer I work in), you have to be able to look to the horizon and attempt to spy the most likely location the software industry is moving in. We developers work on projects 3, 6, 9, 12 months before they’re used by our users; we have to make predictions at least double that size in advance to give growth room whilst the next tool is developed. And, I dare say, we’ve done a good job of that around here!

In conclusion, Bill Gates never said “640K should be enough for everybody.” That quote is a myth. It’s a funny joke, but a joke nonetheless. However, Bill Gates did actually say this at a Macintosh conference:

“To create a new standard, it takes something that’s not just a little bit different; it takes something that’s really new and really captures people’s imagination — and the Macintosh, of all the machines I’ve ever seen, is the only one that meets that standard.”

And this time there’s video evidence. And there’s the not-quite-quote where Bill Gates implies that Vista isn’t really the best thing since 8086 Segmented Physical Memory Models. Aren’t real quotes more humorous fake ones? I think so.

Originally posted on Wednesday, January 23rd, 2008 at http://theinnerlayer.softlayer.com/2008/640k-should-be-enough-for-everybody/

© 2009 AutoDMC's PICAYUNE INTELLIGENCE. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.