Wednesday, July 08, 2009

I came across a blog post which describes about difference between throughput and Latency. honestly I expected more technical explanation but I found something that less technical but still it explained me in such a way that any other techie explanation wouldn't have helped so much. Just thought of posting it here.(assuming the author: Which is the faster way to get your cargo across the United States. A plane or a train? Some might think the answer is obvious. A plane travels 500 mph (or so) and a train does maybe 80 mph. Therefore the plane is faster. Or is it? The question is really a matter of latency vs. throughput.

Imagine you have to move a bunch of coal across the country and deliver it to a coal processor. Now say that on the west coast, the receiver of the coal can process 100 units of coal an hour. You have 1 train that can haul 10,000 units of coal and takes 48 hours to get to its destination. You have 1 plane that can deliver 100 units of coal in 12 hours.

If the most important thing was to have the coal soon, then the plane is faster (lower latency). But, if the most important thing is to have the coal-processing pipeline filled on the west coast over time then train is faster (higher throughput). Every 96 hours they get 10k units of coal with the train (remember there’s only one train and, just like the plane, it must make the return trip to the east coast). That works out to about 100 units an hour which is just what you need. With the plane, every 96 hours you get 800 pounds of coal. Not nearly fast enough.

The above discussion may seem obvious but I have this conversation all the time when talking about Software: what is fast and what is slow. I've had people tell me it's impossible to do 10 thousand transactions per second in Terracotta when persistent because the disk seek time is 10 millis. Well they would be right if you serialize things. But in infrastructure software, the game is throughput with acceptable latency and it turns out 10 thousand transactions per second isn't all that hard. With parallelism, batching, and windowing, the disk isn't even usually the bottleneck.
------------------------------------------------------------------------------------------------

Sunday, March 01, 2009

You have nothing to fear but fear itself

Darpok ! a widely common term used in India referring to cowardice. It has also been a tool for kids to ridicule others when they dont do what they challenge, may be a small thing like throwing a ball or be it something important such as stage show. Learning starts from this age, I claim. Some of them learn to fight against failure and have conquered the world, such as Gandhi ji, Abraham Lincoln and so on, some go deep down drowning lacking self confidence and they are losers, as we may term as. There is a large majority in this spectrum who are not unsure of how to deal though they believe they have the ability to do it. I am one among them. Sometimes an article of this sort really helps.
"Darr ke aagey jeet hai. Conquer fear and you can conquer anything. I learnt this fairly early while growing up in a joint family along with 13 siblings and cousins.
Every evening, we would gather around our grandmother to hear her stories. One of her favorite stories revolved around five pilgrims who were on a journey to the holy places in the Himalayas. On a bitterly cold night, they arrived at a dharamshala. It had only one room and the gatekeeper warned them against staying there as legend had it that it was inhabited by a big snake. He told them no one had ventured inside for years. On hearing this, the pilgrims decided to play safe and spend the night in the open.
After a few shivering hours, one of them overcame his fear and decided to check the room. On entering, he didn’t find a snake. Instead, a rope lay on the floor. In the dark it resembled a snake. But the other pilgrims didn’t believe the account and decided to sleep outside. The brave one slept soundly; for his fellow travellers it was a long night.
As my grandmother would explain, failure exists only in one’s imagination. We fear failure, because we fear criticism, ridicule or rejection. But the truth is that anyone who has been successful has failed at some stage of their life. From failure comes knowledge of what works and what doesn’t; from failure comes knowledge of one’s strengths and weaknesses and it’s from failure that one begins a more determined attempt to achieve success.
As one grows up there comes the realization that there is no standard measure of failure or success. It is a relative term. What one person perceives as extraordinary success may be an ordinary accomplishment for another. What may seem a failure today often turns out to be insignificant in the long run.
Thankfully, I grew up in an environment where there were no high expectations I would excel academically. I never came first in any school exam. I hardly attended classes at college. That may not be the best thing to do but in retrospect I believe that there are many lessons to learn outside the classroom. Learning about how to build relationships and business partnerships; about human behavior and social dynamics is just as important as classroom lessons to succeed in any field.
It is a fact that in our society we ridicule failure. Rather than encourage people to take the road less travelled, we discourage them. There is encouragement to conform to a set pattern rather than stand out in a crowd. This is why failing an exam or a new venture is feared.
I don’t think setbacks, disappointments, rejections and unsuccessful attempts can be called failures. They are steps to success. How one deals with a setback determines the success of the next step. A sudden setback can be seen as a brick wall. It can also be seen as a stepping stone. It’s the way one perceives it that determines whether an unsuccessful attempt turns into a failure. Absolute failure is about not trying to do new things; it’s about lack of conviction; it’s about giving up."
Kishore Biyani: Chief executive officer of the Rs 5,000-crore Future Group. Biyani, who ranked 20 in a class of 35 at school, is regarded as the man who pioneered the retail revolution in India.


Speaking the truth, I am still afraid of my failures. But I have come out of the reluctance to fight with failure. I am happy that I have made attempts to fight again if failed and have succeeded couple of times. One of my friends came up to me and said that she saw this as one of my good qualities and it makes me happy to see the change I wanted to have. what I lack now is the guts to face my failures though I do face it with full with power packed mental strength when happens.

Saturday, January 31, 2009

Minnesotans, check our strength

I got this as a forward, which I suppose was compiled by my fellow Indian PIGS: Poor Indian Graduate Student). Unlike a regular FWD, this was more about spirit of Minnesotans which made me post in blog.

60 above zero: Floridians turn on the heat. Minnesotans plant gardens.

50 above zero: Californians shiver uncontrollably. People are sunbathing in Duluth.

40 above zero: Import
ed cars won't start. Minnesotans drive with the sunroof open.

32 above zero: Distilled water freezes. The water in Bemidji gets thicker.

20 above zero: New Mexicans don long johns, parkas and wool hats & mittens. Minnesotans throw on a flannel shirt.

15 above zero : New York landlords finally turn on the heat. People in Minnesota have one last cookout before it gets cold.

Zero: People in Miami all die. Minnesotans close the windows.

10 below zero: Californians fly away to Mexico. Minnesotans dig their winter coats out of storage.

25 below zero: Hollywood disintegrates. Girl Scouts in Minnesota still selling cookies door to door.

40 below zero: Washington, D.C. finally runs out of hot air. People in Minnesota let their dogs sleep indoors.

100 below zero: Santa Claus abandons the North Pole. Minnesotans get upset because the Mini-Van won't start.

460 below zero: ALL atomic motion stops (absolute zero on the Kelvin scale). People in Minnesota can be heard to say, "Cold 'nuff fer ya?"

500 below zero: Hell freezes over. Minnesota public schools open 2 hours late.