Archive for April, 2007

Ruby on Rails doesn’t Scale Well

Friday, April 27th, 2007

Ruby is a really great language with some awesome features, and Rails make it even better. But it appears that it does not scale well yet. Twitter is a great example of using RoR to run a website with millions of users hitting your server few hundred times a day each. Amazingly enough, it seems to be running very smoothly lately, but they did have many rough spots in the last few months when the sites performance was really poor.

It seems that their issue is not the execution speed, but the Rails design itself. In a recent interview a Twitter developer Alex Payne said:

The common wisdom in the Rails community at this time is that scaling Rails is a matter of cost: just throw more CPUs at it. The problem is that more instances of Rails (running as part of a Mongrel cluster, in our case) means more requests to your database. At this point in time there’s no facility in Rails to talk to more than one database at a time. The solutions to this are caching the hell out of everything and setting up multiple read-only slave databases, neither of which are quick fixes to implement. So it’s not just cost, it’s time, and time is that much more precious when people can[’t]reach your site.

Emphasis was mine. The lack of support for multiple databases seems a huge bottleneck issue for high traffic sites. Most of us don’t even think about stuff like that when considering using a platform to build our applications with.

I still think RoR is a good platform. It just might not be ready for the enterprise scale apps like Twitter. Most of us however will never experience this issue - unless of course we get slashdotted or something. I’m confident that the Rails team will use the Twitter problems to improve scalability features in future releases.

Need a Project

Thursday, April 26th, 2007

Now that my thesis is done, I feel that my procrastination skills might get bit rusty. Or even worse, I might start using them at work. Oh wait, never mind - I already do that. Either way, I need more exercise in extreme procrastination.

So, I figured I need a project. Something that I could neglect, put away for later, and generally feel guilty about not doing. Yes, that is exactly what I need. mrgreen

So for the lack of better ideas I created a Java Twitter Client project on Google Code. Note that I haven’t written a single line of code yet. I haven’t really did much research on this either, beyond scanning through the Twitter API.

Why twitter? Perhaps because twitter is cool. It is still very hot on teh internets, and it’s API seems relatively straightforward. I’m not really looking to compete with Twitterific, Twitteroo and similar clients. This is more of a fun project for me to mess with.

Any input would be greatly appreciated. If you want to get involved and help out with coding, testing or whatever, let me know and I’ll add you to the project. Note that you will need a google account. If this project ever goes anywhere, we can always move it over to Source Forge. Google Code seems sufficient for now.

Of course I could host it here. I have subversion running on this very server. But Google Code offers integrated Wiki, and a bug tracking system which is nice. The 100 MB quota is kinda lame. Come on Google, I get 3 gigs for email, but only a hundred megs for code? WTF? Still, my current Eclipse workspace with 17 different projects in it, is only 30 MB. It should be enough, at least for the time being.

So, what do you guys think? Suggestions?

WTF Video Clip of the Week

Wednesday, April 25th, 2007

Alright… Anyone knows what the fuck is going on here?

What is this movie? WTF is with the little blue smurf dudes with machine guns? Anyone can recognize the language they are speaking in, or were they just mumbling intelligibly there? Btw, can anyone read the language that this video service site is using? Is it Chinese? Sorry, I can’t tell.

I don’t know what the hell is going on in there, but I want to watch the rest of it, if nothing else just for the WTF value. 10 points for anyone who can give me a title and/or link with more info (in english).

Thesis Defense: Final Update

Tuesday, April 24th, 2007

By this time of the day I’m getting tired of talking about it. But let me do this again for the sake of completion. Next time someone asks me, I can just refer them to this post and not have to recall the events of the day again.

My morning conversation with Dr. Robila:

Robila:
So, did you rehearse your presentation?

Me:
Well… I didn’t really rehearse-rehearse it. I kinda went over the slides several times in my head… I didn’t actually - you know - speak it out.

Robila: [with an OMG WTF expression on his face]
Oh…

Me:
Hey, I usually just wing these things. This is the most I prepared for a presentation in my life.

The presentation went fine. I actually even finished in the alloted time slot of 40-45 minutes even though I never really timed myself. As I said - I’m not a great speaker. I’m not even a good speaker. Ok, I’m a downright lousy public speaker. But I can wing it most of the time with little preparation, and actually make coherent points that don’t usually look like I’m reading my notes, or reciting from memory.

Here is what happened during the presentation. It’s probably funnier if you know the profs I will mention here but anyway:

  • Dr. Gutierez was probably the only person in the room who actually read my thesis and understood most of it. He had 3 pages of notes with minor corrections for me. Most of these were things like “eachother should be two words”, “change a to an here” and etc… Free proofreading! Yay!
  • Dr. Antoniou asked a lot of questions that may or may have not been on topic, or relevant to the thesis.
  • Dr. Benham didn’t say a word during the whole thing. I don’t think he fell asleep, but I might be wrong.
  • Dr. Zaritski argued with Antiniou about parallel processing
  • Dr. Jenq didn’t ask any questions - just had some comments to support of what I was saying
  • Dr. Robila was very helpful diffusing Antoniou’s questions by claiming that the things he asked for were out of scope, or irrelevant to my research
  • Dr. Deremer got there late because of parking issues. For those who do not go to MSU - finding a parking spot in the morning borders on a miracle. Apparently this also applies to faculty.

The presentation slides are here if you want to check them out. I will probably post the thesis paper somewhere at some point. Not now though.

At the end I was asked if I’m going for a PHD. I said that I’m planning to work for a bit in the industry, and then possibly go back for a PHD. Some people said if I want a PHD I should go back right away. The problem is - I don’t know if I really want it. I mean it would be really awesome to get that title, but I don’t know if that’s how I want to spend the next few years of my life. I’m totally confused about the future at this point. I need a fucking vacation.

Of course I had a typo on the thesis signature page so I had to fix it and reprint it. This is ridiculous but my laptop was actually the only machine in the department with a working Latex installation that I knew of. And it booted to a fatal disk error. Whooptie do!

I was able to drop to single user and run fsck on the drive. It was churning away for about 20 minutes fixing all kinds of strange errors and inconsistencies. I have no clue how did my file system get corrupted like this. I did shut it down properly last time around. I’m guessing it might have happened when it crashed on me last week when I had these memory issues.

I finally managed to get it up and running, reprinted the signature page, tracked down all my committee members, made them sign it, and left the thesis at the Dean’s office for signature.

So it’s done! Now I just need to get some paperwork done so that I can actually graduate. But that’s a whole other story.

Tomorrow is the Day

Tuesday, April 24th, 2007

Yep, the defense is tomorrow:

April 24, 10:30 am, RI 374

Wish me luck!