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!

Take a hint Mary Harney!

I’ve previously written at length about Mary Harney and my distaste for what she’s doing to the health service in Ireland so this image posted to Blogorrah made me smile.

maryout.jpg

There’s a general election on May 24th but I thought Harney would be retiring after her disgraceful stint as Minister for Health. It came as a shock that she’s actually standing in the election!

To see more of Mary Harney be sure to check out the cartoons on Langerland!

The red nosed Clarkson

The Internet is a great place to be. One moment you’re surfing through high quality blogs and the next you’re watching The Top Gear Band trying to play a Billy Ocean song for Red Nose Day in the UK last Friday.

Actually, I read Jeremy’s article in the Sunday Times and went looking for it so I had no excuse. I’m still amazed at how quickly these things make it online. I hope I don’t lose that wonder and become blase about this whole world-wide communications tool at our finger tips. Oh look! an email thingy. I should print that out and read it!

Did you see the last Top Gear of the season? Wasn’t it mad driving those “limos” through the heart of London? Looking forward to the Summer season! Oh look, there are clips of that too. It looks like the Billie Piper interview is in there somewhere too.

Simply because it’s unusual to get so many egos into one small room, here’s Ricky Gervais, Stephen Merchant and others doing a sketch for Africa via Blogorrah. It’s a great laugh too.

Go out and buy the DVD when it’s available. It’s all for charity!

I made my Macbook cry

If Macs are so perfect why do they keep crashing and dying and need to be rebooted seeminly after every update? I’m just back from another reboot when Flock brought the system down. Yes, yes, must switch to another browser but after Mark’s ranting about the slowness and general bloatedness of OS X Firefox I’m wondering what I’ll use.

For all the fans of Microsoft Windows out there, here’s a sort of BSOD from the Mac. This happened at the last BarCamp in Waterford. I have witnesses!

2007-01-20__mg_8276.jpg

In the interests of fairness, I should also say that Linux died horribly on me when Firefox, Flock, GIMP and Bibblepro were all loaded and swap went haywire. It was quicker to put it out of it’s misery and reboot than wait for the kernel to kill one of the above apps. But why spoil a good anti-Mac rant by injecting some perspective?

Hi! I'm Linux!

imlinux.jpg

Apple advertisments become cliches within a short space of time which is a testament to how good they are, or perhaps how often the fanboys go on about them in online forums…

Unfortunately Linux is still regarded as being a geeky system only and spoofs of the current Apple advert feature a guy dressed in a Tron costume look ridiculous and certainly won’t help. This advert from Novell may help change that. If it doesn’t, well it might pique the interest of some guys who will try Linux and like it. Even though the advert is sponsored by Novell, I recommend you try Ubuntu Linux. You can download and try it without installing and it’s super easy to use!

Read all about it on Reverend Ted’s site and download the first advert.

All in all, it’s a balance that we hope to have struck right: representing Linux as sexy and confident, while avoiding sexual cliches that are degrading to women. While there may be some flaws in our execution (particularly how the third video throws out the people as computers metaphor altogether), overall I really hope that we managed to create a playful spoof that effectively subverts the “Mac vs Windows” framework that Apple has established with the “Get a Mac” campaign.

Ted updated his post with the second and third videos. I’ve included them here for your blogging pleasure.
Continue reading “Hi! I'm Linux!”

Writing Perl, the Vista way

Perl is complicated enough as there are a half dozen ways of doing any one operation, but what if you used Microsoft Vista’s speech recognition to type? I was only watching and wanted to stop the movie after 32 seconds, I don’t know how he kept going for 10 minutes! I dare you to watch this and not laugh! I wonder how well Vim would work? (via Richard)

PS. Richard increased the Linux userbase by 1 by converting one of his coworkers using the Ubuntu live CD. I used that CD last week and it’s really impressive. A bit strange when the live desktop appears, but the Install icon makes things obvious. Grab the latest Ubuntu live CD and give it a whirl if you’ve never used Linux. I think you’ll be pleasantly surprised.