This post is a continuation of one of my previous posts -

TimeZone - Handling requests in client’s time zone in a rails app

It is recommended to visit that post before proceeding furthur on current post.

This post describes an enhanced solution of rails_browser_timezone gem.

Continue reading

Being a ruby enthusiast for a few years now, i dont think twice to mention that rails is the killer app for ruby. Rails was all possible because of ruby’s flexibility and ruby became famous due to rails’s simplicity and focus on productivity. Rails is an opinionated framework with simplest implementation of MVC which makes it super fast to get to build things even for beginners.

<...
Continue reading

This post mentions some of the issues we faced while implementing XMPP chat with ejabberd server and solutions for it. Our’s is a rails app that uses ejabberd as chat server.

1) User registration from our app -

Our requirement is that when a new user signs up to our app, a new ejabberd account needs to be creat...
Continue reading

We used macman’s juggernaut for realtime push notifications and chat for one of the rails apps. It was used in a 6 year old legacy app with socket.io’s long polling mechanism. nodejs used was of version 0.2.4. Things have changed so much in the realtime app’s space since then and juggernaut is deprecated now.

We needed to upgrade juggernaut to get the following -

Below are some of the details on how to convert a traditional synchronous rails webapp to a complete ajax app. Will try to list out a the gems used for this and lessons learnt during this process.

Why do you need this ?

The main reason we wanted to do this is to keep the user on the same page through out the interactions. T...
Continue reading

Slides from one of our tech talks where a few tips and tools for JS apps are mentioned. This is just a first talk in the series of javascript related discussions.

Topics include -

  1. OOP & Inheritance - prototype based objects, inheritance & multiple inheritance with ring.js
  2. Enhanced functional behavior - underscore.js
  3. Running tasks - grunt.js
  4. Writing tests - jasmine
  5. Packaging the code - npm & bower
Continue reading

It is common for the product development world to categorize organizations as either ‘Product centric’ or ‘Customer centric’ and stress on the point that you need to be ‘Customer centric’ to sremain successful. In my opinion, there are no separate entities called ‘Product centric’ and ‘Customer centric’ . Every product development company needs to be ‘product centric’ and every product being built needs to be ‘Customer centric’. This results in compounding the customer satisfaction. Especi...
Continue reading

This is a post explaining how we realized our scalability bottle necks and considered the alternatives for our distributed file system.

We strongly follow the distributed architecture and try to scale out each of our components as much as possible. At the same time, care is taken that things are not scaled up prematurely but they are done as we go in an incremental fashion. One such components of us was the distributed file system.

Problem -

We want...
Continue reading

This is a quick write up about the options we looked at to implement master-salve DB setup (replication and failover) for active record 4 (rails 4).

  • Our need was that all reads should go to slave and writes to master.

  • Some critical reads should still go to master.

  • There should be a flexibilty to decide which query should hit master and which one to hit slave.

Options -

Continue reading

Why ?

Well, Capistrano 3 has dropped the support for SVN as source control mechanism. Unable to to implement this in a generic way was the reason quoted. Discussion can be followed on the github issue here - https://github.com/capistrano/capistrano/issues/752

Looks like there are no plans to commit this fix to the branch any time soon and SVN is no more a priority for capistrano. So, i have put to...
Continue reading