Archive for August, 2007

Youtube scalability and what happened to lighttpd 1.5

Friday, August 31st, 2007

Mike sent me this link of a Google Tech talk on “Scalability at Youtube”.

Its a interesting read for a number of reasons:

  • You Tube had a tiny technical team that built and ran the site.
  • They show why the used various webserver configurations – apache vs squid vs lighttpd
  • It explains why development of lighttpd 1.5 has stalled. (they developed the code to integrate libaio into lighttpd 1.5 and once they were brought by google they moved to google big table)
  • Introduces the concept of database partitioning or shards

Enjoy!

Talking at Terralink's NZ Mastermap

Monday, August 27th, 2007

talk.png


I’ve been invited to speak at the launch of Terralinks new data product – NZ Mastermap.

I’ll be speaking in Wellington (Tuesday morning) and Auckland (Wednesday morning). My talk is on “Online Maps – Past, Present and Future”. I’ll be providing a brief look at online mapping; what’s happened over the last 2 years and provide a hint of what to expect in the future.

If you’re coming to the breakfast presentation, either tomorrow or Wednesday, make sure you come and say Hi.

Content Aware Image resizing

Monday, August 27th, 2007

content-aware-image.png


(From Slashdot)

Here’s a presentation from this year’s Sig-graph about techniques for content aware image resizing. There’s a youtube video of the presentation and pdf of their research.

Using the techniques you can resize image and remove non-important components of the image. These techniques will pay dividends in developing content for mobile devices. Especially as images take up a high percentage of the total page size.

Great scalability web site.

Thursday, August 23rd, 2007

Just found a link to highscalability.com, the site is an aggregation of links, articles and blog posts about scalability. They have a lot of good overviews of various techniques and some good advice.

Here’s my pick of interesting articles:

Testing RJS with assert_select_rjs

Thursday, August 23rd, 2007

I am surprised to find little about testing RJS in rails, with the exception of ARTS. However, assert_select_rjs seems to be the replacement to ARTS. This is nice, as we have now one less plugin to worry about. (I am of the opinion that testing plugins should be integrated into core if it is used in more than one test)

I’ll show you one example.

Let’s say that we have scaffolded our controllers, and now have a RJS function that we want to call when we destroy a membership. We first create our test

memberships_controller_test.rb
[source:ruby]
def test_should_destroy_membership
old_count = Membership.count
delete :destroy, :id => 1
assert_equal old_count-1, Membership.count
assert_response :success
assert_select_rjs :replace_html, “membership-action”
end[/source]

I am just testing if replace_html was called on the ‘membership-action’ element, without regard to what content is replaced into. If you want to test the content being replaced, pass the value to be compared as the second parameter of assert_select_rjs. E.g.

[source:ruby] assert_select_rjs :replace_html, “membership-action”, “Some Content”[/source]

Test and watch it go red.

Now we create our RJS template to make the test go green. The content can be anything, since I did not test for equality of the content to be replaced.

memberships/destroy.rjs
[source:ruby]page.replace_html ‘membership-action’, :partial => ‘memberships/join_link'[/source]

Run the test and feel the green.

Looking under the hood of assert_select_rjs, it seems that it is taking a copy of @response.body, and then running a Regular Expression match with the test values. Something worth knowing.

It also checks for content-type=text/javascript, so make sure your @response is returning javascript, otherwise the test will fail in a non-obvious way. If you forgot to include format.js in the controller, the assertion error message will be displayed as

“No RJS statement that replaces or inserts HTML content”

Just remember to put format.js in your controller, and you should be alright.

Links

Thursday, August 23rd, 2007

Biz

Tech:

Geek:

Ranting about bad applications

Thursday, August 23rd, 2007

<rant>

I’ve just trying to figure out why my windows XP is running like a dog. I have discovered two alarming things.

  1. Windows Divx codec and player installs a toolbar that seems to appear every 2-3 minutesĀ  in the system tray. After some googling I found that I have to download ToggleToolbar.exe to turn it off. What the f**k ??? Why do I have to download a program to turn off a system tray icon.
  2. Google Desktop. I’ve had a love / hate relationship with google desktop. I love that I can search my machine for emails, documents etc. There are a couple of things that I hate. First, its steals my window focus all the time. I tried uninstalling some widgets but it still does it. And Second it has serious memory leaks. This morning the Desktop grew to 1.7Gb of Virtual Memory. ARRRGGGHHH. So I did as little experiment I close all the widgets and left it running from the toolbar. It grew to 700Mb within about an hour. So, bye bye Google desktop.

</rant>

A mac is looking more and more inviting everyday…

Who said Microsoft isn't secure….

Wednesday, August 22nd, 2007

As spotted on Digg…

Here’s a Microsoft error message:

Your password must be at least 18770 characters and cannot repeat any of your previous 30689 passwords. Please type a different password. Type a password that meets these requirements in both text boxes.

As they say you’re only as good as your password….

Telstra entering the Mobile market soon.

Wednesday, August 22nd, 2007

With all the recent discussions on Rod’s blog about Mobile pricing, some respite may soon be on the way. Telstra Clear have publically announced that they are launching soon. Hooray, hopefully we’ll get some competition.

Here’s what I’d like to see.

  • Hygiene factors: Good Coverage, good quality sound and sim card compatibility, good customer service, and a good website so that I can customise what I need.
  • Flat SMS rates 5c max for both Domestic and International ($10 txt has been out for years – Stop bundling and just set a lower cost.)
  • Realistic pricing structure for SMS services – 5-7% royalty based on volume
  • Data bundles $25 for 1Gb or $1 per 10 Mb adhoc
  • Release Cell Tower ID’s so that we can unlock the world of location based services

What do you want to have from your Mobile provider?

Time Picker for Rails

Tuesday, August 21st, 2007

Having worked with Rails for the past few weeks, I have discovered that it is awesome fun. So, when I encountered the time_select method of the DateHelper classes, and found that it outputs two drop downs for a single time (hours and minutes, three if you include seconds), I was not too happy.

Therefore I made a plugin for a single select for time. Time Picker is a plugin that gives you a nice view helper function for picking times.

So to install :

script/plugin install svn://rubyforge.org/var/svn/timepicker/trunk

or

svn propset svn:externals 'timepicker svn://rubyforge.org/var/svn/timepicker/trunk' vendor/plugins

This plugin is still quite alpha, so please use it and feel free report any problems or suggestions to me.


http://www.canakkaleruhu.org http://www.vergimevzuati.org http://www.finansaldenetci.com http://www.securityweb.org http://www.siyamiozkan.org http://www.fatmaozkan.com http://www.sgk.biz.tr http://www.denetci.gen.tr http://www.bagimsizdenetim.biz.tr http://www.mevzuat.biz.tr http://www.security.biz.tr http://www.sorgulatr.com http://www.kanunlar.biz http://www.prsorgu.net http://www.sirabul.com http://www.emekliol.org http://www.coklupagerank.com http://www.coklupagerank.net http://www.coklupagerank.org http://www.prsorgu.org http://www.scriptencode.com http://www.sirabul.net http://www.sirabul.org http://www.sitenizanaliz.com http://www.seoisko.com http://www.seomavi.com http://www.scriptencode.net http://www.scriptencode.org