Wednesday, December 19, 2007

Favorite Pictures From My Travels

Under the Space Needle - Seattle, WA

Pike Place Market, Seattle, WA

Heaven Lives in Woodinville, WA (at the Red Hook Brewery)

Palace of Fine Arts, San Francisco, CA

Coit Tower - San Francisco, CA

Big, Incredible Redwoods - Muir Woods, CA

Down the Waterfall, Capilano River, North Vancouver, BC

Melbourne Skyline from the Yarra River, Melbourne, Victoria, Australia

Tidal Pool, Diagonal Tree - Mallacoota, NSW, Australia

Sydney Tower at Dusk, Sydney, NSW, Australia

Opera House, Sydney, NSW, Australia

St. Mary's Cathedral, Sydney, NSW, Australia

Tuesday, December 18, 2007

December Blues

Well, been a while, so here goes.

First, an update on where I have been and what I have been doing. Last weekend my fiancee ditched me to meet up with her friend in Austin, so I celebrated by...catching a cold. So last week was pretty rough. I didn't feel like much the whole week. Lucky to have such a great fiancee to take good care of me. I have been taking guitar lessons finally. Jena got me a guitar a couple of years ago, and after some self-teaching, I figured out I can't teach myself very well, so I have been going to a great teacher for a few lessons now, and it's amazing how far I have come. Someday I will be able to rock like a true guitar god...or at least be able to play a few songs...preferably Led Zeppelin or Tom Petty or something good that's not too challenging and doesn't require 12-strings. We went to New York City this weekend and braved the cold wet weather. It's a crazy place - I never know how people live there, but there must be something to it since both of my college roommates and some other good friends are either moving there or have been there for a while. Too much action for me...

We took the bus there, which was, had wireless internet, and gave me time to read! I finished The Ethical Assassin, by David Liss. I had read his first three books, which were historical fictions based on a family of exiled Jewish merchants in England from 1500-1700. I love history, and have been getting more into historical fiction. Liss' fourth effort, however, jumped to the other end of the spectrum, diving into a mystery about an encyclopedia salesman in the trailer parks of Northern Florida. It was really a good quick read like the others. The pace and rhythm of the storytelling is always pretty uncanny in his books.

Not much else to add. Still working through Manhunt and the Alexander Hamilton bio, and also through three chapters of Herding Cats, a book about programmers being promoted to lead other programmers, which is where I find myself these days, often cluelessly. I have already noticed ample quantities of advice that I can use in my day to day work.

More on Christmas shortly, along with some good pictures we have taken lately during our travels!

Tuesday, December 4, 2007

The Communication Generation

It's truly amazing to me how far the telecommunications industry has come over the past few years. It's incredible to stop and think how impatient you get when you can't call someone on their cellphone. Not too long ago, I was in high school, and I had a PAGER. That was pretty sweet, because as long as someone was by a phone that accepted incoming calls, you could always get in touch with them. Now, obviously, we have cellular phones. Everyone always knows where everyone else is and what they are doing, and if they can't talk right now, well, you can text message them! I think the younger generation takes this for granted, but I can remember when I was nine years old and went for a bike ride for a couple hours, and my parents thought I was dead. I can remember the look of relief on their faces. Now the nine year olds have MotoRazrs. I am guilty myself. When I can't reach Jena for an hour, I sometimes start to fear the worst. Ten years ago, I would have thought "she'll be home when she's home".

The communication revolution seems especially incredible as I read some of the books I have read lately. The War of 1812 was basically over, the British and American delegations having signed the Treaty of Ghent. Today, this would all be done over a videoconference being streamed live to the State Department. Back then, the American delegation had to get back on the boat to come back to Washington to tell everyone that they could stop fighting. Now, if anyone has ever heard of the Battle of New Orleans, it was fought while the ship was sailing. Pretty amazing stuff. A pivotal battle in a war being fought after the war is over! Kind of funny to think that the US actually won the war after they had already stopped fighting.

Now, this all comes with a price. Now you can't claim ignorance as a reason for not doing something. "I couldn't find Bob, so I couldn't work on this widget" is no longer valid. Bob is always available, and so are you. People can always find you. If they don't have your cell phone number, they can call the other thousand people they know to get it. You are always "around". I still haven't necessarily reconciled that part of the communication revolution.

I guess there wasn't really much point to this post other than to stop and say "wow", because things go on in the world that we simply take for granted, and they are often pretty incredible.

Monday, December 3, 2007

Web Applications and Memory Abuse

As a performance engineer, part of my job is to make our software run really really fast. Another part is to figure out how to make sure that it still runs as fast with 1000 users as it does with 10. That's usually the harder part. You can usually squeeze gains out of each transaction enough to make the single-user cases perform fine. Jeff Atwood describes it very well in this blog post. Says Atwood:
"Everything is fast for small n. Don't fall into this trap. It's an easy enough mistake to make. Modern apps are incredibly complex, with dozens of dependencies...The only way to truly know if you've accidentally slipped an algorithmic big O bottleneck into your app somewhere is to test it with a reasonably large volume of data."
As an example:

A big reason for poor scalability is the abuse of memory. Everything is faster when loaded from memory, right? That's always good, right? Matter of fact, why not put everything the user sees in their session? That way all they have to do is go straight to their own little section of memory so that everything they do is fast fast fast. Hmm. Good when the n is small. Bad when the n is big. Let's say, for kicks that every user session grows to 2MB. That's not unrealistic when considering some of the data-driven applications that you use on a day-to-day basis. Not so bad, right? After all, memory is cheap! Now, let's say your application is running on 32-bit Windows. For reasons explained here, you can only fire up a 1.5 GB JVM. So let's say you have 500 active users on your system. Do the math:

1500MB total heap size - 250MB server bootstrap - ( 500 users * 2MB session ) = 250MB for processing. Now things aren't looking so peachy, eh. However! We can just cluster, right, so we have multiple JVMs running, to take advantage of all that memory! Ha! In the words of Lee Corso, "Not so fast, my friend!". The default method of session propagation is simply to multicast the session changes across cluster nodes. Now you have 1GB of user-specific crap clogging up each of your JVMs. That leaves little heap for actual system processing needs. Now, factoring in the fact that most users don't proactively log out of systems, rather letting their session lapse to timeout, and the fact that many (non-financial) systems have rather long timeout intervals, you could have ALL THAT MEMORY just sitting there for users who may not even be in the same room as the computer that was associated with that session. Bad. Smokey says that "Only you can prevent forest fires". Well I am saying "Only you can prevent OutOfMemoryExceptions!" You could also put it like this: "Friends don't let friends bloat their sessions."

However you say it, you need to understand the trade off between saving processing time on the database and ruining the overall ability of your application server to respond to increasing numbers of sessions and requests.