Sunil Arora

Developer tip - Best resources to learn Git

This post is more of a developer tip. Charles Duan has written one of the best description of Git data model and Git commands explaining how they manipulate the data model under the hood. As he puts it you can only really use Git if you understand how Git works. Now go read it here. Thank you Charles for such a nice write up!

NewRelic's default conf drags Play Scala app

Last week I learned about an important tweak in NewRelic configuration to avoid performance issues with Play Scala webframework. While benchmarking our play-scala app I was surprised to see poor performance numbers given that play framework claims to be one of high performant web frameworks around. App wasn’t able to serve more than 200~230 requests per seconds for a simple DB lookup operation. Some serious digging revealed that default configuration of NewRelic for Play framework adds serious drag to the app’s performance.

Scala Concurrent Downloader example using Future

I spent this weekend learning more about Scala Futures, and believe me, posts below are the best written introductory posts about scala futures and promises. Guide to Scala Future Guide to Scala Promise and Future In order to learn it for real, I started with an exercise of building a concurrent URL downloader. Basically idea is, let say, given n urls, how do you download n urls concurrently. // We are using WebService Client from Play's framework import play.

Learning Scala -- my experience and advice

Learning a new programming language has been on my list quite sometime and fortunately, I got a chance to try out Scala for one of the projects at work a month back. So, its been a month learning Scala now. Though its too early to form an opinion about it, but I must say, it has NOT been an easy language to learn so far. And I think one of the reasons for that is – the language is way too expressive with pretty much all the constructs in the basket and that makes it a very powerful tool but a difficult one to master.

Drake - Make for Data!!!

Very recently, I started my journey in big data world and its exciting time to see new technologies popping up these days. I came across this really handy tool which I used in my project at work. Its called Drake, Make for Data as factual folks call it. You can read more about it in their blog post . I will write up a detailed post about how I used Drake to simplify my life at work but in the mean time, I wanted to share this very good introductory video by Artem Boytsov the author himself.

Highlight Call to Action by giving a small Wiggle

Today, when I was trying out a new application bufferapp, I noticed something very interesting in their interface which immediately caught my attention. Although it is a tiny little detail about the interface, but I think it is one of the very important ones especially in context of a web app, so I thought of writing it down. If you have used bufferapp, you will notice following things (shown in the picture below):

Asynchronous IF implementation using JQuery Deferred Objects

I ran in to a situation in a project recently where I got an opportunity to use JQuery Deferred Objects. I wanted to implement an Async IF operation. Async IF operation is like watching a condition to become true (may be in future) and then invoking something when it becomes true. So this is essentially an “if” operation in async mode and your logic might involve watching more than one condition to be met.

PyCon India Presentation on Redis And Python

Pune (India) witnessed probably the second biggest PyCon event this year. It was third PyCon to be held in India and was very successfull event. I took a comprehensive tutorial on Redis & Python subject. I am embedding the slides from the same session below. Hope you will find it useful. Ping me @sunil if you have any questions.

Another Redis use case: Centralized logging

Log analysis has become a difficult task in our production environment at work because logs are distributed on different machines and in different files. So, we wanted all the exception logs from all of our apps to be tracked centrally and viewed in single console. And once again, we found another good use case for Redis. Our strategy is to dump all of critical logs in to a Redis List and have a background worker which continuously pulls logs from the Redis List and write stuff in log file.

Redis Lua Scripting - Violet Hill

Redis is one of my favorite data storage platform and I won’t miss a single chance to use it wherever I can. One of the biggest strengths of Redis has been that you can define your data modelling in the most natural form like key-value/hashes/lists/sets. I prefer thinking of data storage in form of list, hashes, sets instead of tables :). Redis provides a very good set of APIs(commands) which pretty much allows majority of the operations you would like to perform on these data types in a single command.