Deploying Rails Applications - talk at Barcamp Bangalore 3

Posted on April 13, 2007

I did a talk was on Deploying Rails Applications at Barcamp Bangalore 3. Around 20 folks turned up, which was great considering that it was one of the last talks of the day. The LCD projector needed a fair amount of tweaking before it finally came to life, so we ended up starting a bit later than planned.

The slides are here.


The audience had questions about virtualization, Nginx and debugging RoR apps, and we ended up with a nice discussion on Rails hosting options. Gitu has a pretty flattering review of my talk:

Deploying Rails Applications – Vivek Prahlad
This was a kind of a neat demo i liked the most. Vivek gave a neat presentation on deploying Rails applications and also gave a real time experience of how it works behind with his blog. FYI his blog runs on RubyonRails.

One of things I talked about was about how I’d used a combination of Monit, Cron, Nginx, PostgreSQL and Mephisto to create this site. My aim had been to put together a self-healing setup that would essentially take care of itself with minimal manual intervention. (This blog runs on a 256MB VPS from SliceHost. The site has been up for approximately one and a half months, and the total memory usage is around 200 MB. The mongrel cluster runs a pair of mongrels).

Monit is really what brings it all together – it now seems to be the monitoring tool of choice for RoR applications. (If you’d like to know more about Monit, check out this post). I especially like the natural language syntax the the Monit configuration uses:

# eating up memory?
if totalmem is greater than 60.0 MB for 5 cycles then restart
# high cpu load?
if cpu is greater than 50% for 2 cycles then alert
# hung process?
if cpu is greater than 80% for 3 cycles then restart
# bad, bad, bad
if loadavg(5min) greater than 10 for 8 cycles then restart
# something is wrong, call the sys-admin      
if 3 restarts within 5 cycles then timeout                         
 

I was pretty happy with how the talk went, considering that I’d put the slides together after putting up the topic on the board!

Barcamp Bangalore 3

Posted on April 12, 2007

BarCamp Bangalore 3 was held at IIM Bangalore on the 31st of March and the 1st of April. Barcamp is an unconference, which means that the content of the sessions is driven by the the participants, rather than the organizers. The session schedule is here.

Here are a few pictures from the first day:

There were a lot of familiar faces from the the previous Barcamp, which was held at the ThoughtWorks Bangalore office: Sowmya, Siddhi, Kiruba, and many others. This time around, there were a lot more attendees, but a proportionately smaller number of speakers. Unfortunately, that meant that a couple of slots had no takers on the first day. I did a talk on Deploying Rails Applications – more on that in my next post.

Siddhi has put together a nice roundup here. Some of the sessions I’d attended were:

Digital Study Hall / Digital Green – Randy Wang and co.

The Digital Study Hall is a non profit project that aims to get rural students to benefit from good teachers, by creating a system with elements of YouTube, Kazaa and NetFlix. The aim is to record content using cheap equipment, and share the content between schools using a variety of channels. The project uses a simple, but very effective technique they call Postmanet, which is essentially a snail mail based content replication system.

An amusing tidbit from Randy was about how they’ve observed teachers competing among themselves to deliver the best lectures à la American Idol. Digital Green is a similar project for farmers to share best practices and information with each other. Both the projects are in the early stages, but do seem to have a lot of potential.

Principles of Programming and JavaScript – T.B. Dinesh

Dinesh’s talk was about his experiences with using Javascript as the programming language for teaching Principles of Programming. His main rationale was that the JavaScript runtime was easier to access than the toolchain required for most other languages. The audience, however, seemed to disagree. I think some folks seemed to be confused about browser compatibility issues, which don’t quite come into the picture if you consider javascript as a language in it’s own right.

CruiseControl.rb – Sidu, Srushti and Swaroop

CruiseControl.rb is the new continuous integration tool for Ruby / Rails applications from ThoughtWorks. Sidu, Srushti, and Swaroop spoke about CI in general and how to go about using CC.rb. There’s a working demo of cc.rb here

Discussion: Are we ready to move to Products from Services – Savita Kini

This was a spirited discussion on whether the Indian Software industry is ready to migrate from services to products or not. I’m not quite sure whether the discussion led to anything concrete, but it was fun nevertheless. Someone mentioned that he felt people look for jobs with the Indian IT majors in order to get married – that had everyone in splits!