Category: Uncategorized

Got enough reputatioin to upvote on!

I had signed-up on early this year with an intention to help others and most of all express thanks to all fellow developers who save a lot of time by answering correctly.

With just one accepted answer, my reputation increased by 25. Now I can like/dislike answers 🙂

If you haven’t signed-up yet, give it a go to feel the joy of helping others and sharing your knowledge.

Loosly coupled systems – reel life example

Yes, it’s not a typo, the example is from reel life 🙂

Remember ending of all time favourite movie Sholay?
Well the one that I had seen in childhood was about Thakur surrendering Gabbar to police. Recently I downloaded a copy from totrent for family. Today when I watched it till end, I saw Thakur kills Gabbar in the end. I was stunned to realize how the simple concept of designing loosely coupled systems existed in Bollywood 40 years ago. Coming to programming world, now everybody is focussing on programming to an interface.
Amazing to notice that Mr. Sippi kept the climax scenes programmed to have different endings, each one as real as the other, one the director’s cut and other for cinema halls.

We the developers have a lot more to learn from outside the software sysyems!

Sticky versus non-sticky resources

Recently I was in Jakarta on a client visit. While having breakfast at Century Park Hotel alone, I let me imagination wander. Breakfast there is buffet system, where guest can have multiple rounds of food items in fresh plates. Waiters clear up tables quickly after a guest has left to take another round. Next time guest may sit on the same table or in another free table.

One day it was peak time for breakfast and I was not getting a free table to occupy.I realized the situation is very similar to having a sticky versus non-sticky servers. I drew a comparison between a typical web application deployment and breakfast lounge. A hotel guest is same as the user of web app. Tables are like system memory. It gets fragmented when no. of guests occupying a table is less than it’s maximum capacity. It becomes sticky when guest wants to return to the same seat after taking next round of food. An abandoned session is similar to a guest going for next round and leaving used plat on previous used table. Waiters were no less than CPU doing garbage collection, clearing abandoned session to make room for new guests. User think time is comparable to time taken by a guest to think about next round, get it prepared and be ready to submit request i.e. find a table.

May be I was thinking too much, but I found tuning the application for peak loads is also comparable to how to deal with peak hour situations in this scenario. If you have limited memory(tables) then at the cost of frequent garbage collection(waiters clearing up tables), situation can be very well managed.

On the other hand, for non-peak hours, a sticky server(dedicated table for each guest) would be better. You can reduce the frequency of clearing up tables, and still sustain without any impact to end user experience. Though I have not seen a real application which can learn and adjust itself based on load, but wouldn’t it be nice to have such things in place?

Call Ended Android

Recently I was away from my home telecom circle and had enabled roaming on my Android Sony XPERIA mobile on Airtel connection. I was working from home and making/receiving calls was absolutely critical for my work. To my utter surprise and disappointment, I faced intermittent issues

  • Calls getting disconnected after random period of time
  • Not able to connect call at first attempt. Everytime it was “call ended” message on the phone
  • Callers were not able to reach me either

Telecom operator never agreed to accept it as a network problem and suggested to change my phone. I didn’t want to change my phone or switch to a different operator at that time. After trying out with different phones , sim cards and googling I found the solution was very simple. To utilize 3G connection, Preferred network mode has to be set to GSM/WCDMA preferred. The solution was to change it to GSM only. With GSMonly phone was always on 2G which turned out to be stable connection at that location

call ended

I wonder it would have been nice if there were a ‘turn debug logging on’ feature on the phone 🙂

Neverthless, changing the setting was much easier for me than porting to a different operator or changing the phone.

Just in case you are wondering how to get this screnshot- just press power and volume down buttons together.