One of the most important characteristics of modern web application is scalability. With the advent of the web 2.0 era your web application can grow up very fast to millions of users and almost all the now famous websites that experienced this rapid growt shared the same problems: how to design a web application to serve from hundredths to hundredths millions of user requests.
Some people would argue that some language is faster than others or some framework is better scalable than other but the real answer is that there’s no silver bullet for scalability.
What you have to do instead is to follow some simple rules while you write the application from the ground (even if someone says that performance is not an issue before performance is an issue).
This is far the most common issue in scaling. If you build a web application that is a big block of code, a huge monolitic tightly coupled mixture of code and HTML, you will loose the ability to optimize and separate what can run fast and what can be run more slowly.
Like a modern manufacturing system, your application must be built as separate and loosely coupled modules. By keeping each module small and independent you can optimize the usage of limited resources like CPU and memory and get the best performances.
By using standard RPC mechanisms (like SOAP or REST) or enterprise message busses (like ActiveMQ or XMPP servers) you can easily and transparently interconnect these modules while maintain the ability to optimize and scale each single module.
Some common features that can be separated from the main application are:
When I discover delicious it was too late for me since at the time I had too many bookmarks already tagged in Yahoo’s Myweb. But since then I’ve always wanted to move all my bookmarks to delicious but didn’t found how to do it, until now.
Some days ago I found this python script that makes use of myweb and delicious web services to migrate the bookmarks.
Unfortunately the script wasn’t very reliable, it was crashing quite often and, since I have more than 1500 bookmarks, it was quite painful since every time I launched it, it was starting from scratch.
So I decided to build a new script (actually two)… in Ruby.
First of all you must install Ruby and rubygems on your system.
Then you must install rubilicious gem.
Here’s the first ruby script that you must run:
Copy this code and paste it to a file (like myweb_export.rb). You also want to set the yahoo_id variable with your myweb ID.
Then you can run the script:
For the final step you’ll need the script below:
You want to set the proper values for USER and PASSWORD of your delicious account and copy the code to deli_import.rb.
The script waits 1 second after each URL since this is required by the delicious API.
Limitations: unfortunately since the Myweb web services only allow the search of public bookmarks, you’ll not be able to migrate private bookmarks. You must do this by hand or wait that Yahoo will release a Myweb webservice that supports authentication.
I’m selling some of my technical book at very cheap prices, take a look and send me an email if you’re interested.
While looking around the Facebook developers docs I’ve found a page called Programming Puzzles. Basicaly if you want to work for Facebook you better try to solve some of these puzzles with one or more of the suggested languages and send the source code along with your resume.
Next week after my university final exams I’ll try to solve some of them in Erlang and Ruby, in the meantime have a look and try yourself.