Tzah 2.0


Archive for May, 2008

System.Threading.Timer not waking up?

Thursday, May 29th, 2008

This posts is dedicated to all developers that banged their heads trying to realize why their System.Thread.Timer doesn’t work.

The timer class is very useful as long as you know how to use it. First of all, make sure to keep a reference to your timer object. Otherwise, the big bad wolf, garbage collector, could grab it even if the timer is still active. Next, the class is, well, threaded, so keep in mind it is reentrant. Be careful not to have the execution callback lasts longer than the timer’s period. If you don’t, or the callback can be accessed from other threads, mainly the GUI thread, make sure to use protection (that’s always a good advise. Ye. OK.).

Last, but not least, we should realize how the timer works. The timer works in application time and not device time. If the device has entered sleep mode where all threads are paused, the timer behavior might not be as expected. Example. Suppose you have a timer object that fires-up every 20 minutes. You start it at, let’s say, 08:00 AM and after 5 minutes the device goes to sleep mode. You wake up the device at 08:30AM. Should the timer fire now? No! As far as the timer is concerned, only 5 minutes has passed and not 30 minutes. The next time it will fire would be at 08:35AM.

Are we there yet? I don’t think so

Wednesday, May 28th, 2008

Technology is fast-pacing. It’s all around us. 3G networks are deployed world-wide (although at small percentage of overall networks) and the battle is already on for 4G between LTE and WiMax. The new annunciation of is here as an answer for the fuel crisis. Digital photos and web-sharing has only recently (I’m talking years-scale) become common and now we witness amazing ways to combine the two and . Mobile and VoIP. Need I say more? These two technologies are always revolutionized. VoIP is becoming widespread  in more and more businesses, homes and various vertical markets. Mobile is constantly surprising us. iPhone, Modu, GPS-integrated phones.

But still, we’re not there. Not from an innovation point of view.  It seems that in our vanity and ambition to become leaders in this technology race, we forget something. That something is stability and reliability. Technologies  are evolving but can the family next door use it?

High availability of day-to-day infrastructures and commodities like water, Gas, PSTN lines, electricity and TV is perceived as self evident. We open the TV and “Lost” is on, we click a switch and let there be light.  Why can’t we have the same availability and reliability on more advanced technologies?

Yesterday, was not a good day for me. I woke up late because the alarm in my cellular didn’t work. My other cellular, top of the line HTC TyTN 2 decided to quit charging for some reason. I picked up my laptop bag and found out it’s hot. why? my laptop  didn’t go to sleep mode when I shut it down so it continued to exhaust  the battery while in close bag. I quickly went down to my car, and… Yes, the battery is gone. And on top of things, the   on facebook was going through upgrade.

High-level technology is just not there. Take for example a recent report that demonstrated that only 3 of top 20 most popular web sites achieved the mythical 5 9’s of reliability. At the beginning of the year 4 undersea communication cables were cut crippling international communication in countries like India, Qatar and United Arab Emirates.  These examples are annoying but not harmful (unless you just have to update the entire world on what you ate for breakfast). A much more alarming example of why reliability is important came just at the beginning of this month were a Canadian toddler died after VoIP 911 dispatched an ambulance to  the family’s former home, more than 2500 miles away.

I hope that top-level technology companies will quickly realize that amazing gadgets and cool features are nice, but reliability is more important. Until than, we can only backup our and go outside to real friends the next time that our favorite social network is done.

Jajah is the VoIP player that brought you web-activated telephony.