Docker goodness


Have you ever faced these challenges?

  • It works on my machine but not on yours…
  • I have been helping the new person setup her environment all day…
  • I can’t try it because IT hasn’t  updated dev-environment…
  • I have to work directly on production environment to fix this issue…

I feel these are everyday problems that we face. Is there a solution? Yes.
Docker is an emerging technology which is quickly gaining the momentum. It is the answer to many of such questions other than making the server management and deployment a muc easy task.

If in case you do not have much idea on what Docker can do, take a look at the brief presentation I have prepared to give a high level idea on Docker.

Join the Next Gen force. Sokrati is Hiring…

Tags

, , , ,


Sokrati is looking for hiring aggressively in this month and coming ones. Please contact at ritu@sokrati .com if you are looking for a change of environment, and you have a zeal to flow with the transition from creating good to better to best.

Sokrati, a leader in digital advertising, provides a technology solution to efficiently + effectively manage search campaigns using a unique, integrated platform. The platform auto-generates keywords and bids + optimizes on behalf of the clients while dealing with 10M impressions a day. The platform is provided as a service tailored to be intuitive and fault-tolerant guaranteeing 99.99% uptime. For more visit http://Sokrati.com

At Sokrati we promise it not be a painless journey. We squeeze our brains, grind our hearts and scrap mercilessly to carve the best softwares.

So respond asap as we are looking for people in every domain of a software development,,be it QA, Development or front-end.

Session updates During concurrent requests

Tags

, , ,


So this has always been a problem with Rails SessionStore. The problem is that if your app is sending concurrent requests and one of them is updating a session then depending on which request wins in the race you might get the stale session variables instead on the updated one. The problem is better explained at other places like http://dev.rubyonrails.org/ticket/8256 and the solution is a plugin smart_session_store by Frederick Cheung.

It might not seem a very informative post to you, but I am still posting it as this has taken me quite a bit of time to find out. And after finding it, I am astonished to see why Rails still can not deal with this issue.

 

Note: I am talking about Rails 2.3.8 here. Not sure if Rails 3 has a fix for it or not.

 

Websockets ?


Just today have seen some buzz around websockets of HTML 5. After exploring a little, I thought this is sharable so here it is in a small description.

So websockets is a two way communications channel that operates over a single socket and is exposed via a JavaScript interface. So unlike Ajax, which needs 2 bi-directional streams on up-stream and one down-stream it serves over just one stream. And this is the latest additions to web 2.0 apps via HTML 5 implementations. The server can then “push” information through the WebSocket, directly to the browser, without the browser having to go out and request it.

So you ll wonder as HTML 5 is just supported by few browsers and very few versions, then how feasible is it to use. Well… for that There are several Websocket servers available that provides JavaScript library that can support almost any browser of any version.

For example : Kaazing supports all major browsers (Firefox version 1.5 and higher, Internet Explorer version 5.5 and higher, Safari version 3.0 and higher, Opera version 9.5 and higher, and Google Chrome version 0.2 and higher).

Where as Pusherapp (widely used by ruby community) doesnt provide support for all browser but provide a flash based fallback solutions for remaining browsers.

Later might come more as I explore more. Or you guys explore before me and update me also😉 But that sure worth a shot.

Learning Java now :O


hmmm so my resume says, I know java but that was the java we did in a small course during the academics. Hence you can say that I dont know much java apart from the OO part of it which I knew from Ruby. At this stage when I am already spoilt by Ruby, it will be very hard for me to just go through Java’s classes and compilers. I am looking forward to understand and write java webservices which will feed rails apps with SOAP.

Lets see how it goes. Any suggestions if any of you guys  have?? Apart from the general Ruby community comment “You gone mad kya??? ;)”

We All Like to Reblog (via WordPress.com News)


I really like this new feature from wordpress. And this post is just to try it. Thats the reason even after hundreds of available blogging tools I feel wordpress is the best😉

We All Like to Reblog Have you ever come across a blog post that you enjoyed so much you wanted to easily share it with the readers of your own blog? Sure, you can copy and paste the link and perhaps even a snippet of text with your own comments, but overall it's not a particularly enjoyable experience. We wanted to change this and make sharing other posts with your readers as easy as posting to your blog. Today we're introducing a new like and reblog feature enabled … Read More

via WordPress.com News

Move towards optimization now…

Tags

, , , , , , ,


If you are looking to do the query optimization of your rails apps, I can suggest using few tools that does it.

1. First I want to suggest BULLET– A rails plugin/gem to kill N+1 queries and unused eager loading.

Bullet helps in finding the space for eager loading. It has a beautiful way of telling where should you add the eager loading for certain association. Whenever you try to run the code in development browser, it pops up a js alert and tells you exaclty where and what includes you have to add in you finder queries. It also tells you to remove the extra unnecessary eager loading handled in you app.

To add more beauty to it flyerhzm added growl notification as well for the Mac based developers.

2. Second suggested tool will be Slim-Scrooge: SlimScrooge heavily optimises your database interactions

Slim-Scrooge works for optimizing the sql queries by monitoring the required columns for the model and changing inline the queries to fetch only selective columns. So with slim_scrooge working in background you don’t have to worry about giving the options to :select in you find. Instead slim_scrooge will itself analyze what are the columns needed to run your code for the first time and second call to the same action it itself puts the necessary column in select removing the asterisk(*).

I am still skeptical about using it. As it might make the developers lazy(just blindly putting * in queries) and increasing the processing time in slim_scrooge inline query modifier. Though I think it could be a good tool if used once in a while to analyze what are the missing selects in our code. Whatever be the case you might wanna give it a try, its kinda lucraitve.

3. Last but not the least I try to add is rack-bug: Debugging toolbar for Rack applications implemented as middleware.

Remember rails-footnotes? Well Rack-bug is kinda same but seems better and provide more. Better, because its rack based. Provides more with the toolbar giving following info:

  • Rails Info
  • Resource Usage
  • Rack Env
  • SQL
  • AR Objects
  • Memcached
  • Templates
  • Log
  • Memory Usage

I kind of loved it at first sight. So if you already have footnotes. Give it a try. If you dont, then again give it a try to optimize better. Watch the screencast by brynary for more info.

If you have tried any of those feel free to give your opinions. I will be happy to learn how everybody is approaching the technique of optimization.


My Swine Flu Experience


In my family its normal to have cough and cold. Usually one or the other member of my family is always suffering from flu most of the time specially because of the Pollen Allergy so natural in Pune. So when doctor told my husband Nitesh to go for a H1N1 test, I was not worried at all. Coz we haven’t got in contact with anyone having it or not even traveled abroad as such. And I thought it is now controlled in Pune.

Whatever, but next day, Nov 23 I was proved wrong by a phone call from my husband that his test came positive. That moment I understood the hindi phrase “Pairon ke neeche se dharti nikal gayi” (ground slipped away under my feet)… To tell you frankly I was scared as hell but when I saw the attitude of doctors at RubyHall Clinic at Pune. It seems to me like this is usual normal case for them…they gave Nitesh Fluver(Indian version of Tamiflu) and sent us back to home with an advise of incubation of a week.

Hmm…. I locked my husband in a room so that my son doesn’t contact him. But we thought son already has got it as he also had cough n cold from several days. We got him tested…to our surprise and relief  he was negative.

The same day I got fever and cough and cold. Oh…hell…now I got myself tested and hoped as my son is negative I should also be negative….Which I was not :(((

Now the dilemma… we both are positive and Son is not and nobody is there to take care of him. To our rescue my Mother-in-law came to Pune, we sent our son to one of my cousin’s place and prayed that he remains ok. Those were not at all good days for me…as I didnt have my baby with me….I could not go out….and I dont feel like ill… so getting bored…

In all, my experience was not bad apart from the scary feeling. It was just like normal flu if detected at right time. So I will suggest everyone to be calm and keep following the suggestions by doctors.

I know this post has gone long but you see I am telling the story of a whole week…So excuse me if you got bored of reading it😛