Problem Build a vagrant development environment that will serve an rails application that works on multiple subdomains. Moreover that application consists of multiple smaller apps that all are running with a single domain.
Let’s talk about pretty tedious task - upgrading rails, of course it can be interesting experience, but if you have relatively large application to upgrade it can be cumbersome, here are my thoughts after doing through process of switching Rails 3.2 to Rails 4.1.
-> <-
Ruby is very pretty, and unfortunattely it can be very slow. Beautiful syntax and flexebility of this language has its price (well, it’s not so bad compared to other interpreted languages anyway).
Let’s go over few (totally random) things that might cause performance issues.
-> <-
When you’re running community-driven website sooner or later you will have to fight back spammers. There can be different kind of spammers, but the main question here is - how do we stop them from flooding your precious site?
I must say time flies really fast. It’s been a while since I started my journey with working remotely full time. After moving from Warsaw to Cracow I’m working in Warsaw after all. I’m really happy that remote working (in general) is getting more and more attention (I guess you already read Remote?) and that companies start to see that huge office space isn’t always what makes employees happy ;).
I noticed that I ‘starred’ over 320 gems on rubygems.org. So I decided to do some cleanups there and while I’m at it - share with you few real gems that I like to use. So here it is - my tiny list that I called “My Gems of 2013”, mainly because it sounds catchy; a little bit of marketing didn’t killed anybody yet, I think.
I tried to avoid some, well, really obvious choices (like rspec, mocha, sidekiq, devise, resque, carrierwave, etc. - you get the idea) so maybe you fill find that one precious, very special thing that you will love ;-). Here we go.
Few days ago I notice that RVM took over 8GB of my disk space for various gemsets/rubies. RVM in general is a beast (20k lines of shell script, you kidding me?!) and I used it since I started my journey with RoR, it was great (hey, you can support rvm 2.0 if you want/can) but I decided it was time to look for an alternative. It was nice meeting you RVM, but it’s time to move on.
Few days ago a new project was thrown in my face ;). And it was interesting I must say - extracting some heavy internals of existing application into internal API + external client (app), that could be developed further with some additional features.
If you’re reading this you’re that means you don’t need further introduction to the problem, let go straight to solution then ;).
In a company I’m currently working we have been using resque to do some heavy asynchronous work. And well, that’s like obvious choice in Rails world - just go with resque, fork some processes and relax ;). But when you get to a point, when you need few hundred workers and few servers, you start to ask yourself - can’t you do it better?
You probably can. There are some pretty smart folks out there, who were so kindly to share their knowledge. And that’s how you can find sidekiq build on top of celluloid.
Sidekiq uses multi-threading, so you can leverage that even if you use MRI (that have un-famous GIL) - if you have a lot of I/O bound work you can still benefit from this great piece of software (even without need to migrate to JRuby or Rubinius).