Skip to main content

Posts

Showing posts from 2012

Nagios checks for Sidekiq Queue size monitoring and Joyent RAM size

At Wanelo we are committed to sharing as much of our code as possible with the world, since we are ourselves highly reliant on open source movement (ruby, rails, etc).

Here is a small but growing project with simple BASH shell scripts used by Nagios monitoring system to ensure things are running smoothly.

https://github.com/wanelo/nagios-checks

Please see the examples in the README on how to use it with nagios.

Getting RMagic and friends to work on OS-X Mountain Lion

Upgraded my ruby environment today to Mountain Lion.

Here is a quick checklist that I went through to get everything working.  The largest change was having to reinstall XCode and command line tools, and also download XQuarts in order to reinstall ImageMagick successfully. Without it, I was getting errors building RMagick of the following shape:
ld: file not found: /usr/lib/libltdl.7.dylib for architecture x86_64clang:
error: linker command failed with exit code 1
(use -v to see invocation)make: *** [RMagick2.bundle] Error 1

Quick checklist: Install Mountain Lion Install XCode 4.4 Install command line tools from XCode 4.4 Preferences dialog Install XQuartzIn terminal run brew update brew uninstall imagemagick brew install --fresh imagemagick wipe out your ~/.rvm folder reinstall RVM and install the latest ruby 1.9.3-p-194 run "bundle" in the project folder run "rake" and rejoice
References:

https://github.com/mroth/lolcommits/issues/65

Activity Feed Design

I normally don't publish work diagrams, but this one sort of looks like work of art.

It represents a collective design we came up with around aggregation of activity feeds on wanelo.com. If you have an account, you will soon see the results of this on http://wanelo.com/following


Using CarrierWave with a dynamic fog host and a CDN

Another simple case of "this took longer than it takes to look up this issue on Google" :)

CarrierWave is a fantastic and well supported ruby gem for managing images, including support for cloud storage like Amazon.

Whether or not you use CarrierWave on the cloud, you almost always want to put your user-uploaded images behind a CDN.  There are many CDNs available, including Amazon's CloudFront, Fastly.com, CacheFly, Akamai, etc, and comparing them is outside the scope of this article. 
Because browsers, especially older, are limited in how many connections they will establish to a single host, it is sometimes beneficial to have images load from several alternating URLs, for example: http://cdn-0.wanelo.com http://cdn-1.wanelo.com http://cdn-2.wanelo.com
etc...
CarrierWave supports fog_host variable which can be set to either a string (a static hostname), or a lambda (if for example a randomized string is desired) and the usage is well described here.
Unfortunately, due a b…

MagmaRails, and Enterprise Architecture with Rails

This year's MagmaRails, where I was cordially invited to speak alongside Dr Nic, Aaron Patterson, Ron Evans, Blake Mizerany, Les HillDaniel Fischer and many more talented speakers from Mexico and USA, went without a hitch in a beautiful Manzanillo Municipality, Colima, Mexico.

Organized by Crowd Interactive, this was by far one of my favorite conferences based on the amount of stuff learned, quality of personal interactions, general level of enjoyment, and also, of course, the drinking that went on with all the other fellow attendees and the speakers.  What a blast! Can't wait for the next one.

Meanwhile, I've revised my presentation that was originally conceived for SFROR meetup, with more clarity, and a whole new section on how to get things started up and move fast, based in part on an ongoing professional experience at Wanelo.com.

Here is the presentation!  Please leave comments for any feedback or suggestions.
Enterprise Architecture with Ruby (and Rails)
View more

Starting a modern agile rails 3 project for a scale, from scratch - Part 0

As I am entering my fifth month working at Wanelo, I feel very fortunate to be working with an amazing group of creative and compassionate people, building an awesome new application for the new generation social shopping platform that Wanelo had become.

Because it is all so new — the team, infrastructure, the new application, we had to quickly make a lot of fundamental decisions about what toolsets to use, what processes to follow, how to optimally develop the new code, and how to build features as quickly as possible, how to minimize the amount of technical debt, and how not to forget about the scale (we have plenty of traffic already). Most of all, we wanted to have a ton of fun along the way :)
The stackFor our technology stack we chose Rails 3.2.3, Ruby 1.9.3 and PostgreSQL 9.1 as our base choices for the application. Besides these very fundamental choices, there are easily hundreds of tiny everyday decisions that a team on a new rails project needs to make. Once the basics are …

SFROR Presentation: Rails in the Real World

This is a slightly belated post, but recently I gave a presentation to 60+ rails developers in San Francisco about the evolution of the Rails application, and how it all fits together. Presentation, dramatically named "Rails in the Real World" is available on SlideShare.

EDIT: I've updated this presentation for MagmaRails conference in June 2012 (presented in Manzanillo, MX), and the updated presentation is the one that should be viewed.

Please see this post for the actual slides.