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!

Asia Pacific Testing Conference

Posted on April 03, 2007

I was at the Asia Pacific Testing Conference in Singapore last week. The two day conference was the first of its kind in the APAC region – around a 100 folks participated. The agenda was quite packed, especially since the speakers had half hour slots to do their stuff.

Here are a few pictures from the conference and the area around the venue:

The audience was quite new to agile – most of the folks I’d met used variants of waterfall. Interestingly, a lot of the speakers talked about how it becomes difficult to handle changes if you’re following a waterfall model. When requirements changed, the advice seemed to be to either refuse to implement the change, or to notify every single stakeholder about it. Another common theme was about how the CMMi does not address testing explicitly. During the breaks, I ended up chatting about how agile addresses both of those issues, and how developers and testers collaborate closely with each other on agile teams.

I especially enjoyed the talks on Exploratory Testing and Test Strategy and Automation for Complex Systems. The automation talk was about a small team of testers went about automating different aspects of testing their system to great effect. Wilfred Soon delivered the second half of the presentation, and he had the audience in splits with his one liners.

My talk on Web Test Automation with Selenium went quite well – I managed to complete the talk, which included a couple of demos, within my half hour budget. A couple of folks mentioned that they were keen on trying out Selenium on their projects, mainly because of the support for testing Ajax applications. Funnily enough, someone came up after the talk and asked if I was one of the founders of ThoughtWorks! Now I don’t quite remember talking about anything that even remotely suggested that :-)

One of my messages was around how test code is code, and how the practices and principles that apply to good code apply to good test code as well. Refactoring, DRY, and abstraction are just as valid for test code (More on that in a future post, maybe?). One of my demos was around refactoring Selenium RC tests, which definitely got the testers in audience excited – most of them had never seen refactoring in action before.

During the talk, I’d mentioned Continuous Integration briefly. The majority of the audience was used to nightly builds, and found CI intriguing.

The presentation is here

Overall, it was a good conference – I made a lot of friends, and I hope to be back the next time around as well!