The real way to improve server performance

If you want to improve server performance, the best way is to move as much of the processing off it and onto the client machine. All those visitors of yours are running souped up AMD and Intel CPUs with their big screens and fat harddrives. No wonder your small little hosting plan can’t keep up. Here are some very good ideas from a Slashdot comment I read this morning.

  • Databases can get pretty slow with complicated queries, so upload your database to the client when they load the page and then your database queries are distributed.
  • PHP isn’t very fast, and neither are Perl or Python, so you don’t want to be running them on the server either. Write an interpreter for the language of your choice in Javascript and move your business logic to the client. This will also interface better with the client side database copy.
  • SSL is a performance killer, don’t use it. If you need to send something securely just prefix it with a predetermined number of random letters and numbers, no one will think to look beyond them.
  • Writing to databases can be pretty bad too. Try discarding all your changes, your users might not notice the difference, but they will appreciate the performance gain.

Check out the original post for a few more invaluable nuggets. If you follow all these tips you’ll be well on your way to becoming a respected and l33t hacker.

And now the big news. I’m really excited about this. The next version of WordPressMU will have a special Javascript client-side db (JCSDB) library built in. JCSDB will enable distributed and parallel access to your WPMU db without the danger of harming your servers. The best thing about it? If your site is dugg or slashdotted then your visitor’s machines will handle the load transparently. Instead of using slow and ungainly TCP/IP the library will use super-quick UDP to communicate. It really is the best way of sending data over the Internet.

I expect Matt will roll out JCSDB on WordPress.com just as soon as a few of the final bugs are ironed out. It might be a bit of headache for Barry and Demitrious to administer, but at least we can get rid of at least half our servers and use them to power a massive game of Counter Strike at the next WordCamp.

Update on May 31st! You all thought this was a joke didn’t you? Well, Google Gears has just been released and “is an open source browser extension that enables web applications to provide offline functionality”.

  • Store and serve application resources locally.
  • Store data locally in a fully-searchable relational database
  • Run asynchronous Javascript to improve application responsiveness.

It’s still in beta but Google Reader already supports it by allowing you to download up to 2000 items to read offline. This could be useful when I’m flying to SF next July!

Ubuntu's useful apt-get hints

Ubuntu 7.04, or Feisty Fawn as it’s known to it’s friends, has added a neat upgrade to the apt-get tool. For those who don’t know, apt-get is the tool Ubuntu uses to install and remove software. A small problem in the past has been trying to figure out what the name of the package required was.

In Feisty Fawn, if you try to run a command that isn’t installed a small message will be displayed telling you how to install it! The software has to be in your repository, so typing notepad and expecting it to tell you to apt-get install windows isn’t going to happen!

This morning I needed to update my local WPMU work area so …

$ svn update
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion

apt-get moo still works too! 🙂

If the mountain won't come to Google

While posting yesterday’s photo I used Google Maps to find the name of the quay where it was taken. Unfortunately, the map wasn’t exactly correct.

google-cork.jpg

Google Maps put Patrick’s Hill down by the River Lee where Camden Place should be. Also, since when did Merchants Quay go across Christy Ring Bridge? Yahoo Maps have it right however so it’s best to double check before you plan your journeys!

yahoo-cork.jpg

The Weekend section of the Irish Examiner has a lengthy piece on blogging. Unfortunately it starts out interviewing Perez Hilton but the second part concerns itself with Irish bloggers. The usual suspects are represented there plus a few you may not have heard of. Good read!

I voted today in the Irish election

Thanks Celine for taking care of Adam while we went and voted! I can’t remember who I gave all my votes to but the first two went to:

  • John McCarthy, an independent standing on health issues, including mental health. (yes, that is a pony tail!)
  • Noel O’Flynn, a Fianna Fail politician. He helped us a few weeks ago, although in hindsight there was little he could do. I’ll be blogging about that once an appeal is done.

I didn’t vote for the Worker’s Party, Socialist Party (same thing?), Sinn Fein or the Greens.

Around the Irish blogosphere:

  • Mel listed who he voted for.
  • Claire voted for the first time.
  • The Swearing Lady ponders the paradox that the Irish government wanted Sinn Fein to be part of the administration in the North, but nobody will touch them with a barge pole down south.
  • Adam thinks Rock the Vote was a complete failure. As I only became aware of that movement through blogs talking about it and taking the piss out of it I’d have to agree.
  • More coverage from Politics.ie, Irish Election, and of course Damien has plenty to say on the election. I rather enjoyed the grey tigers video he posted!

Can you vote on the 24th?

My dad texted me to ask if I was registered to vote in Blarney because he checked the electoral register and neither Jacinta or I were found there. I know we’re registered because we filled in and sent off the forms months ago and we’re receiving junk mail from politicians to prove it! Nevertheless I went to checktheregister.ie to check the electoral lists and sure enough we’re there. You have to scroll down quite a bit because the list of place names similar to our address is quite long. It’s still got an awful interface btw.

Like Michele, both of us can vote in two places. So much for the famous cleanup of the lists last year. They obviously weren’t that careful checking. Would I be commiting a crime if I voted twice? I wonder what the penalty for doing so is? What about a spoiled vote? Does that count?

Welcome Dublin!

It’s now easier than ever to use Google Analytics thanks to the interface revamp it’s gone through. Michele had the scoop yesterday and I’m very impressed. From your dashboard you can drill down to various aspects of your website’s traffic.

One of those is a clickable map of the world that eventually led me to the following map of Ireland. That’s a lot of traffic from Dublin, but it’s probably something to do with the way Internet traffic in the country is routed. That, or the fact that a quarter of the population live there. Welcome Dublin people to Holy Shmoly!

eire.gif

keywordhits.gif

A few days ago I listed the keywords people use to visit my site but now it’s easier to find that information and dig deeper into archived traffic stats. Inside the new Analytics interface, go to “Traffic Sources” where you’ll find “Top Traffic Sources”. Click on the keywords for pretty graphs!

Update! Some people aren’t happy with the new upgrade. Chris Silver Smith thinks it’s a downgrade from the old interface.

A day of happy and sad

A year ago today I married the most amazing and wonderful woman I know, Jacinta. She’s the love of my life, beautiful, caring, sensitive and the mother of our son Adam. She is the best thing that has ever happened to me.

We had planned an anniversary lunch and Adam had been changed for the umpteenth time, ready for the trip, but then we found out that Jacinta’s sister Gerarda had passed away peacefully in her sleep during the night. Life has been turned upside down.

Turning Japanese – a song Gerry and Jacinta went mad dancing to in the front garden to annoy a neighbour!