Skip to content

Informal notes from #frozenrails 2010

Thanks to organisers from Kisko Labs and the HHLinuxClub on Friday, May 7th, 2010 Finland got its first  Rails conference.

Conference has drawn very interesting speakers and  international crowd – from Finland (naturally), Sweden, Poland, Germany, Russia and other countries. I made a few notes from selected talks on the conference.

Chris Wanstrath / GitHub (@defunkt)

  • Slides: http://www.slideshare.net/err/inside-github
  • Linus Trovalds Google tech talk about git – where Linus tell you that you’re stpid if you’re not using git
  • rack-mobile-detect – is used by GitHub, super useful if you’re planning to create mobile optimized version
  • GitHub uses Unicorn as an application server – personally I’m not sure if that’s better than Apache + Passenger. Chris tells that Unicorn is cool, because does fair load balancing on Linux kernel level, also Rails are loaded only once – and then required number of processes are forked – and this is very fast, a lot faster than loading rails separately for each Mongrel. And when one of the processes dies – there’s no need to re-load Rails, but just fork another process.
  • GitHub users BERT to forward requests to one of their six servers – BERT to Erlang is the same as JSON to JavaScript
  • GitHub doesn’t use delayed_job anymore since they needed several queues with different priorities – so far they use resque, but are considering developing a real queue management system

(Continued)

Share

No space left on device – running out of Inodes

One of our development servers went down today. Problems started with deployment script that claimed that claimed “No space left on device”, although partition was not nearly full. If you ever run into such trouble – most likely you have too many small or 0-sized files on your disk, and while you have enough disk space, you have exhausted all available Inodes. Below is the solution for this problem.

(Continued)

Share

Git – revert or amend last commit

Since we moved from SVN to git in HeiaHeia I had to revert or amend changes I accidentally committed or committed and pushed to git repository. This is not the most common operation, so I have to browse the documentation every time I do that. This is more of a memo to myself, which hopefully will be useful to others too.

Committed some changes, didn’t push them, and need to amend the commit:

git commit --amend -a -m "Commit message"

Committed some changes, pushed them, and need to amend the commit, do the revert operation instead, since someone might’ve already used your changes.

Committed some changes, didn’t push them, and need to undo the commit:

git reset --hard HEAD^

This will just toss away the last commit completely.

Commited some changes, pushed them, and need to undo the commit:

git revert HEAD

This will automatically create a new commit, reverting the changes from the previous

Share

Web hosting for internet startups

A lot of companies launching their own internet services have faced the same question – where to host. Over the course of the last few months I was asked for opinion on this matter several times. While I have no definitive answer, here are some recommendations.

Don’t start with maximum capacity, start small, and think about scalability – how fast you can do it, and how you will do it. Then map the plans to what your selected hosting provider offers. Avoid temptation to use your own hardware, unless you really have resources for administering and maintaining it and a real need to have physical access to the servers. Even companies using their own hardware use virtualization to run virtual machines on top of physical ones.

Two years ago, when we were just experimenting with ideas of the social training log, a shared hosting option on Dreamhost gave us the best prices/features/quality combination. When we launched first closed version of the service named Moozement at the time, we switched to Dreamhost VPS, which allowed enough flexibility and had reasonable pricing. For HeiaHeia (Moozement beta version) we’ve chosen Linode, as it offers Xen virtualization (as opposed to Dreamhost’s VServer), servers with up to 14400Mb of RAM, easy resizing, wide selection of Linux distributions, and several data centres to choose from, including one in London. As HeiaHeia grows, we are preparing for the next step, but for now Linode proved to be excellent choice.

If your company is based in EU, you also need to remember about EU Data Protection Directive – your servers need to be physically located in one of the European Union countries or in the US with a provider following Safe Harbor Principles.

If you have no clue about how much CPU/RAM/traffic your application will need – check reference cases – there are plenty on the internet. Here are just a couple of examples: social network Ravelry and Facebook app Friends for Sale.

Want second opinion? Check these:

  • Eivind Uggedal has a very thorough comparison of Slicehost, Linode, Prgmr, Rackspace and Amazon EC2 pricing and performance and arrives at a conclusion that Linode gives you best bang for the buck.

In case you decide to use Linode, use this referral link to give us some reward :)

If you’re planning to host a low traffic service, and don’t want to spend much time on system administration – Dreamhost is a great starting point. And as I already wrote earlier, Dreamhost provides excellent value for money. If you are looking for a good hosting – use IVANKUZNETSOV promocode and get a $50 discount when setting up an account on Dreamhost.

Share

HeiaHeia – probably the most fun way to keep fit!

Wow, what an autumn it has been! It has come and gone so fast. By Christmas 2009 a major milestone was reached – Moozement moved from Alpha to Beta phase. Most of my time and efforts went into development of the service – and it was exciting time of super intensive work in a small, but very dedicated team.

Beta version brought with it new professional design, easier to use interface, new interaction concepts, new sports, new faster servers.  We decided to change the name of the service as well and were inspired by a hypnotic Heia! Heia! chant that Norwegians use to support their cross-country skiers and other athletes. We named our service HeiaHeia to give it a spell of positive cheering among friends.

Sports and wellbeing are hot markets both regarding hardware and web service innovation. HeiaHeia’s focus is on the social aspect of sports – mastering the ways in which friends can motivate each other in a positive spirit, without being overly competitive. The difference between us and most of the other players is that we want to provide a service which anybody can use. You don’t need any kind of technical gear to use the service, and the service itself is as easy to use as Facebook.

The HeiaHeia philosophy on sports is that everything counts. HeiaHeia already supports over 250 different types of sports, most of them requested by users of the service. Understanding user behaviour and user requests will remain a guiding principle in the development of HeiaHeia.

Work doesn’t stop here, and new functionalities will be introduced on a weekly basis going forward, in a true Web 2.0 mode of development.We are looking forward to a very exciting year ahead.

Share

Agile distributed team – using chat to run scrum meetings

The current development team that I’m working in is really small – just 2 software gurus, a product owner and me as a scum-master/system admninistrator/part-time developer/architect.

Our team is distributed to the extent that sometimes all four of us are located in different places during our meetings – but time zones difference is in most of the cases withing 1-2 hours. Up until recently some of us didn’t have a permanent office and had to participate in daily scrum meetings, and sprint planning/reviews from public open spaces. (Continued)

Share

Upgrading iPhone firmware using VMWare and Ubuntu 9.04

This was the second time I upgrade firmware on my iPhone, and second time I ran into the same problem.  In the middle of the update iTunes reports “Unknown error” and iPhone dies (well, goes into recovery mode, but it is not much help). If that happened to you, don’t panic! To make this geeky combination (Ubuntu 9.04, VMware, iTunes and iPhone software update) work, there’s a little trick you need to do. (Continued)

Share

Setting up Ruby, Rails, Git and Redmine on Dreamhost

Git, RedMine, Ruby, Rails on DreamhostThe task is to have:
- Redmine installation on redmine.mydomain.com
- Several Git repositories on git.mydomain.com with different access rights to each one

This proved to be a non-trivial task. There is a number of tutorials on the net, but none of them described the full solution. So after getting it all to work, I decided to share all the tips and tricks. Feel free to comment, if you will find problems with the following set of instructions.
(Continued)

Share

Migrating domain emails to Google Apps mail

logo While performing some administrative tasks on one of the domains I maintain, I decided that the time has come to switch to a modern and reliable solution – Google Mail.

If you have an IMAP mailbox hosted somewhere and you want to move it to Google, then do the following (example is set for migrating from Dreamhost, but can be used on any other IMAP mailbox):

1. Register at Google Apps for your domain

2. Re-create your email accounts

3. Log in to  shell on your hosting and execute the following command:

 mailutil transfer -verbose -merge append \
   '{a1.balanced.<your-dreamhost-mail-server>.mail.dreamhost.com\
   /imap/ssl/novalidate-cert/user=<your-dreamhost-username>}' \
   '{imap.gmail.com/ssl/user=<your-gmail-username>}'

<your-dreamhost-username> is the name you use for logging into your existing IMAP mailbox – e.g. info@mydomain.com
<your-dreamhost-username> is the name you use for logging into your Gmail account (just username if you’re migrating to @gmail account or username@domain.com if you’re migrating to Google Apps account

4. Enter first password to your existing IMAP account, then password to your Gmail account

5. Voilà – prepare that this can be a long running operation, especially if you have a lot of mails.

(Thanks to joyjit for advice)

Share

ArcticStartup on Moozement

moozementdevsVille Vesterinen from Arctic Startup published a nice and encouraging piece on Moozement. The observations on what Moozement is, what it’s most useful for, the current state of development (early stage, but we very much believe we’re onto something), and the direction of future development, very much resonate with our own thinking. There’s also a video interview with me ;)

Share