<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16997043</id><updated>2012-02-16T15:38:14.796-08:00</updated><category term='test coverage'/><category term='pydev'/><category term='Multiprocessor scheduling'/><category term='Relentlessly resourceful'/><category term='calendar'/><category term='clustering'/><category term='requirement analysis'/><category term='Visual studio 2010'/><category term='/dev'/><category term='hurry'/><category term='Test-driven development'/><category term='Host controller'/><category term='agility'/><category term='time management'/><category term='Google pulls out of China.'/><category term='Phy'/><category term='mapreduce'/><category term='Do not be evil'/><category term='WF'/><category term='C++ test framework'/><category term='team management'/><category term='decision'/><category term='distributed switch'/><category term='xkcd'/><category term='old is new'/><category term='interprocess communication'/><category term='Jack Bauer'/><category term='online collaboration tools'/><category term='Peter&apos;s principle'/><category term='Rhino'/><category term='MII'/><category term='strategy planning'/><category term='chinese market simplification'/><category term='spooky'/><category term='Diopsis'/><category term='Work'/><category term='Lua'/><category term='Mono'/><category term='priority'/><category term='eclipse'/><category term='soft modem'/><category term='Publish and Subscribe'/><category term='MPI'/><category term='unmanaged code'/><category term='Cloud computing'/><category term='patch'/><category term='real time'/><category term='MDIO'/><category term='distributed clock synchronisation'/><category term='choice'/><category term='shared whiteboard'/><category term='Gadget'/><category term='Blackfin'/><category term='real time search'/><category term='toolchain'/><category term='automated test'/><category term='orocos'/><category term='Dilbert&apos;s principle'/><category term='Blackberry application'/><category term='kernel module'/><category term='communication fidelity'/><category term='script engine'/><category term='motivate'/><category term='product development'/><category term='game'/><category term='USB'/><category term='achievement management'/><category term='Wolfram Alpha'/><category term='self-testing'/><category term='Upgrade'/><category term='transparency'/><category term='plan'/><category term='multi-cloud'/><category term='innovation'/><category term='event-driven'/><category term='mock object for embedded C'/><category term='marketing'/><category term='snmp'/><category term='network'/><category term='Viigo'/><category term='middleware'/><category term='fun'/><category term='cross compiler'/><category term='permission of communicaiton'/><category term='chess'/><category term='24'/><category term='google app engine'/><category term='/proc'/><category term='on target test'/><category term='RT patch'/><category term='special file'/><category term='esimate'/><category term='.Net'/><category term='hit and run'/><category term='messaging'/><category term='AJAX'/><category term='conscious effort'/><category term='RPC'/><category term='Security'/><category term='TCP/IP'/><category term='risk'/><category term='Robotics'/><category term='MAC'/><category term='3G'/><category term='Chromium'/><category term='.net 4.0'/><category term='gcc toolchain'/><category term='real-time linux'/><category term='Scratchbox'/><category term='uClinux'/><category term='Chrome'/><category term='distributed system'/><category term='windows script'/><category term='remoting'/><category term='parallel'/><category term='windows'/><category term='penalty'/><category term='polymorphism'/><category term='Android'/><category term='coLinux'/><category term='Googlemock'/><category term='virtulisation'/><category term='Xenomai'/><category term='parallel programming'/><category term='unit test for embedded C'/><category term='cygwin'/><category term='Debian'/><category term='meeting boy'/><category term='Real time signal'/><category term='multithreading'/><category term='COM'/><category term='communication'/><category term='Comfortable zone'/><category term='mock object'/><category term='Subterfuge'/><category term='escort run'/><category term='network interface'/><category term='awareness'/><category term='life'/><category term='SOAP'/><category term='GTD'/><category term='passion'/><category term='Webservice'/><category term='device driver'/><category term='scrum'/><category term='remote debugging'/><category term='mobile applications'/><category term='Linux'/><category term='twitter'/><category term='crisis management'/><category term='death spiral'/><category term='project management'/><category term='Ubuntu'/><category term='boiling frog'/><category term='management'/><category term='RTAI'/><category term='scheduling'/><title type='text'>Enjoy the evolving life</title><subtitle type='html'>The most exciting thing about this world is its ever changing quality.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default?start-index=101&amp;max-results=100'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>107</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16997043.post-2018713715848176016</id><published>2011-10-08T07:57:00.000-07:00</published><updated>2011-10-08T09:17:32.025-07:00</updated><title type='text'>A little bit of heaven</title><content type='html'>To start by saying that if this post in anyway smells sentimental, that might just be what it takes. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So Steve Jobs passed away.&lt;div&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Not sure what’s the odds, but just watched &lt;a href="http://www.imdb.com/title/tt1440161/"&gt;A little bit of heaven&lt;/a&gt; from Nicole Kassell. She isn’t usually my favourite director but this one hit me, hard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You might wonder, even though each and every one of us is going to die sooner or later, but that unknown of certainty somehow fences off the fear and helplessness, yeah, feelings again. Imagine this, you now know it is close, you try to keep the hope high like many others, but damn sure you know it is coming, very soon, what do you do?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You don’t need me to tell you how much of an impact Steve Jobs has created, in the daily lives of yours and mine. I have no intention to run through the story of Apple family and all the tasteful products, ventures. What I am wondering is, how he did it, in the last days of his life, how he faced what was coming, what he chose to do and more importantly, what not to. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So in the movie, Marley is told that her day is coming. She went through the possible emotions, I would too, to realise that there is nothing you can do to avoid what’s going to happen, be angry, sad, nonchalant. What she really missed, was the fact that others around her will go on with their lives, one way or another. I know it is hard to swallow, but it starts to become obvious to me that it is not just about Marley anymore, it isn’t. Because she is loved, she is the other end of emotion linkage. Now the natural thing seems to be, how to fill in the gap which will be created, when she is gone, to return the love, take the responsibility. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Easy to say, I know. It seems insane to ask a dying man to hold on to all the commitment, responsibilities. Wrong, so wrong. We usually view these two things as heavy weight stuff, I mean really serious stuff, right? The truth is, a person with commitment, responsibilities is a happy one. I would have sense of fulfilment, sense of purpose to life, before anyone figures out the ultimate question. Those bonds are what define us. Be true to your heart, would you indulge yourself, not for a day, not for a week, but for eternity? All of sudden, what Steve did starts to make sense to me. It was sad to see his condition getting worse that he has to step down; it was only admiration when you look at his seven years of fighting with cancer. We don’t really see that, do we? I didn’t. I only see a man keeps breaking the rules, and keeps telling the world what it really wants to hear, in an honest way.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So Marley died, after planned her fun funeral party celebration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Steve Jobs passed away, with little pieces of many hearts.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I did not realise I have tear in my face when Marley said to her friend “Renee, I’m just gonna say what I came here to say which is, I am sorry. It really hurts me when you started distancing yourself, but it’s ok, I get it. A new baby coming and me… leaving. It’s not fair having to be so happy and so sad at the same time, is it? Our friendship is one of the best things in my life and I am sorry that I’m not gonna getto know that little boy…” &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Eric Schmidt in his &lt;a href="http://www.businessweek.com/magazine/eric-schmidt-on-steve-jobs-10062011.html"&gt;tribute&lt;/a&gt;, quoted Steve, "Steve and I were talking about children one time, and he said the problem with children is that they carry your heart with them. The exact phrase was, 'It’s your heart running around outside your body.' ". &lt;a href="http://www.nytimes.com/2011/10/07/technology/with-time-running-short-steve-jobs-managed-his-farewells.html?_r=2&amp;amp;ref=todayspaper&amp;amp;pagewanted=all"&gt;Many coverage&lt;/a&gt; tell the story of how he arranged the last days of his life, on his terms. Steve Jobs called in to offer advice for iPhone 4S launch, right before his death. How much is it too much to say what one cares about his creation and what emotion attach is that?&lt;/p&gt;&lt;p class="MsoNormal"&gt;Many seem to share the belief that Steve Jobs is one of those &lt;a href="http://allaboutstevejobs.com/being/3-work/3-work.html"&gt;opinionated dog&lt;/a&gt;, although incomparable genius. I don't see it that way. I actually think Steve Jobs is a man full of emotion, not just passion, and his great ways of knowing what people want to hear and have, before we know them ourselves. He is the ultimate salesman - he has our trust, money, respect; now with him gone, pieces of our heart too. His genius is as much as in design, product strategy as in marketing, if not more.&lt;/p&gt;&lt;p class="MsoNormal"&gt;Steve Jobs is not my hero. He merely taught me how to treat my life, or the rest of it.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2018713715848176016?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2018713715848176016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2018713715848176016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2018713715848176016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2018713715848176016'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2011/10/little-bit-of-heaven.html' title='A little bit of heaven'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4149194733364858122</id><published>2011-04-10T04:10:00.000-07:00</published><updated>2011-04-20T13:10:41.799-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passion'/><category scheme='http://www.blogger.com/atom/ns#' term='time management'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Time vs energy</title><content type='html'>A small &lt;a href="http://apps.facebook.com/ravenwoodfair/"&gt;flash game&lt;/a&gt; got me thinking, time vs energy, only it might not be that simple relationship as exchange.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are lucky enough, you would have probably realised already, in essence, time is all you have, and all that you have to lose, if any.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Typically, when you start to engage any activities (just by the way, in my world, it will be defined as in projects), it's likely that you would be thinking about how much time and resource you're going to put into this gig, and whether or not you can afford it. Simple inference tells us, all that resources usually you obtained by exchanging time that was running on your watch, be it hourly or contractual repayment. In professional world, we have one fancy thing normally named as project plan, which usually consists of a bunch of milestones and period of congregated effort estimates. Alright, there we also have people's name beside the coloured bars/items, depends on which religion of project management school you're from. My point is, it doesn't matter as long as we view it as we have been doing for God knows how long. Timing is just about everything we care about, everything we check against, everything we breathe with, everything we rely on our lives to tick with, to certain extent. I feel psychologically, it came from the needs for us to be in control our daily shit, a false sense of knowing where we are and where we heading. It's funny how time and space is really no difference, Kudos to Einstein.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Now, what I really want to talk about, is energy. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Only a handful smart ones know that time is irrelevant if you want to live your life in a non-mediocre way (accidentally, while I was pondering the content of this blog, friend recommend &lt;a href="http://www.fourhourworkweek.com/"&gt;4-hour week&lt;/a&gt;). Let's get this straight first - I do not believe you'll be able to be the geek you want to be when you are clueless at timing. On the contrary, I think we should be master of it. The difference is, where the real focus lies. For me, being able to manage energy and understand how it develops and evolves at different stage of your life is critical. With that, have a easy grip on the timeline is going to be natural. Working by hours will always be limited by Laws of physics, in terms of how much you are likely to gain. Your income will depend on your continuous efforts in time, instead of quality of decision or unique skills required.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So if time is an easy reference we can always look up to, energy is not. The best reference we have is probably those society elites. Nonetheless, a certain period of full concentrated energy can deliver results which would be difficult, sometimes impossible to achieve in a usual time-is-the-God manner. Why? Simple. When you have a target, and you are fully charged for it, it's much more likely you'll get it; otherwise, your ambition, passion or whatever you like to call it, will more likely to be worn out in the mist of motionlessness, with nothing come out the other end, sometime, even if there is something out, it won't be meaningful anymore.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, most people could not keep a constant charged state to be ready to engage whatever is coming their ways, some could but very few. Thus we have to be humble enough to learn how to tune our energy state and know when we should be ready to strike. Fluctuation is in the nature of energy. The other one is defined by &lt;b&gt;law of conservation of energy&lt;/b&gt; - &lt;i&gt;energy can neither be created nor destroyed: it can only be transformed from one state to another.&lt;/i&gt;  It really doesn't matter how many days you spent on your couch reading books or playing games, skiing or diving in the middle of nowhere, do what you like. Just make sure when the mission is called, you know you'll be ready to go for it, like you never had before. That energy, is what I call something of note and can make delivery happen. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look around you, if you think most people around you are busy in serving the system, you might be in the wrong crowd. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4149194733364858122?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4149194733364858122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4149194733364858122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4149194733364858122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4149194733364858122'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2011/04/time-vs-energy.html' title='Time vs energy'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6641140442595176911</id><published>2011-04-04T04:10:00.001-07:00</published><updated>2011-04-20T14:44:46.994-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spooky'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Play Google Scribe</title><content type='html'>&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;The following lines came out of &lt;a href="http://scribe.googlelabs.com/"&gt;Google Scribe&lt;/a&gt;, with only me input first word following space bar (accepting whatever suggested by the prediction engine). It's funny to see whatever got into this person/algorithm, no matter who you started with, it always ended up at "world of the living room and dinning room..."&lt;br /&gt;&lt;/p&gt;&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;b&gt;I&lt;/b&gt; have a lot of people are not aware of any  other  person  or  entity  that  is  not  the  case  for  the  other  two  are  the  same  as  the  one  in  the same way as the first step in the right direction  for  the  future  of  the  country and  the  world  of  the  living  room  and  dining  room  with  a  view  to  the  sea  and  the  mountains...&lt;/p&gt;&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;b&gt;You&lt;/b&gt; can also use the following command to  create a new  one  and  it  is  not  a  valid  stream  resource  in  D  minor  for  two   violins  and  a  cello  player  and  a  great  deal  of  time  and  money  to  the  poor  and the rich and famous and the most important thing is to get the best of the best in the world of the living room and dining room with a view to the sea and the mountains...&lt;/p&gt;&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;b&gt;He/she&lt;/b&gt; was a member of the Board of Directors of the Company  and  the  Group   of  Seven  and  the  Ragged  Tiger  Deluxe  Plastic  Sled  Blue  and  White  Porcelain  Vase  with  Flowers  and  Fruit  of  the  Loom  Men  's Boxer  Shorts  collection  of  the  best in the world of the living room and dining room with a view to the sea and the mountains...&lt;/p&gt;&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;b&gt;It&lt;/b&gt; is a very good job of it than I do  now  is  to  get  the  best  of  the  best  in  the  world  of  the  living  room  and  dining  room  with  a  view  to  the  sea  and  the  mountains...&lt;/p&gt;&lt;p style="font-family: 'Times New Roman'; font-size: medium; "&gt;Update 20/04/2011: In fact, later it turns out, no matter what word you chose to start with, it always ends up in the world of the living room and dining room :) &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6641140442595176911?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6641140442595176911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6641140442595176911' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6641140442595176911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6641140442595176911'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2011/04/play-google-scribe.html' title='Play Google Scribe'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-1130479944906459188</id><published>2010-11-25T10:18:00.001-08:00</published><updated>2010-11-25T12:16:53.279-08:00</updated><title type='text'>Inbox tolerance value</title><content type='html'>I have zero inbox tolerance (IT).&lt;p&gt;Every email drops through spam filter will be consumed immediately. Email processing always has been top priority thread in my daily task scheduling. Yes, my system works pretty well by interrupt handling, be it an engineer or manager schedule; I also have the bottom half handling to allow interrupt pre-empt if you're a Linux geek and really interested.&lt;/p&gt;&lt;p&gt;Secondly, I never group emails into sub folders, categories or any kind. It's simply a waste of time and counter-productive. You have From (who raised the matter), To (who should care), Subject (what's the matter), what else do you need to bring it out more easily? Whenever I saw a ever growing tree of folder structure, I am thinking "who are we kidding here, are you really gonna efficiently penetrate through this depth and get what you want from some emails you don't even remember whether or not you have consumed". I bet by the time you actually got the email, if you're lucky, there is a big chance you've forgot what's for, and all the reasons why it matters.&lt;/p&gt;&lt;p&gt;Also, just for the record, I never bought the excuse that 'I am too busy to check my emails', 'I have actual work to do to be interrupted'. While we're so comfortably making these alibi for us to&lt;br /&gt;shy into our own little geek caves, away from brute truth - communication is what really make or break.&lt;/p&gt;&lt;p&gt;What I should have provided is the definition of email consumption. Based on the From, To, Subject (surprisingly, little credit is given to priority field, due to the obvious abuse), every email is processed with either immediate response, noted, ignored, fyi'ed. (You might have picked up, yes, I never deleted emails.)&lt;/p&gt;&lt;p&gt;What's your IT value (number of unread/number of emails in inbox, per day)? Why is that?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-1130479944906459188?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/1130479944906459188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=1130479944906459188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1130479944906459188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1130479944906459188'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/11/inbox-tolerance-value.html' title='Inbox tolerance value'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6316702619482760803</id><published>2010-11-22T10:10:00.001-08:00</published><updated>2011-04-20T14:48:30.496-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='risk'/><category scheme='http://www.blogger.com/atom/ns#' term='management'/><title type='text'>Leave shit to where it belongs</title><content type='html'>Nowadays, there are tons of blogs, books, tips about how to get things done and why it's important to do so.&lt;p&gt;What I want to talk about however, it's how to leave shit to where it belongs, and why so. This is assuming you're a self sufficient and proactive cell. At certain point in time, you find yourself couldn't let go any screaming customer emails or plan of attack to any critical issues. Instead, you find yourself repeatedly coming back and dip into every project meeting, on every email thread of all issue discussion, being the one cooking the plan involves parties others don't even know they exist in the organization. In short, you're rock'n'roll, you are kicking ass.&lt;/p&gt;&lt;p&gt;Maybe or may not be, some part of you feels bored and tired of repeating this exercise and you just know that you can do a good job as this is what you do, what you grew up from. But, your team doesn't really appreciate what you have been doing, of course your hard working and attention to details have always been very convincing, however, they didn't learn much. At the end of last project, they are just identical to what they were. Why? Because you didn't leave shit&lt;br /&gt;to where it belongs.&lt;/p&gt;&lt;p&gt;I know you don't like not being the centre of the gravity, I know you also hate 'not-in-the-loop' for everything, maybe you still hold sense of insecurity for not being able to review code from every part of the system, or you just couldn't understand how maker's schedule runs outside immediate firing line. All these share one reason, you don't know how to leave shit to where it belongs.&lt;/p&gt;&lt;p&gt;What you will probably realise is, there will not be void in a positive team environment, to which hopefully you're part of it. To give'em space and leave people chew and grow on their responsibility might just be what you need to really inject sense of ownership into this team, you being there or not.&lt;/p&gt;&lt;p&gt;So, leave the shit to where it belongs. No one likes when shit hits the fan. Nonetheless, you need the shit spin out from the fan to test your defensive system, more importantly, how well your system performs under negative impact. Let go of the shit so you could have a chance to take care of something which might present real challenges, such as fan is broken.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6316702619482760803?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6316702619482760803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6316702619482760803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6316702619482760803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6316702619482760803'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/11/leave-shit-to-where-it-belongs.html' title='Leave shit to where it belongs'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2773845968864661028</id><published>2010-05-02T19:31:00.000-07:00</published><updated>2010-05-09T06:29:21.560-07:00</updated><title type='text'>Plausible deniability</title><content type='html'>I have not given this enough though until someone came to me and said, "hey dude, are you really gonna throw everything you have to this project? Aren't you supposed to just play safe?" &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The point is, you have to be safe to be able to achieve what you plan for. On the other hand, if you spend too much time in looking for plausible deniability, guess what, you just create an atmosphere where everyone's main interest is not in getting things done, but in getting asses covered when shit hits fans. It is not easy, however, just to keep your head down, ignoring all politics around you and your project team, naively thinking it is a single-threaded project execution. Make no mistake, it never was, and will never be!&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To have a project without pissing everyone off, yet still coming out with expected results, is more of an artistic execution than a by-the-book exercise. Obviously, a happy and motivated crowd will just ease off those expected and unexpected impedance, not mention initiatives. If your goal is really getting things done rather than being tragic hero, you should know that when you are gone, by whatever reasons, your project gone with you, be it a car crash, a mis-interpreted message, one wrong recruitment, one careless comment. I might have made it too dramatic than reality, it is likely that some of these problems will not be one if you weigh them at different levels.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is imperative that a project leader shows his/her full commitment and always ready to go extra miles to make things happen. I have plenty of examples that crossing the line of being THERE or "let's try it next time" really lies in how much you want it, in another word, if you started to look for plausible deniability, using brake when you should be on full gas, you're pretty much out of luck.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2773845968864661028?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2773845968864661028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2773845968864661028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2773845968864661028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2773845968864661028'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/05/plausible-deniability.html' title='Plausible deniability'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6405703142613590930</id><published>2010-02-27T13:55:00.001-08:00</published><updated>2010-02-27T15:54:57.067-08:00</updated><title type='text'>Hit the high notes</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: small; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;Nessun Dorma is one of the few musics I can understand but love. Everytime when I hear it my blood pressure goes high and my eyes waters. Sounds too sentimental huh?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: small; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: small; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;Why I like it? For very amateur reason, the powerful high notes, wave after wave. When someone hits those high notes, you think, wow, this dude is good, there is something in there, this guy has it!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: small; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: small; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;Not everyone can do it, fortunately. That makes it special and meaningful. Similarly, not everyone can be a star in what he or she does. That's the way it is, the way it will be. People who can hit those high notes are so rare species. When you are looking for talents, no doubt you want the best, most of them pricey, but you still want them. They give different perspectives, achieve different levels. I am addictive to high notes. It makes me wonder whether that's what we are seeking in lives. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6405703142613590930?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6405703142613590930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6405703142613590930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6405703142613590930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6405703142613590930'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/02/hit-high-notes.html' title='Hit the high notes'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8637856212287654138</id><published>2010-02-12T20:24:00.001-08:00</published><updated>2010-02-16T03:36:49.820-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='choice'/><category scheme='http://www.blogger.com/atom/ns#' term='hurry'/><title type='text'>Choice</title><content type='html'>I was exhausted from a long stressful week with a tough customer, although exciting but I had enough for that week, waiting for a flight to get back to my two months old baby girl. I had always tried to get to the gate in the last five minutes. Right back then, I have been waiting in the lounge for more than an hour already. How eager was I to get on that plane, you get the idea.&lt;p&gt;Then the voice came on, "I am sorry to announce that the flight from xxx to xxx is delayed, DUE TO weather condition..." Crap, that's my flight No., I guess that's the thought flying through many brains. That's what I was thinking anyway, AND weather was &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;marvelous&lt;/span&gt;!&lt;/p&gt;&lt;p&gt;Anyhow, this is the third announcement in a row, another two hours delay. Lounge started to get noisy and less peaceful. (This is what I learnt before - when you can't think of a good excuse to cover the bad situation, telling the truth is the better choice, and the easier one.)&lt;/p&gt;&lt;p&gt;Now the idea that five hours of my life would be spent in this airport, I became a little nervous. After the interruption from the charming machine voice, I had to put my book away. What could be worthy enough for five hours of my time here in this place?&lt;/p&gt;&lt;p&gt;While I was thinking and searching, the service desk got more and more crowded. Impatient faces plus angry voice make quite a scene. Well, I could be a nosy geek sometimes so I started to watch. Apparently most of the airline folks had lost their nerves, they were being questioned, by many people, being requested with some quite wild compensation ;), being even nudged in not quite a friendly way. Well, it's Friday, and we are &lt;a href="http://www.randsinrepose.com/archives/2009/10/02/hurry.html"&gt;all in a hurry&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Just before I lost my interests and wondering whether my eyes should be cast somewhere else to capture a moment at least pay back some of my time, there was this small but firm and calm voice slip out of the crowd. Following that, I saw a girl, in her twenties and blue white airline suite, starting to pick up the panics and iron them one by one. She accepted the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;responsibility&lt;/span&gt;, (I should say that from the wearing, she was not the gal who was in charge.) made arrangements to&lt;br /&gt;those reasonable requests while declined/dodged some 'interesting' ones. The one I liked the most is that she didn't make up excuses, nor did she make false promises to try to shift the shit. Of course when things went wrong people would shout, "get the manager, we want to see the man in charge, we want to 'do something interesting to him' :)". The girl reached her manager, who didn't really match my expectation, as his reply over the microphone was "there is nothing I can do, the choice is yours."&lt;/p&gt;&lt;p&gt;Now there looked like going to be a riot, and I mean it. A lady pointed at the calm girl, "you people are all liars. How can you take responsibility when your boss doesn't want to, even he doesn't care about his company.". The girl replied, "I do, I care about my name on the tag on my suite. Please write my name down and you can always come back to me if these arrangement went wrong. I care about my name so I won't let it happen." I was quite impressed, I have to say. This was not some kinda movie lines that she doesn't need to worry about nothing what she might have to face in the next scene as it's just all &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;fantasy&lt;/span&gt;. I walked/squeezed to reach her and tapped in the shoulder. When she turned around in a hurry, I said, "thank you, you made my&lt;br /&gt;misery a memorable experience."&lt;/p&gt;&lt;p&gt;What went on there is irrelevant to this post now. I had what I was looking for. There is a choice and you are the person who can decide to pick or to ignore. She made her choice, by standing on her feet, by not avoiding. I am not sure whether she &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;truly&lt;/span&gt; believe that to be calm is the right thing to do or she just remembered her professional training. But to me, she did a wonderful job, and she certainly made her point - she cares about her name on the tag.&lt;/p&gt;&lt;p&gt;When we finally got on the plane, I had my hours paid.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8637856212287654138?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8637856212287654138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8637856212287654138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8637856212287654138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8637856212287654138'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/02/choice.html' title='Choice'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-3020903048130206389</id><published>2010-01-16T07:47:00.001-08:00</published><updated>2010-01-16T11:46:46.719-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google pulls out of China.'/><title type='text'>A pity - Google's leaving China</title><content type='html'>On my very first day back from China to UK, the same question has been dropped on me 5 times in a row, "what do you think the whole &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Google's&lt;/span&gt; pulling out of China thing?". Frankly, I didn't know what to think, perhaps its the jet lag thing or just because the trip was too hectic. Now, after couple of days, my brain has finally settled to its usual place - I don't like the taste of it!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Last news I heard on the similar thread was &lt;a href="http://www.businessweek.com/news/2010-01-11/google-agrees-to-stop-scanning-uploading-china-authors-books.html"&gt;Google was accused (rightly) of scanning a large amount of Chinese books without authorisation&lt;/a&gt;. Finally, the case was settled by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Google's&lt;/span&gt; apologies upon an alibi "inadequate communication" with the authors. 2 days later, again, on the same page, same name, Google is now taking a high stand that it will initiate "&lt;a href="http://googleblog.blogspot.com/2010/01/new-approach-to-china.html"&gt;A new approach to China&lt;/a&gt;". Reason being that it has detected some "sophisticated attack" to 20 companies with the intent of fishing information from a group of Chinese human activists' &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;gmail&lt;/span&gt; accounts. More than that, Google waved its American power stick and convince Washington that this is a &lt;a href="http://www.google.com/hostednews/afp/article/ALeqM5gyUVbcY-kL4dzCx7PeawMn8GTI-A"&gt;non-trivial political matter&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First of all, without taking this too far, I am a huge fan of Google, of its products, its engineering philosophy, its superb marketing and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;productionisation&lt;/span&gt; abilities, most of all, the assimilated talents it has.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I don't like the taste of this though, even that I know I would probably offend someone, inc. my closest friend. But this JUST DID NOT make sense. It doesn't take a genius to read the contradicts Google has presented here. If this really is an ethic battle, Google just lost it two days ago. In what on earth position it is to do so? To pull out from an undeniable largest emerging market just because there are organised hackers who have launched 'sophisticated attack'. Come on, who are you kidding Google! Not mention many God-fathers in this generation who helped to define the networking, security are working in Google, since when did the hacking stop in any public information network?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Admittedly, there are restrictions and information censoring in today's China, and there are many. I do not believe this will disappear easily, nor do I believe it will be quickly. I was also somewhat annoyed that I can't get to my blog, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;facebook&lt;/span&gt;, even twitter accounts back in China. However, China as a developing economy entity, there are much to be improved, consolidated. Just try to remind ourselves, which developed economy entity has not gone through a phase of transition? Much to be said with regards to communism and single party government. But we are here to do business, in a real world. When you want to manage information, yeah, you do that, but in what name can you stop others to do the same? Why can we only allow Google fishing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;everyone's&lt;/span&gt; account and information everyday just to be able to pop up relevant advertisement for its own profits? Surely it doesn't really differ from politic profits essentially.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are many speculations in terms of the real reason behind this decision. Some says Google.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;cn&lt;/span&gt; has never really performed up to expectation, regardless tens of billions of dollars has been thrown into the pot. Unfortunately, Google has officially blocked its own way to China, with all the right or wrong reasons. My financial advisor told me one thing, market has its rule, its intelligence. It takes a genius to try to understand it, not mention overpower it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's a pity for China, Google represents a type of culture, an idealism. I am sure many young people feel somehow lost without their spiritual leader in this technology sector. It's probably the time for a new star.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's a shame for Google. I would have shown my respects if it decided to pull out because of its performance, instead of an excuse-searching exercise.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-3020903048130206389?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/3020903048130206389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=3020903048130206389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3020903048130206389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3020903048130206389'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2010/01/pity-googles-leaving-china.html' title='A pity - Google&apos;s leaving China'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4796715129911731628</id><published>2009-12-22T01:12:00.001-08:00</published><updated>2010-01-16T15:14:40.236-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plan'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Sense of direction - what is a plan?</title><content type='html'>We love spontaneous, and the feeling of capable to do so.&lt;br /&gt;&lt;br /&gt;We also fear clueless as life sucks if you are not in control of your own daily shit. To keep a peace of mind, we try to predict what's gonna happen and what we can do about it if you won't get morning coffee tomorrow. As most of us are incapable of seeing what is coming and have difficulties in figuring out how on earth what happened on the other side of this lonely planet could possibly affect our own well-being, what we did in the end is guess at best, the difference is how much effort being spent to conclude such speculation.&lt;br /&gt;&lt;br /&gt;What gives us security facing unknown is the sense of direction. Ask yourself what will cause panic in your head, driving in a foreign country or broken GPS. To me, making a series inter-dependant guesses is to draw a line from where we are to, hopefully, where we want to be - a plan. We are trying to form certain level of security when there is no such things fed from outer space.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4796715129911731628?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4796715129911731628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4796715129911731628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4796715129911731628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4796715129911731628'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/12/sense-of-direction-what-is-plan.html' title='Sense of direction - what is a plan?'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6411187682193375075</id><published>2009-11-28T10:57:00.001-08:00</published><updated>2009-11-28T11:09:59.718-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='toolchain'/><title type='text'>Have your own toolchain</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:Verdana;font-size:13px;"&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Toolchain provides you the capability being able to compile &lt;b&gt;your&lt;/b&gt; code in &lt;b&gt;your&lt;/b&gt; way to be run on &lt;b&gt;your&lt;/b&gt; own hardware platform. For most of programmers, in majority of their career, are trying to learn to speak (code in) one or more common language, where syntax has been predefined, compilation approaches have been chosen, assembly set has been given, hardware has been decided by the boss :-).&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;Now, in an ideal world (I did say 'ideal'), you would design yourself an extremely powerful chip, with unlimited number of processing cores, running any instructions in nano-second.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;In an ideal world, you would probably want to cook your own assembly set to be run on this powerful chip, the first one for me would be - SORTITALLOUT.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;In an ideal world, you would also probably consider to write your own compiler, implementing those funky optimisation algorithms you came across only in research lab decades back in your  youth.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;At last, an easy one - one thing pretty much everyone else is doing nowadays - defining your own language syntax, yeah, you are right, a new language, and convince whoever you can convince to use and re-populate your civilisation.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;To have all four in place, you are pretty much in control of your own life. In real world, we tend to settle with compromise. Here we tend to pick one or two of these four items and reuse some efforts other brilliant geeks have been messing with. The normal ingredients in the toolchain include:&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;An assembler - to convert your assembly instructions into 000111....1..0., the only format machine really understand.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;A linker - to put pieces of brilliant moments together into a big 000111......1100.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;A compiler - with which your favourite programming language into a bunch of assembly - lower level instruction set. Yes, you are right, who need another level if we have assembly defined already? Many good and bad memories prove that you might have a point there, as in the early days, we all have one weapon call assembly code.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;These three are absolutely necessary for a micro-version of toolchain. Now if you have some code already, pump them bottom up, you will be talking to your machine now. However, if you intend to get serious, you will need the following:&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; text-align: justify; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;A debugger - whatever interface it is (my personal view is GUI debugger suck more than they contribute). This is a whole topic by itself and I don't really know much about so I will skip it.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Libraries - only if you ever want to rebuild the whole new world again all by yourself, you are going to need some of proven work done by other genius just like you, some common funcationalities everyone will come across. "This idea that there is generality in the specific is of far-reaching importance. — Douglas Hofstadter, Gödel, Escher, Bach"&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Utilities - copy, dump, whatever verb you can think of. These tools are really food for work, and thought.&lt;/li&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6411187682193375075?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6411187682193375075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6411187682193375075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6411187682193375075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6411187682193375075'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/11/have-your-own-toolchain.html' title='Have your own toolchain'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-34274626389161544</id><published>2009-11-27T08:27:00.001-08:00</published><updated>2009-11-30T07:31:51.076-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gadget'/><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='Host controller'/><title type='text'>All about USB</title><content type='html'>Pre-defined &lt;a id="di9z" href="http://www.usb.org/developers/devclass_docs/" title="USB device classes" style="color: rgb(85, 26, 139); "&gt;USB device classes&lt;/a&gt; provide standard USB drivers for the devices falling into these classes. Otherwise USB device vendor will provide their own.&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;USB Device driver = USB Host driver (Host controller/Hub/Master) &lt;b&gt;OR&lt;/b&gt; USB gadget (Device/Slave)&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style=" color: rgb(255, 0, 0); font-weight: bold; font-size:16px;"&gt;Host - Linux&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="yoc5" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_102gcjf74dw_b" style="width: 445px; height: 358px; " /&gt;&lt;/div&gt;&lt;div id="yoc5" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;&lt;b&gt;LDD3 - USB&lt;/b&gt;&lt;/div&gt;&lt;div id="yoc5" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;Endpoint&lt;/b&gt; - The basic uni-direction data channel, either from Host to Device (OUT) or Device to Host (IN)&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;CONTROL&lt;/b&gt; - configure, retrieve device information, send commands to device, retrieve device status report. Every USB device has a control endpoint "endpoint 0", used by USB core to configure the device at insertion time.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;INTERRUPT&lt;/b&gt; - endpoints transfer small amount of data at a fixed rate everytime Host asks Device for data. These endpoints are the primary transportation method for USB mice, keyboards. Also can be used by Host to send control command to Device. NOT generally for large amount of data.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;BUILK&lt;/b&gt; - for large amount of data transfer. Commonly used in printers, storage, and network devices to transfer bulk packets from or to devices. Data MUST gets through without loss, but time could NOT be guaranteed.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;ISOCHRONOUS&lt;/b&gt; - also for large amount of data transfer, but data loss is possible. Used in application for constant stream of data flowing such as real time data collection, audio and video streaming.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;CONTROL and BULK types of Endpoints are used in asynchronous transfer. INTERRUPT and ISOCHRONOUS are periodic. In Linux, usb_host_endpoint structure describe an endpoint, which contains a usb_endpoint_descriptor.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;Interface&lt;/b&gt; - a bundle of Endpoints, handles one type of USB logical connection, such as mouse, keyboard, audio stream. Some USB devices have multiple interfaces (for example, an USB speaker device has one interface for audio stream, one interface for keyboard for the buttons). USB device driver and USB Interface is a one-to-one mapping relation. Each USB driver controls one interface in an USB devices. So it is likely we need multiple USB drivers to control one USB hardware device. USB driver is bound to USB Interface.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Interface structure in the kernel is usb_interface. USB core passes usb_interface structure to USB driver to control.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Each USB device will have a USB major number. Every interface will be assigned a minor number by USB core via calling usb_register_dev.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;Configuration&lt;/b&gt; - a bundle of Interfaces. A USB device can have multiple configurations to switch in between to change the state of the device. In the kernel, structure usb_host_config represents a Configuration. usb_device represents entire USB device.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="b-zl" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="tk0e" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;b&gt;Descriptors &lt;/b&gt;&lt;/div&gt;&lt;div id="kd6y" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="xirw" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;All USB devices have a hierarchy of descriptors which describe to the host information such as what the device is, who makes it, what version of USB it supports, how many ways it can be configured, the number of endpoints and their types etc. The more common USB descriptors are &lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• Device Descriptors&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• Configuration Descriptors&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• Interface Descriptors&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• Endpoint Descriptors&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• String Descriptors&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_101gtfrq3cq_b" style="width: 648px; height: 275.704px; " /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;         &lt;/span&gt;LDD3 - USB&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;Enumeration -&lt;/b&gt; is the process of determining what device has just been connected to the bus and what parameters it requires such as power consumption, number and type of endpoint(s), class of product etc. The host will then assign the device an address and enable a configuration allowing the device to transfer data on the bus. A fairly generic enumeration process is detailed in section 9.1.2 of the USB specification.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;USB File system&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;The first USB device is a root hub, or known as USB controller, usually contained in a PCI device acting as a bridge between PCI bus and USB bus. It is also the first USB device on USB bus. All root hubs will be assigned unique number by USB core. &lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;USB sysfs device naming scheme: &lt;i&gt;root_hub-hub_port:config.interface&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;[&lt;b&gt;USB Selective Suspend&lt;/b&gt; - The USB selective suspend feature allows the hub driver to suspend an individual port without affecting the operation of the other ports on the hub.]&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Kernel will bind the correct USB driver to interfaces specified by configuration based on &lt;i&gt;&lt;b&gt;bConfigurationValue&lt;/b&gt;&lt;/i&gt; in a USB device.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;sysfs&lt;/i&gt; (&lt;b&gt;&lt;i&gt;/sys/&lt;/i&gt;&lt;/b&gt;) stops at the interface level without exposing all parts of USB device.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Detail information of endpoints can be found in &lt;i&gt;usbfs&lt;/i&gt; filesystem, mounted in &lt;i&gt;&lt;b&gt;/proc/bus/usb/&lt;/b&gt;&lt;/i&gt;. /proc/bus/usb/devices will show all configurations and endpoints in the system. It also can allow user space programs talk directly to USB devices. (&lt;b&gt;Hence user space USB driver is possible to be in user space rather than kernel.&lt;/b&gt;)&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;Data transfer&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-style: italic; "&gt;Via URB&lt;/span&gt;&lt;/div&gt;                    &lt;i&gt;usb_alloc_urb                                           usb_xxxxxpipe  usb_submit_urb&lt;/i&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;                      &lt;span style="font-size:78%;"&gt;create URB                                                                 URB                    URB&lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;      &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    &lt;/span&gt;&lt;span style="font-size:78%;"&gt;    Notify&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span style="font-size:78%;"&gt;Apps ---&gt; USB device driver ---------------&gt; USB device driver assign URB to endpoint -------&gt; USB core -------&gt; USB host controller (for this USB device) &lt;&lt;usb&gt;&gt; ---------&gt;  USB device driver&lt;/usb&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Different URBs are created to be bound to different types of endpoints. After a urb has been submitted to the USB core successfully, it should never try to access any fields of the urb structure until the complete function is called.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;• When the function is &lt;i&gt;usb_kill_urb&lt;/i&gt;, the urb lifecycle is stopped. This function is usually used when the device is disconnected from the system, in the disconnect callback.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal; "&gt;• &lt;/span&gt;usb_unlink_urb&lt;/i&gt; function should be used to tell the USB core to stop an urb. This function does not wait for the urb to be fully stopped before returningto the caller.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;Without URB&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Synchrounous &lt;b&gt;&lt;i&gt;usb_bulk_msg&lt;span style="font-weight: normal; "&gt;&lt;span style="font-style: normal; "&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; "&gt;usb_control_msg&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;To write a USB driver&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Same thing to other subsystem drivers really, create driver structure -&gt; register to USB kernel subsystem (-&gt; create char driver interface for USB devices)&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;USB core handles the addition and removal of USB devices within a single thread, so any slow device driver can cause the USB device detection time to slow down and become noticeable by the user.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;VCP over USB&lt;/b&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span style="font-weight: normal; "&gt;&lt;a id="m4gc" href="http://en.wikipedia.org/wiki/COM_port_redirector" title="http://en.wikipedia.org/wiki/COM_port_redirector" style="color: rgb(85, 26, 139); "&gt;COM port redirector&lt;/a&gt; is a powerful concept in hardware connection limited device.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span style="font-weight: normal; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;USB CDC ACM&lt;/b&gt;: Abstract Control Model. This access model provides a serial (COM) like interface to a USB device. Each CDC-ACM channel utilizes 3 USB end-points for end-to-end communication. Linux has a generic CDC ACM host-side implementation in the kernel module &lt;b&gt;cdc_acm.ko&lt;/b&gt;.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;USB CDC ECM&lt;/b&gt;: Ethernet Networking Control Model. This access model provides a standardized networking interface for handling of IP transmission over a physical interface such as USB.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;USB CDC OBEX&lt;/b&gt;: Object Exchange&lt;/div&gt;&lt;a href="http://www.jungo.com/st/embedded_usb_cdc.html" style="color: rgb(85, 26, 139); "&gt;http://www.jungo.com/st/embedded_usb_cdc.html&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style=" color: rgb(255, 0, 0); font-weight: bold; font-size:16px;"&gt;Gadget - Linux&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Instead of Host controller, we have peripheral controller taking it place in USB 'slave' device end.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="cp6c" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_103gjz2c7d2_b" style="width: 330px; height: 138px; " /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;a href="http://www.linux-usb.org/gadget/"&gt;Typical gadget drivers&lt;/a&gt; under Linux are: &lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • Gadget Zero&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • Ethernet over USB (To support different host, there are different modes: CDC Ethernet, CDC subset, RNDIS)&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • GadgetFS&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • File-backed storage (implementing USB Mass storage class)&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • Serial (implementing CDC ACM class)&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    • MIDI&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-34274626389161544?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/34274626389161544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=34274626389161544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/34274626389161544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/34274626389161544'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/11/all-about-usb.html' title='All about USB'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-5970230389495039511</id><published>2009-11-22T11:15:00.000-08:00</published><updated>2009-11-22T11:16:56.110-08:00</updated><title type='text'>R&amp;R</title><content type='html'>I have been my new role for almost a month now, a month within which I only spent two nights at my newly purchased house.&lt;br /&gt;What is different to me is that I got to spend a lot of time with customer and had chance to really understand the source of all information. This leads me to start thinking about:&lt;br /&gt;&lt;br /&gt;1. The amount of information lost during transmission is unbelievable significant. As a startup, we only recruit people who have been working in this field for long enough time with established records. You might think that we are lucky enough that these pros would be able to interpret, parse and transmit information more accurately and timely. However, the fact turned out that we have got some priority wrong - one particular problem customer has been waiting for over two months as it blocked their development, while our engineers have no idea and were plodding through the bug list in alpha beta order, project team in customer side has been held up. On second thought, it seems while FAEs were focus on the problem to be resolved or tons of emails to reply, or evaluate whether it is ok to nag again for the bug updates, these poor fellows have lost the big picture and ability to make judgement calls.&lt;br /&gt;&lt;br /&gt;2. Management is all about communication is exemplified to its extreme in customer management role like this. I have one crazy principle - when I decide to go to bed at night, there will be no unprocessed emails in my inbox, even sometimes it means banging Del key 10 times in a row per second. Because the nature of the role, it seems all natural and makes sense that to  keep the communication flow healthily is all is required for this role. You can try that, but my experience tells me that after a very short of time, you will notice that you are not the one in control anymore - not for schedule, not for customer project scope, lose track of what the heck is going on within your engineering department. Why? Simple, because you gave up the right to control! Managing information channel is an auditing job at its best. While it is so important as I explained in previous section, if you choose the easy way out - by managing the results of people's actions reactively, you forgot about the source. If there are some areas could be improved, practice could be less time consuming, process could be less painful and distracting, the best way is to cure the source, to get on top of the fundamental reasons behind symptoms. Real managers manage people, practice, process; mediocre ones massage information; bad managers react to situations.&lt;br /&gt;&lt;br /&gt;3. At last, one questions bothers me mostly through half of my professional career is, have we given up the right and ability to be creative, to do something for real? There are numerous blogs and articles talking about how managers with good hands on engineering background tend to screw big time by micro-managing and mistaken the purpose of his/her role just because  they got too attached to write few lines of code, carry out some tests, define some protocol etc. By doing this, they lose their focus in their own jobs. Frankly I have probably read and written too much of this to the point everytime this topic pops up, I just want to shout, WHAT THE FUCK a manager's job should be?&lt;br /&gt;&lt;br /&gt;  Simple definition for manager from my dictionary - a guy whose job is to do whatever is required to accomplish team's goal.&lt;br /&gt;&lt;br /&gt;If you need someone to get the code done and the only possible person is you, guess what, you are going to write some code. If you happen to be an expert in some areas your team require some advice, don't be shy, that IS your job. Hard isn't it? That's the price you pay when you want to be on the spotlight.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-5970230389495039511?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/5970230389495039511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=5970230389495039511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5970230389495039511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5970230389495039511'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/11/r.html' title='R&amp;R'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4740356613533142140</id><published>2009-10-30T10:44:00.000-07:00</published><updated>2009-10-30T17:50:54.126-07:00</updated><title type='text'>Ten most annoying things in geek's life</title><content type='html'>1. Sticky mouse, touch pad goes wild.&lt;div&gt;2. Shortcuts stop working, especially Command-W/Alt+F4/ctrl+c, z, d.&lt;/div&gt;&lt;div&gt;3. There is only one USB port to your laptop.&lt;/div&gt;&lt;div&gt;4. No chocolate within reachable distance.&lt;/div&gt;&lt;div&gt;5. Only one monitor.&lt;/div&gt;&lt;div&gt;6. No invite for stuff like google voice, wave etc.&lt;/div&gt;&lt;div&gt;7. Have to use windows for some strange reason.&lt;/div&gt;&lt;div&gt;8. Again, have to use MS Word or Visual Studio.&lt;/div&gt;&lt;div&gt;9. Manager just proves himself as a dumb ass, again.&lt;/div&gt;&lt;div&gt;10. No game and surfing in office.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4740356613533142140?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4740356613533142140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4740356613533142140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4740356613533142140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4740356613533142140'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/ten-most-annoying-things-in-geeks-life.html' title='Ten most annoying things in geek&apos;s life'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6231352535398724224</id><published>2009-10-24T10:08:00.000-07:00</published><updated>2009-10-24T10:10:26.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='old is new'/><title type='text'>Everything old is new</title><content type='html'>&lt;div&gt;Every morning when I cycle through a large piece of stretching grass land, it always gives me a sense of peace and fresh. I know it may sounds strange but I did start to enjoy the half an hour cycle trip every morning, not so much in the afternoon...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The road is the same, come across the same vans and buses, even wave to the same bunch of cyclists and morning joggers. You may have already been bored so far. Hang on, what's different on that side of the road, a hare running straight into me!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's what happened when I sit down in the office, open up laptop, plug in all sorts of cables and re-arrange all sorts of devices and boards, all routines. I know I am good at these routines, and I also know that I can make something happen today from here. The trick is, we all start from &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;familiar&lt;/span&gt; and 'boring' stuff, and many of us are also so ambitious that not willing to go through all the 'routines', to which their talents are considered to be wasted.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To me, everything old is new. Every bit of routine gives me a perfect background scene to train my eyes and mind to pick up those different, those potentially could be significant. It is those little things here and there complete every day life. It is also these little opportunities where we can pick up new knowledge, experience. There is hardly possible for us to sit in front of your shining desk and come up with a killing product idea or impulse of restructure initiative to take the organisation forward, no, no no. Things don't work that way. I realise what I have to do is to be able have a peaceful mind, accept the reality, fully appreciate what has been happening, and pick up those little lights where gold might be found. Once that happen, you bet I am right - everything old is new. You will start to look at those &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;familiar&lt;/span&gt; faces differently, you will start to hold different opinions to things around you, you will notice there are so many changes quietly going on affecting the 'old' environment. Many great ideas have been generated from most ordinary moments. If you think there is a small change could benefit a design or part of the code a lot, you should do it, do it now. Do not let it pass by, as it might be the last chance you see it and after that, you will say, "today is just another boring day, nothing exciting, really.". Really?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I love to remind myself of the importance of open mind and be realistic. There is nothing wrong with one step a time, also, it is a natural steady-state evolution of how significant changes are born. Remember, everything you believe you have mastered, it has just developed, only you have missed the change, and what is coming next if you keep ignoring it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6231352535398724224?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6231352535398724224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6231352535398724224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6231352535398724224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6231352535398724224'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/everything-old-is-new.html' title='Everything old is new'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-3880598833770738370</id><published>2009-10-16T12:33:00.000-07:00</published><updated>2009-10-16T13:49:45.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Peter&apos;s principle'/><category scheme='http://www.blogger.com/atom/ns#' term='Dilbert&apos;s principle'/><title type='text'>Incompetence</title><content type='html'>Peter's principle says, in a hierarchically structured organisation, everyone will eventually be working in their level of incompetence. The reason behind is simple - promotion as reward will encourage people who has well or out performed in their current roles to new ones where they will not be familiar nor comfortable.&lt;div&gt;&lt;br /&gt;&lt;div&gt;Scott Adam coined Dilbert's principle, in which he explains that companies tend to systematically promote least competent employee to management - to limit the amount of damage they will be capable of doing. Sounds much more fun, huh? By intentionally, Dilbert thinks the upper layers of an organisation is of no or little relevance to the productivity, which in fact is mostly achieved by the 'blue-collar' workers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In a world where efficiency, contribution, competence are valuable attributes we are looking for in employee, how could management have been given such a bad name? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's see who are the managers first. Mainly there are two groups concerned. First group consists of those who have sweat and bleed on the front line enough to impress the boss and been rewarded with a manager's hat. Most of them have or had solid hands on engineering skills and confident in their interpretation and judgement over technicality of the future problems, with which they are about to be tested on regular basis. In the second group, we have people who have been given the benefit of the doubt for their background. Unfortunately, the size of this group is surprisingly and unfortunately large.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For folks who have finally fought their ways through to manager's position, it is a strange, exciting, and unease situation to be. Suddenly it seems there are way too many technical morons around you, rather than you have to sharpen your head like a nut to get boss's attention back in your engineer days; also, you feel privileged that finally you can fix all the stupid calls your boss have made in the past because he seemed to know nothing about nothing. After a while, you realise this is a completely different game - your superior technical strength will not help you surf through the tangled political mine field; your sharpness has been considered by your peers as arrogance and difficult to communicate; you have kissed good bye to the luck of having concentrated 42 minutes on one particular problem without being distracted; you also start to realise you have no fricking clue what is going on in your boss's mind or does he have one as there is just so little quantitative measurable around here.; finally, damn it, "I have missed my morning coffee again!". Being an exceptional engineer doesn't automatically qualify you to manage. If the reason you have been given the management responsibility is entirely based on the fact you appeared to have outperform in your last role, I can tell you now, it was the wrong decision. You have now been officially pushed into a strange land, to which you may not have any real interests at all. At the bottom of your heart, you are probably screaming every morning, "fuck that, I just want to hack!".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Right, now to the bad side, for those have developed their career by avoiding risks and responsibilities as much as possible but somehow able to sneak their way through step by step. How to identify these people? Easy enough, lines they tend to use a lot is, "yes, I have done exactly same thing before". Then when you ask just a little bit more, he will starts to wave the flags to get out of the confrontation as quick as possible with line like "I don't want to hang up on the details on this for too long". I guess Dilbert is right after all, for group B, the best thing to do is to keep them in the management position, of course if your company can afford it, that way at least he will cause no direct damage to whatever it is you are trying to achieve, hopefully.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-3880598833770738370?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/3880598833770738370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=3880598833770738370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3880598833770738370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3880598833770738370'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/incompetence.html' title='Incompetence'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4367495991975991479</id><published>2009-10-14T04:22:00.000-07:00</published><updated>2009-10-15T15:09:29.687-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jack Bauer'/><category scheme='http://www.blogger.com/atom/ns#' term='decision'/><category scheme='http://www.blogger.com/atom/ns#' term='Subterfuge'/><category scheme='http://www.blogger.com/atom/ns#' term='chess'/><category scheme='http://www.blogger.com/atom/ns#' term='24'/><title type='text'>Manager's chessboard</title><content type='html'>&lt;div&gt;There is an underline synergy between being a manager and a chess player. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At the start of a chess game, if you were to win, one thing you would need to be certain and clear with the strategy, be it a waiting-for-mistakes-from-opponent, balanced attack and defence, or strike with all price. You also need to keep a very close eye on the strategy of your opponent, if you are not familiar with his/her style already, and adapt your counter plan.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For every move, not only you have to consider the immediate effects on material loss or gain, more importantly, you have to evaluate things like position of the pieces, support for the future development of your overall plan, maybe even traps to trick your opponent, as the big picture. Every move is a decision with consequence, as a manager, you have to make yours, with all the information available to you, given that you have your eyes and ears opened to receive them - you have to be able to read well whatever is on the 8x8 square; able to see through the moves from the pieces and predict the goal of your opponent, be it a local win on points or strategic position acquisition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You have your resources - pieces, which are pretty much the only thing is on your side to get this game over with a desirable result. To mobilise and maximise the potentials, you have to be well aware of what they are capable of - &lt;i&gt;En passant&lt;/i&gt;, what they could become - &lt;i&gt;promotion&lt;/i&gt;, what the killing combinations are, how to coordinate the pieces - &lt;i&gt;coordination&lt;/i&gt;, how to create healthy dependency and protection chains, how to double check.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Again, you have to make your decision, none of them will be easy, or else you might be better off just to get out of the game and try something else. Sometimes decision demands sacrifice, compromise, &lt;i&gt;exchange of materials&lt;/i&gt;, concentrated attack, defend and counter attack. In other situation, it means being flexible (forcing a tie), realistic (evaluating situation and selecting the most appropriate play going forward), brave, calm (facing panics after mistakes).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There will be unhappy scenes, with pieces lost, positions given up, conflict interests and plans. In real world for managers, to create and manage a positive and healthy political environment is part of the job, critical one. However, the truth is, you can't make everyone happy, you never will or should. I like in 24 season 7 Jack Bauer answers Renee how he could live with all the decisions he has made. Sometimes you have to choose between two evils. "If you’re going commando to do what you believe is right, it doesn’t mean someone isn’t going to be pissed, but it should allow you to go to sleep at night." Apparently Michael Lopp has a term for this - &lt;a href="http://www.managinghumans.com/"&gt;Subterfuge&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Responses:&lt;/div&gt;&lt;div&gt;1. Thanks for Jiayao's comments. Pattern analysis and retrospective thinking is how a chess player can learn from the past and become better and stronger. This is in a way very much like skill training. Learning from the past, other players, summarise and make these patterns your own versions. This gives the chessboard another dimension - as a manager, you might not succeed in every situation with every team, the important thing is, there is no bad or good experience, it's just experience and opportunity to grow from, inc. other people's lessons.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4367495991975991479?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4367495991975991479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4367495991975991479' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4367495991975991479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4367495991975991479'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/managers-chessboard.html' title='Manager&apos;s chessboard'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4949244777806940973</id><published>2009-10-11T12:11:00.000-07:00</published><updated>2009-10-14T04:20:14.481-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hit and run'/><category scheme='http://www.blogger.com/atom/ns#' term='escort run'/><title type='text'>Get it done, and don't fuck it up!</title><content type='html'>I had the luck to work for both big size organisation, and small &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;startup&lt;/span&gt;. For the former, it takes forever to carry out feasibility study, risk analysis, specification and review. In the end, after the last thread of passion passes away, you think, fuck it, it's not worth it. Every little idea takes forever to sprint out hence no surprise many aborted. Whenever this happen, it pisses me off. However, if you take a closer look at the logic behind, it does not necessary to be the wrong thing to do, it fails at execution, not the initiative. At least, there is no explicit vulnerability, everyone is on the same (firing) line.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the contrary, small size team doesn't have such problems, especially in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;startups&lt;/span&gt;. Everything happens in very fast speed; everyone has numerous balls in the air to juggle with at any given time. What tends to happen is there is no much time to think things through, also over-thinking is certainly not encouraged in this type of culture. You don't think weeks or months to decide how you are going to design a system, not can you afford to spend hour after hour meeting to entertain product managers who obviously is an idiot. All you have is at the end of Monday, your boss came over and tap on your shoulder, "hey, we need to get this new idea up and running at the end of this week, get it done, and don't fuck it up!". Okay, it's good someone has the unambiguous responsibility. In the back of your boss's mind, maybe subconsciously, he knew that he dropped a shit bomb to you. He trusted you to turn that bag of shit into gold - that's what we do, what choice do we have? Next Monday is the only window opportunity we have to demonstrate to this guy who is potentially willing to pay big money if he likes what he sees. If you asked why it is such a short notice for something is completely not in existing product design, you will probably get something like this, "It's complicated. Life changes, product requirement changes, we need the money, shut up and get on with it". Sounds familiar? This happens everywhere! Of course it's complicate, so next time you heard this answer, think about which type of the delegation it looks like.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are roughly two types followups to this - &lt;i&gt;hit and run&lt;/i&gt; or &lt;i&gt;escort run&lt;/i&gt;.&lt;/div&gt;&lt;div&gt;In essence, the delegation would succeed or not, is largely decided by the way how it is done. In &lt;i&gt;hit and run&lt;/i&gt; situation, you got an instruction and from that point on, you are pretty much on your own. The interesting thing is, if the delegation was made because he/she doesn't really have a clue how to proceed at all, you will be almost certain in the dump land with what is going to happen. It's might not be totally true that your boss is deliberately set you up for disaster, but for sure, you have just been shafted even he is genuinely hoping for a miracle. The priority goal for your boss right now is to get someone and shift the shit over with. How the task is going to turn out, it's &lt;b&gt;&lt;i&gt;entirely&lt;/i&gt;&lt;/b&gt; your responsibility. However, you are officially one man band, so make no mistake that whose ass is on the line if you &lt;b&gt;do&lt;/b&gt; fuck it up. If your boss is an escort runner, you are a lucky man! He wants you to succeed, for whatever reasons you are bought into. He will make sure all the relevant information are promptly passed on to you with the best of his judgement. He will also run with you side by side to make sure you have sufficient support and what it takes actually to make this a success. If he is a manager, there might not be much he can do technically, but there are tons of stuff need to be in place to make the development going smoothly, keeping organisation around you up and running. If he is a technical authority or team leader, he will do his homework too, to make sure you don't just have an instruction, but also have the direction. Now the odds is good that you might be able to make it. Not just to make something happen, but make something right happen.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now you decide, which part of the world you want your engineers to be, deep shitty place eventually losing trust to you or a place with blood and swear but your eyes on the ball - a successful result, and working with them to make it happen, make it real?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4949244777806940973?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4949244777806940973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4949244777806940973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4949244777806940973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4949244777806940973'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/get-it-done-and-dont-fuck-it-up.html' title='Get it done, and don&apos;t fuck it up!'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-5093238131509649239</id><published>2009-10-10T14:02:00.001-07:00</published><updated>2009-10-14T11:44:08.909-07:00</updated><title type='text'>Everything is personal</title><content type='html'>&lt;p&gt;I like to stay clear mind and be genuine about the work I do, people I love and respect, and myself. Common sense tell us about professionalism that nothing is personal, just business. To me, everything is personal (not necessary you have to take any comments towards evidence as personal offence or compliment). In business, everything starts from personal interactions, personal impact, personal contribution to a large group, personal development.&lt;/p&gt;  &lt;p&gt;Today I have sent my wife with Sophie, the little one in her tummy right now back to the other part of family cross the planet. Suddenly it makes me realise how much I miss just to be with them, to know and worry about our coming baby, to try to build up and give her everything we deem as good, healthy and interesting. There you are, I have gone all emotional already :).&lt;/p&gt;  &lt;p&gt;Life is such a wonderful thing full of surprises and up and down that we might never be able to understand the meanings of it, if there is one. Family is truly something we can not live without, a sense of responsibility, sense of belonging, something makes our everyday struggle and pursue come with a purpose. Good friend is a gift, what I would really willing to exchange anything else for, life time treasure. There are not much else I think could have such profound meaning in one's life. &lt;/p&gt;  &lt;p&gt;Human society has developed till today, we hold family and friendship in our heart. What about work, what about profession? To me, I love every step I have been through, hardship or thrilling emotion, or simply a peace of mind and an hour relaxing but meaningful talk. As cheesy as it might sound, our lives deserve more than living through the time we have been given, the rights we were born with. To create something worth leave to our children, to help someone when they are lost, to have impact on life more than ourselves, to contribute to what we belong.&lt;/p&gt;  &lt;p&gt;I love my work that makes my life worthwhile and meaningful; I want everything good for my daughter, to whom her life will surely be another wonderful journey; to my wife, everyday she has spent and will be with me; to my very dear friends, who help me to be better every step along the way; to parents, now I understand how little I was and how much they have given.&lt;/p&gt;  &lt;p&gt;If you don't love what you do, maybe you need to find it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-5093238131509649239?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/5093238131509649239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=5093238131509649239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5093238131509649239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5093238131509649239'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/everything-is-personal.html' title='Everything is personal'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8182897651667499853</id><published>2009-10-06T13:54:00.000-07:00</published><updated>2009-10-06T14:30:47.621-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='penalty'/><category scheme='http://www.blogger.com/atom/ns#' term='time management'/><category scheme='http://www.blogger.com/atom/ns#' term='achievement management'/><title type='text'>Manage time or manage achievement</title><content type='html'>Most people are driven by calendar; some manage it; a handful of people keep an eye on time, but focus on deliverable.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have always felt sorry for those staring at their calendar on a Monday morning, trying to figure out what is happening next. In the same time, jamming calendar with pre-booked hours is nothing more than a desperate driving instructor who could not help worrying about how to fill his hours.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You might have heard of GTD practice (get things done). You might be also a fan of prioritised  to-do list. The pitfall is, organising resource could easily slip into you focus area, as you spend more than enough efforts in feeding the time machine, rather than actually get things done!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I keep a very reasonable calendar, too much available slot that my boss would not normally be impressed from the first look of it. It almost too simple and easy to say, what matters is what has happened, what has been transformed, what has been produced from nothing to something, what has been delivered. To keep boss happy is very important because only that way you can have the support you need to carry out your mission. However, to those who believe that's the core of their jobs, you probably want to click away from this blog. It's also important to manage expectation and show due diligence, especially for management or leadership role. Unfortunately, many bosses have failed to recognise that at the end of day, one thing matters the most, more than any fluffy gestures, is deliverable. No matter what roles you are playing, you are supposed to deliver something. Time you have, time you have been paid for, is the ultimate resource you have, absolutely the same to everyone else in quantity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I guess there is little to argue that people who can manage their time tend to be more organised and efficient. However, being organised is completely different concept to being in control of what's happening; being efficient is also not equivalent to being effective. Interestingly, being able to deliver, are largely depended on the amount of control you have over the matters which you are responsible for, and how effective you are in processing what is required to actually produce desirable results, being a receptionist or a chief architect. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How to maximise the output given limited resource (time)?&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Hit those big ones.&lt;/li&gt;&lt;li&gt;Hit those will cost a lot if not happening on time. (&lt;i&gt;penalty&lt;/i&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I have had this illusion long time ago that once I resolve all known problems, done all planned tasks, it is the end. We all have to live to realise that you can not possibly finish all the work at any possible points. The truth is, you will have no need to exist if that happens :-). So pick those which have higher &lt;i&gt;return of (time) investment&lt;/i&gt; or those with higher &lt;span class="Apple-style-span" style="font-style: italic; "&gt;penalty&lt;/span&gt;. To manage around this point of view, you will not be swerving about and lose clue of what you were trying to achieve, by putting too much love in your calendar.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8182897651667499853?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8182897651667499853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8182897651667499853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8182897651667499853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8182897651667499853'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/10/manage-time-or-manage-achievement.html' title='Manage time or manage achievement'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8776780187753507224</id><published>2009-09-28T01:40:00.001-07:00</published><updated>2009-09-28T02:17:50.996-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='innovation'/><category scheme='http://www.blogger.com/atom/ns#' term='awareness'/><title type='text'>Awareness</title><content type='html'>I got a little excited days before when Jon told me one of his idea. Frankly, it is so nice to know someone else out there is on the similar thought process, and did better!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The idea is simple but powerful - using OCR to feed image data (containing text) captured by camera into a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TTS&lt;/span&gt; engine (via translator optionally), then render it out to audio - a nice neat application on Android Magic. We both agree that there is a set of very good use cases for this application which empower blind to read, illiterate to understand and automatic language translation. Admittedly, I was also working on ideas to utilise &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TTS&lt;/span&gt; engine on mobile platform but could not be convinced so far about the use cases I came out. I am sure you will find this app on Android market very soon but before then, for privacy reason I am not going to expand on the implementation. What matters here is my expectation on the awareness has changed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is easy to assume that to write couple of hundreds lines of code using existing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;APIs&lt;/span&gt; will not carry enough weight as far as innovation is concerned, at least that is what I thought so. For this reason, I started to cast my eyes on those where some ground-breaking concepts could possibly be generated. That's the reason I spent many years of my professional career in fundamental research. Having said this, the dilemma is in areas where domain specific knowledge is required for making such breakthrough, scarcely we would see great product just come straight out. As a matter of fact, many of great products took a different path - good understand of people's needs, a piece of requirement, a set of good use cases (existing or brand new while justified ones). We have iPhone, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;iPod&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Wii&lt;/span&gt;, Blackberry, Search engines, Google Maps, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Netbooks&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Hadoop&lt;/span&gt;, Google wave and so many more. To maintain a high awareness level, ability to identify the problems and consequently establish links between problems and known techniques is certainly a good start to be innovative, so congratulate to Jon, who is on the right path. Next step, I think is to be brave, and think big, get out of our &lt;a href="http://hegallis.blogspot.com/2009/09/comfortable-zone.html"&gt;comfortable zone&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This blog is inspired by &lt;a href="http://mydiaryz.blogspot.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Jonanthan&lt;/span&gt;&lt;/a&gt;'s work, to whom the credit goes. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8776780187753507224?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8776780187753507224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8776780187753507224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8776780187753507224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8776780187753507224'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/awareness.html' title='Awareness'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-1816268221137516249</id><published>2009-09-16T15:08:00.001-07:00</published><updated>2009-09-25T01:11:04.120-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='communication fidelity'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='real time search'/><title type='text'>Real time search, angel or evil</title><content type='html'>Twitter is hardly a technology breakthrough in any sense whatsoever, fairly speaking, I think that is a general opinion. Evan Williams, however, has taken the second position in "&lt;a href="http://tech100.t3.com/list/10-1/"&gt;Top 100 most influential people in tech&lt;/a&gt;", right after Sergey &amp;amp; Larry.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One of my colleagues says, "too much twittering makes a twat". &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, what is the big deal? 140 characters a time (for ASCII, Unicode you only get half the amount), one would wonder what the importance that would carry, unavoidably. On another hand, there is no rules or regulations for anyone to register an account as yet. Although rumour says that Twitter will introduce premier account to avoid people stole celebrities' identities. So, what's the catch?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My stand is very clear - I love twitter, not because it is a new gadget, in my opinion, Twitter has achieved two things, firstly, Twitter has provided a platform and encourage fidelity in Internet communication; secondly, Twitter is building up an ideal personalised direct marketing channel, which could potentially has very high hit rate. Some has categorised, wrongly, Twitter as a networking or community tool in my opinion. The most significant difference Twitter has made is it does nothing else other than provide a channel, means, not content. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Twitter has 45 millions registered users, numerous third party connectors and clients interfaces. Many, not just individuals, have started to realise the benefit of reaching to audiences and potential customers (in commercial sense) through this channel. It is on the way of no longer being a virtual identity in Second Life. The fidelity it has introduced and the initiatives subscribers have taken, has been essential to allow others to learn and adopt this model elsewhere. There are some early adaptors exploring the opportunity in real time search domain - mostly linking the keyword from tweets to prepared advertisement. Of course I will still block the spammers without a slight hesitance, the trend is looking good.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-1816268221137516249?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/1816268221137516249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=1816268221137516249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1816268221137516249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1816268221137516249'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/real-time-search-angel-or-evil.html' title='Real time search, angel or evil'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7113321317298865614</id><published>2009-09-16T11:42:00.000-07:00</published><updated>2009-09-16T15:48:37.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='motivate'/><title type='text'>if-then reward</title><content type='html'>Dan Pink has given a very interesting &lt;a href="http://dotsub.com/view/e358ac0c-314e-473a-b051-f0a2deaa3a7b/viewTranscript/eng"&gt;presentation &lt;/a&gt;on &lt;a href="http://www.ted.com/talks/dan_pink_on_motivation.html"&gt;the surprising science of motivation&lt;/a&gt;. Contradict to what we believed that incentives will motivate people hence much better performance, evidence has proved that for certain tasks, those require much &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;creativity&lt;/span&gt;, commitment, outside-of-box thinking work, higher incentives will have negative effects. Dan quoted Candle problem created by a psychologist named Karl &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Duncker&lt;/span&gt; in 1945. You can find the details of this experiment on &lt;a href="http://en.wikipedia.org/wiki/Karl_Duncker"&gt;wiki&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This experiment has demonstrated our behavioural response under incentives will not always help us to achieve better performance, especially for those results can not be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;pre&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;determinated&lt;/span&gt;, e.g. creative tasks. Instead, traditional incentive-driven approach will narrow people's mind and sight, focus on what is not there yet, rather than keeping eyes and ears open, radar has been tuned to very limited frequency bands. What comes out from that would only be &lt;i&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ok&lt;/span&gt; &lt;/i&gt;at best. Unfortunately, for these tasks, &lt;i&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;ok&lt;/span&gt;&lt;/i&gt; is simply not enough; &lt;i&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ok&lt;/span&gt;&lt;/i&gt; means failure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are already many 21st century companies (just for you know, there are way too many last century ones around!) have already started to notice this discrepancy between 'common-sense' and what is really happening. Introducing 20% time for engineers to do whatever is not their daily jobs, breaking down hierarchical structure into small team with autonomous operation ability, motivating people by exposing information and searching for purpose which is bigger than individuals, these have been giving us surprisingly good returns. Most of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Google's&lt;/span&gt; popular products stemmed from 20% time. Organisations start to realise the huge difference in a bunch of motivated people and what they can achieve - something not in the 'plan', something generates new revenue, channels, models.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"&lt;b&gt;&lt;i&gt;if&lt;/i&gt;&lt;/b&gt; you do this", "&lt;b&gt;&lt;i&gt;then&lt;/i&gt;&lt;/b&gt; you will get this and that amount" does not apply anymore. If you really look into it, you will realise work requiring &lt;i&gt;&lt;b&gt;self-motivation&lt;/b&gt;&lt;/i&gt; does not generally come from financial benefits, not anymore. Financial concerns will only play its part to a certain level, in clear defined target, or in Dan's word - tasks for dummies.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7113321317298865614?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7113321317298865614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7113321317298865614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7113321317298865614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7113321317298865614'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/if-then-reward.html' title='if-then reward'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6620983351666012018</id><published>2009-09-16T10:28:00.000-07:00</published><updated>2009-09-16T15:48:58.361-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='Upgrade'/><title type='text'>Upgrade!</title><content type='html'>&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;Hoopla&lt;/span&gt;!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Close my Chrome, switch off laptop, get on my bike, get home, switch laptop on, open up Chrome, bang, there it is, updated Chrome with cool GUI layout, improved features and  importantly, not at all strange. Everything sits where it belongs. Yes, IT IS THAT SIMPLE!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;No update warning, no sudden change of style, no blue status bar for downloading, not even a click. This is what I am talking about! If you want something appears as elegant as this, no compromise is to be made (do the job for users, rather than pushing difficult parts for user to 'configure'). &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6620983351666012018?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6620983351666012018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6620983351666012018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6620983351666012018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6620983351666012018'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/upgrade.html' title='Upgrade!'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8433525216718307184</id><published>2009-09-12T10:09:00.001-07:00</published><updated>2009-09-12T15:11:31.676-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='communication'/><category scheme='http://www.blogger.com/atom/ns#' term='transparency'/><title type='text'>Transparency and secretiveness</title><content type='html'>I had this discussion in a professional manager gathering couple of years ago. The importance of keeping transparency in an organisation is vital to its success. On the contrary to this seemingly chorused agreement, the reality shows us there are more than enough managers who love &lt;i&gt;&lt;b&gt;secretiveness&lt;/b&gt;&lt;/i&gt;, to maintain a secure position within the organisation, in essence. However, you would find yourself being blamed as making sweeping comments - 100% transparency is dangerous. Is it really? For me, with sound justifications, a group of people is generally capable of identifying the boundary of usage of certain information. Consequently, you have your &lt;b&gt;&lt;i&gt;domain-of-transparency&lt;/i&gt;&lt;/b&gt;.&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How transparency would jeopardise some managers' position in an organisation? It is not difficult to see that transparency will certainly remove the requirement of the existence of message passengers as a start; secondly, as plan and information flowing openly throughout, there is a much shorter hence efficient bi-directional path for communications, especially those need buy-in or general support; in the meantime, the variety of information interpretation will be minimised which leads accurate decisions; transparency also helps to build trust relationships among team members; ultimately, transparency makes life simpler as you will save all your time from thinking and remembering all the different stories and persons, trying to keep them consistent with all possibilities for combination and permutation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So why do we still love the &lt;i&gt;&lt;b&gt;secretiveness&lt;/b&gt;&lt;/i&gt;?&lt;/div&gt;&lt;div&gt;Feeling special is nice. One of best way for &lt;b&gt;normal&lt;/b&gt; people to feel special is to exclusively hold certain information, especially when these information carry great deal of gravity to make things happen or fail. Unfortunately, importance of information has been now very much appreciated by this generation. To take advantage of the holding &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;privilege&lt;/span&gt;, it is not entirely &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;surprising&lt;/span&gt; to see some managers decide to utilise the selection of coterie to build up connections upon which they would consider as special bond or empowering. The safe assumption made was that the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;chosen&lt;/span&gt; ones have the similar standard of feeling special and important. Till this point, it is not too hard to see how this would start a vicious loop effect on the organisation culture. One of the key evidence you would easily identify in an empire building &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;exercise&lt;/span&gt; is nothing else, but the &lt;b&gt;&lt;i&gt;secretiveness&lt;/i&gt;&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You have got to ask yourself, "&lt;i&gt;do I love being secretive, or just I have to rely on it to survive?&lt;/i&gt;" As I have said in the beginning of this post, it is not even about being honest or not, keeping transparency is simple, easy and good for those who want to have a life :-). We do not have to bury us in the middle of all sorts versions of the same story.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8433525216718307184?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8433525216718307184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8433525216718307184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8433525216718307184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8433525216718307184'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/transparency-and-secretiveness.html' title='Transparency and secretiveness'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7866087563108900291</id><published>2009-09-10T12:11:00.000-07:00</published><updated>2009-09-10T13:33:53.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Comfortable zone'/><category scheme='http://www.blogger.com/atom/ns#' term='boiling frog'/><title type='text'>Comfortable zone</title><content type='html'>Comfortable zone as a keyword has turned up in various conversations in the last few weeks. It means spiritually or consciously, domains which we will feel confident, have the ability to put things under control. It is always a nice position to be in terms of stress level or pressure. Subconsciously, we have a tendency to get close to this zone as much as possible, where we have senses of belonging and not feel lost.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Opposing to get to comfortable zone as soon and as close as possible, some of us deliberately choose the other way, which we call &lt;i&gt;exploration&lt;/i&gt;. Why?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Being in one's comfortable zone often often means that no or very little efforts is required for one to sustain his position and assume superiority (not necessary in ranking terms). This could easily lead to a lost of sight and also motivations to develop. I also believe that this would &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;nurture&lt;/span&gt; arrogance, false and even illusive belief in himself or things and people around. Since there is limited amount of challenges, the only way to get out is a break from where is too cozy for a fighting spirit, hoping to explore new colonies and build up new comfortable zones, some would argue. Surely to do this, extraordinary courage and confidence are needed as the uncertainty within uncomfortable zones will come with greater risks. &lt;i&gt;&lt;b&gt;Continuously&lt;/b&gt;&lt;/i&gt; jumping out from one's comfortable zone requires tenacious mind and superb capability (to secure new skills).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some says that there are people skipping through all sorts of stuff without achieving anything for real. Indeed, we have to differentiate the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;intention&lt;/span&gt; of to move out from comfortable zone from the one to always look for way out or shortcut. In fact you would find there wasn't a comfortable zone established in the first place.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While I was discussing product ideas with one of my friends, we both realised that most of the time we have cast our eyes on those with which we are quite comfortable. So instead of looking for &lt;i&gt;real&lt;/i&gt; problems and potentially profitable solutions, our starting point has been mostly from where we think it's easy and quick for us to come up with something. Admittedly, early wins need demonstrability and all that. Somewhere along the line, we have already lost our sights because clinching to where we are comfortable. Those which are too risky or too strange to us will be dismissed at subconscious level straightaway. &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Whereas&lt;/span&gt; in fact, greater the risk, bigger the reward. It seems to make sense we should start thinking about this problem with slightly different angle. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;Fossil&lt;/span&gt; evidence shows &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;dinosaurs&lt;/span&gt; extinct from earth after the catastrophic changes in the atmosphere and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;temperature&lt;/span&gt; (which some indicate causing by extraneous effects). However, mammals survive as they have the ability to adapt to the unfamiliar environment and prosper in this planet eventually. Sometimes moving out from comfortable zone is not only nice to do, but absolutely necessary, living or death - we all know how the &lt;a href="http://en.wikipedia.org/wiki/Boiling_frog"&gt;frog &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;fails&lt;/span&gt; to save itself by staying warm cozy water which gets boiling hot in the end&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7866087563108900291?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7866087563108900291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7866087563108900291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7866087563108900291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7866087563108900291'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/comfortable-zone.html' title='Comfortable zone'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6981871145719794873</id><published>2009-09-05T15:10:00.000-07:00</published><updated>2009-09-06T13:06:15.419-07:00</updated><title type='text'>Be part of the solution, not part of the problem</title><content type='html'>Once in a while, I ask myself, whether I am now part of the solution, or simply being assimilated and become part of the problem.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is interesting to see how a group of people to build up a structure or defacto standards, or implicit criteria for their behaviour. I have tried to convince myself before that this differs in cultures and background. Of course this effort is in vain. What I want to say is that a group of people will form a way to work together. This very way will be changed, modified or strengthened upon new joiners or leavers to the group. The odds of survival or thrival of a group in its living environment is almost entirely decided by this way formed, in my opinion. This is the fundamental reason that I always refer back to, the quality of the people you have in a group, an organisation, is the key to everything and anything else.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Based on the fitness model, if a group is to survive, it has to be able to adapt to whatever other groups and things happening around it, make full use them and develop itself further - to be able to attract more individuals who are able to transform the existing structure to a better, healthier one. This will be a continuously, brute process. As the established acts will unlikely just fade out peacefully. New blood will be tested during the struggles. No one stands better ground than others in determining what is beneficial elements to take in. So if there is to be proof, nothing beats a good fight. It's worth noting that weaker the group is, worse it is likely going to get. This will consequently lead to the &lt;a href="http://hegallis.blogspot.com/2009/08/cul-de-sac.html"&gt;cul-de-sac&lt;/a&gt; of the group eventually.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Naturally, the shape and belief of the group will be affected by the new blood, either positively, or negatively (in contrast to the rest of the environment, as it means nothing by stating good or evil in a plain background). New blood tends to bring better quality than previous ones (as they have proved so in the entry). However, detrimental effects could also happen that all energy has been consumed in the conflicts between those beliefs comes with new blood and those in existing system. If there is no compromise can be found, the group is over. Every group have opportunities to improve (survive), which leads to the constant requirement of taking or swapping individuals. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I guess there is this inertia thing which makes us tend to swim with the stream, darker the stream, stronger the power. Maybe it is not as dramatic as it sounds. What I mean is that more often I see people joining a new environment, full of passions and energy, as well as ambitions, determined to make contributions. It does not need too long for some to realise the difficulties and real challenges to which they are facing. Unfortunately, those unsustainable merits (passion, energetic, ambitious) will fade out just as quick as they come. Often easy routes will be taken, either join or leave the party. As far as the group is concerned, it is a double failure - they did not become a part of solution, they are now part of the problem.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Examples:&lt;/div&gt;&lt;div&gt;1. Should I write code as fast as possible to prove what I am capable of first or get necessary good practice in place for the sake of long term quality this team lacks of?&lt;/div&gt;&lt;div&gt;2. Should I introduce new ways to improve productivity or to improve my popularity and make as many allies as possible?&lt;/div&gt;&lt;div&gt;3. Should I focus in getting things done or making people happy?&lt;/div&gt;&lt;div&gt;4. Am I here to make a change or to support a decision?&lt;/div&gt;&lt;div&gt;5. Should I just join in the party to find someone else to blame or should I focus on the area which simply isn't good enough?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are no easy answers to any of above questions, depending on circumstances. Thus I constantly ask myself where I am in the group, which role I am playing and whether I have given up and decide to take on the easy route to be part of the problem. Or am I looking at the wrong problem? As casual as it might sound, this is a tough exercise.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is also my reason that the most important quality I look for in people are tenacious and honest.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6981871145719794873?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6981871145719794873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6981871145719794873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6981871145719794873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6981871145719794873'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/09/be-part-of-solution-not-part-of-problem.html' title='Be part of the solution, not part of the problem'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4340775639522419729</id><published>2009-08-29T17:19:00.000-07:00</published><updated>2009-08-30T13:54:55.910-07:00</updated><title type='text'>Get those words right</title><content type='html'>We all lie every single day. As harsh as it might sound but most of us know this is true, damn true. Personally, I have no problems in believing a lie itself does not necessary do evil or good. It is only a choice of communication, a matter of intention, to get message across.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To understand the meaning beyond the line would be extremely helpful for us to achieve better communications. As let's admit it, we can not really survive if everybody just tells the truth all the times, well at least politician, lawyers and state agencies can't :-). Sometimes we say them as more of a professionally trained reaction rather than results of complicated thinking process.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From engineers, these are some typical lines I have heard, and my interpretations to them after many years of learning :p&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;We have a quick work around to this problem, which will not affect the rest of system at all.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Maybe this time I can get away without sufficent testing, especially regression test. With a bit of luck no one will find out the caveat. The worst could happen is for me to explain to customer how it was a new feature rather than a 'side effect'.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I have thoroughly tested it on my machine.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Well, I forgot to do a proper clean test. Let's start over again.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Source control messed up my codeline.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I forgot/felt too lazy to follow the update-&gt;test-&gt;checkin-&gt;test routine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I will write test code later.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I will try not to worry about test code until someone important puts a gun in my head.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;The code is a mess, we will be much better off start over.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I can't find a better way to refract the code, or I don't understand the use cases of this product, or it isn't my fault there are always so many bugs, it is the code's fault...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Product manager never tells me what he wants, and always changes his mind.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I can't work out the intuitive approach and cool functionality, maybe I can shift the blame and responsibility to someone else, an easy target.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;It will take me 5 minutes to fix this bug.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I really don't mean 5 minutes! I only say so to justify why we should not do this. So do not put this as task estimate in your project plan.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For managers, here we go,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;We are almost there.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We have not achieved our target. This is not good enough&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Next release will be on time.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Whenever I say it, don't take my words on it, pay attention to what I am about to say next, "If..."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;All tests passed for this release.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We have cut off some failed tests. With limited time, we can only assume some test codes have not been updated or have bugs in.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Let's work together on this.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I will let you know my decision out of courtesy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;It's not my call.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I am not taking responsibility for the decision.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;We have no resource to do this.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I have different understanding of the task priority.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;You are the most important customer.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We have more than one customer to support.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4340775639522419729?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4340775639522419729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4340775639522419729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4340775639522419729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4340775639522419729'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/get-those-words-right.html' title='Get those words right'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2546537181776907807</id><published>2009-08-26T03:08:00.000-07:00</published><updated>2009-09-06T14:22:18.699-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Real time signal'/><category scheme='http://www.blogger.com/atom/ns#' term='Publish and Subscribe'/><category scheme='http://www.blogger.com/atom/ns#' term='Xenomai'/><category scheme='http://www.blogger.com/atom/ns#' term='event-driven'/><title type='text'>Real time signal driven between Kernel and User space</title><content type='html'>&lt;div&gt;I have written a &lt;a href="http://hegallis.blogspot.com/2009/06/proc-vs-dev.html"&gt;blog &lt;/a&gt;before about the standard usage of /proc and /dev interface as IPC between kernel space and user space applications. Of course you can do clever things such as asynchronous I/O (AIO) and non-blocking system calls, but they do not really solve the problem, if what we need is a real event driven rather than thread polling.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For standard non-real time Linux, popular ways include socket (relying on which, netlink is constructed), signalling, mapping memory. (These are all I know, please tell me if there are other tricks I don't!) There are other tricks like upcall (using &lt;i&gt;call_usermodehelper &lt;/i&gt;in the kernel module to invoke user space program) but they are rather hacks and not well supported during porting to different hardware platforms. Of course via you can use named pipes or fifo (&lt;i&gt;mknod&lt;/i&gt; and &lt;i&gt;mkfifo&lt;/i&gt;) which are essentially system level device node based (similar to /dev interface) communications. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(To be extreme, here is what I have always believed - the only reason why we are having the difference of user space as opposed to kernel space is you can do whatever you want in user space without screwing up the whole os, which is protected and can allow others like you to screw up the system independently. After 2.6, the whole Linux kernel can be considered as a single process, with multiple concurrent, schedulable threads.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Basically, signals can be sent from kernel and some can be queued if you choose to. The Linux signal queue is interrupt-safe. I won't go through the whole list of signals available and APIs to use as you can find them C&amp;amp;P all over the net. What I would like to note here is POSIX.4 Real Time Signals or known as RT signals. They are a group of signals (between SIGMIN and SIGMAX) supported by the Linux kernel which overcome some of the limitations of traditional UNIX signals. First of all, RT signals can be queued to by the kernel, instead of setting bits in a signal mask as for the traditional UNIX signals. This allows multiple signals of the same type to be delivered to a process. In addition, each signal carries a &lt;i&gt;siginfo_t&lt;/i&gt; payload which provides the process with the context in which the signal was raised. To say process is a little confusing, in fact, you can signal to specific thread or a group. The catch here is you need to specify carefully which type of signal it is when you generate them in the kernel (unfortunately they need to be manually mapped to the &lt;i&gt;send_sigxxx &lt;/i&gt;APIs you will be using to trigger the signal, i.e. if you want to use &lt;i&gt;sigqueue&lt;/i&gt;, the &lt;i&gt;si_code&lt;/i&gt; has to be SI_QUEUE. Unluckily, some Linux porting doesn't support &lt;i&gt;sigqueue&lt;/i&gt;, e.g. Blackfin and PPC. There are workarounds. You can still use send_signal_info to generate signal with siginfo_t payload to queue the RT signal, but be aware you can't use &lt;i&gt;_sifields. _rt. si_sigval. sival_ptr&lt;/i&gt; to pass a 32 bits pointer of a struct and hope to use it the same way as the value you can pass with &lt;i&gt;sigqueue&lt;/i&gt;, you can only pass a 32 bits value in the union. I learnt it the hard way...)&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One problem with RT signals is that the signal queue is finite, and hence, once the signal queue overflows, a server using RT signals has to have some fall backs. Good thing about RT signals is that they have a very low overhead. They also provide a very much software interrupt-driven approach, which to my mind is quite intuitive as you think about it. All the interesting events originally will come from hardware interface, pass to device drivers sitting kernel. What is more efficient than building your higher logic on these events?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, I have wrapped up these signal handlers in an I/O lib, where it sits in user space, elegantly creating and posting events in user spaces, to those who are interested - a post-office like publish-subscribe mechanism. This way, you wouldn't have to worry about errant signals. In the kernel, I have added a linked list to maintain all the threads (&lt;i&gt;task_struct&lt;/i&gt;) which have initiated the requirement to be signalled. They will be signalled in a simple round-robin way. Code is dead simple:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;// in the kernel driver&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;list_for_each(ptr, &amp;amp;user_tasks.list)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;entry = list_entry(ptr, struct user_task_struct, list);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;memset(&amp;amp;info, 0, sizeof(struct siginfo));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;info.si_int = pdev-&gt;data;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;info.si_signo = SIGGPIBUTTON;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;info.si_errno = 0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;info.si_code = SI_QUEUE;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;info.si_uid = pdev-&gt;minor_node_id; // stole this field for additional info&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;err = send_sig_info(SIGGPIBUTTON, &amp;amp;info, entry-&gt;thread);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;// in the I/O lib&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;memset(&amp;amp;m_actBt, 0, sizeof(m_actBt));&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;m_actBt.sa_sigaction = &amp;amp;CGPI::ButtonSignalHandler;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;m_actBt.sa_flags = SA_SIGINFO;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;sigemptyset(&amp;amp;m_actBt.sa_mask);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;err = sigaction(SIGGPIBUTTON, &amp;amp;m_actBt, NULL);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;void ButtonSignalHandler(int signum, siginfo_t *info, void *ptr)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;int data;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;printf("Received signal %d\n", signum);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;if(signum != SIGGPIBUTTON) return;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;data = (int)(info-&gt;si_int);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;CEvent * evt = new CEvent(data);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;evt-&gt;id = info-&gt;si_uid;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;evt-&gt;Post(m_evtMgr);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;In Xenomai (a real time patch for Linux), you have the option to enable kernel rt_task communicate with user space ones using real time message queue (&lt;i&gt;rt_queue_create&lt;/i&gt;). I have also tried to get the real time signal working with Xenomai 2.4.91. Xenomai patch only support the RT signals via POSIX skin (officially). However, &lt;i&gt;pthread_sigqueue_np&lt;/i&gt; only takes &lt;i&gt;pse51_thread&lt;/i&gt; instead of standard POSIX thread, which means the signal can only be sent to Xenomai POSIX skin thread, created by overloaded &lt;i&gt;pthread_create&lt;/i&gt;. This is a little messy I know. In non-real time Linux, you have GNU thread and POSIX thread implementations to choose from, or both, depending how you choose to link your libraries. Xenomai has its own implementation of kernel mode finer thread (&lt;i&gt;xnthread_t&lt;/i&gt; , if you like to call it). These Xeno threads existing only in Xeno real time domain. When you choose to use native skins, you will be dealing with &lt;i&gt;rt_task_xxx&lt;/i&gt; interfaces. However, all the signal handling will just happen in Linux domain. Within POSIX skin, you can queue and set up signal handler for Xeonmai POSIX skin thread. Effectively, instead of using &lt;i&gt;rt_task_xxx&lt;/i&gt;, you can use familiar &lt;i&gt;pthread_create &lt;/i&gt;APIs. Just bear in mind you need to link to Xenomai libraries.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2546537181776907807?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2546537181776907807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2546537181776907807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2546537181776907807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2546537181776907807'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/real-time-signal-driven-between-kernel.html' title='Real time signal driven between Kernel and User space'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-948296820624985147</id><published>2009-08-24T12:09:00.000-07:00</published><updated>2009-08-26T03:03:50.518-07:00</updated><title type='text'>Fiddling, hacking and engineering</title><content type='html'>We have people who do not really have experience in designing a system, no idea what to start from a blank sheet of paper, clueless when it comes down to pros and cons for different weapons of choice for the problems - I call them &lt;i&gt;fiddlers&lt;/i&gt;. Fiddling things would sometimes turn out to produce some results, which will unfortunately encourage further messing... If this happens in your codebase, good luck with the quality.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The second type is &lt;i&gt;hackers&lt;/i&gt;. (When you call a programmer a hacker, it is either an insult or genuine compliment, depending on the context. Here I will take both of these interpretations on.)&lt;i&gt; &lt;/i&gt;&lt;i&gt;Hackers&lt;/i&gt; are normally capable of breaking assumptions, finding out the hidden rules and enjoying planting tricks in the code. Some have a strange tendency to interwoven and complicated design on the face but extremely elegant and efficient inherently. To make others understand or maintain will never be on hackers' priority list. Good hackers always try to understand the underneath logic first before any actions are taken. On the other hand, in an insulting way, it means people tend to get on with the change, or Mr. fix-one-break-many. Most hackers are very keen to keep pace with latest and coolest gadgets, especially where they can make their mark on. Making money is kinda irrelevant at this point.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Engineers&lt;/i&gt;, a concept which many used to be proud of, but now sounds a little tedious and boring, or abused... In my mind, a good engineer is the key asset to a team, and an organisation. Being a good engineer is not only a challenge at skill level. It is much more than someone who knows what tools to use, what technique to adopt, how to fix bugs and how to use APIs. Good engineers understand the difference between playing with technology and building a profitable product. They also appreciate real requirements as well as feedback. They are by nature good marketers, contradicting to many people think - to advocate their efforts in a bigger scale. Those do what's been told and only translate human language into code are not exactly in this category I am talking about. Love to the code is much more profound I would say.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Get rid of fiddlers, hire and direct hackers, rely on your engineers.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-948296820624985147?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/948296820624985147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=948296820624985147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/948296820624985147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/948296820624985147'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/fiddling-hacking-and-engineering.html' title='Fiddling, hacking and engineering'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2572229924835704522</id><published>2009-08-17T15:16:00.000-07:00</published><updated>2009-08-17T15:28:54.927-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='life'/><category scheme='http://www.blogger.com/atom/ns#' term='Work'/><title type='text'>Work means nothing if you have a shitty life</title><content type='html'>Well, it's true. For me, work is part of my life, a very important part.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Three things I'd usually like to claim, true or not.&lt;/div&gt;&lt;div&gt;1. I don't work for money, but pay has to be well enough :)&lt;/div&gt;&lt;div&gt;2. I don't do the clock, so I won't do a job on the clock either.&lt;/div&gt;&lt;div&gt;3. Work is an important part of my life, so don't call me &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;workaholic&lt;/span&gt;, it makes me happy. It's the same kinda feeling as expecting a child, decorating a house, planning a nice trip, playing chess with friends. In another word, I love what I do and I won't do what I hate.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It seems quite obvious to me that if you get to spend 8 hours of your day time to enjoy that part of your life, what's wrong with that? On the contrary, if job to you is only what you want to trade for the rest of 4 hours peace and fun after working hours, I can't help thinking that is very sad.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In a certain stage of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;everyone's&lt;/span&gt; career, well maybe not everyone, in my career, I thought a lot about how important it is being somebody in my life, making marks in paths I have stepped through. It is only in the last two years I realised that you don't mark on something in the future, you do it on this very moment. There is no such thing as out of life, no such thing as what I would be able to do instead in the future if I just do this now. Every step made is part of it, every decision made is the brick which will eventually complete the building. All I hope is one day when I look back and can peacefully say that I lived my life.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2572229924835704522?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2572229924835704522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2572229924835704522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2572229924835704522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2572229924835704522'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/work-means-nothing-if-you-have-shitty.html' title='Work means nothing if you have a shitty life'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-9018680962927087583</id><published>2009-08-17T01:14:00.001-07:00</published><updated>2009-08-17T15:13:21.709-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Do not be evil'/><title type='text'>Do not be evil</title><content type='html'>Since Google and Paul Buchheit has not trade marked this one, I borrowed it for this blog.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is a little ironic but true that it always easier to be evil, be bad, compared with good deeds. It's also normal that a company fights its way through numerous obstacles to develop really good product before first debut. Ambition at that time is about making great product, making big money, and be extremely successful. To achieve so, we soon realise that the only way is to find a problem, then provide a solution, which people love, talk about and are willing to pay for. We go out of our way to improve the quality, to make users happy and fall in love with us. Those who made it understand the importance of marrying passion with down-to-earth approach. Since at hat moment, they have nothing, but a chance to make a good product. In fact, that would be the only thing they are evaluated on. I remember a line from a podcast somewhere about the criteria to use for making decision - "if you are not sure how and what to choose from thousands of things to do, do those which will make your customers happy". This is extremely important for budding organisations which often operate on the edge of living or dying. Some more tenacious species of us will make it, and eventually able to build up their own tribes, raise their influencing weights, attract investment, be successful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, what happens next is what I would like to talk about here. It is very difficult to make our way from scratch through the first success - first successful product launch, first major investment; it is even more so when we have chance to get to the next ladder. When we are successful, many start to bully or ignore users. Not we like that, simply because that is the easier way out, or at least it seems so in the beginning. We start to get lazy and evil, start to release software without testing and rely on luck to not hit the rock, start to be arrogant to users' feedback as we know better (otherwise how could we succeed?) We start to focus on getting more and more investment to build up a giant empire because that seems to give the success new and real meaning. We start to stare at stock price rather than test reports. We have gone to the dark side, unfortunately, which majority of big organisations do, seemly unavoidably.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From this point on, we start to offer users less and less choices and provide them thousands of configuration options which gives us the &lt;i&gt;professionally pretentious&lt;/i&gt; appearance. What we do not realise is that we start to lose people's love and trust, we start to see the baseline of the game changing and we do not have the support from those once being loyal to the products and marketing for us by words of mouth. We become extremely thick and reluctant to accept criticisms. The only possible outcome is that products sliding away from making people happy to annoying and belittling users, where no good is going to come out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Google is able to recognise why so many once successful organisations failed to continue their glory. Being able to maintain this type of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;startup&lt;/span&gt; spirit could not be more important. It is so easy and convenient to just do evil, admittedly we all have tendencies of doing that. No matter how accountants and bankers mess up with the economy, at the end of day, it is the maker who decide the ball spinning, it is the product which actually provide the drive. So, be good.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-9018680962927087583?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/9018680962927087583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=9018680962927087583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/9018680962927087583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/9018680962927087583'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/do-not-be-evil.html' title='Do not be evil'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4819962841820670000</id><published>2009-08-15T03:16:00.000-07:00</published><updated>2009-08-16T10:53:31.774-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Relentlessly resourceful'/><title type='text'>Relentlessly resourceful</title><content type='html'>It starts to feel like language advantage when I was reading one of &lt;a href="http://paulgraham.com/relres.html"&gt;Paul's latest essay&lt;/a&gt;. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;Relentlessly&lt;/span&gt;&lt;/span&gt; resourceful, a precise description of quality which differentiate certain individuals from the rest. &lt;div&gt;&lt;br /&gt;&lt;div&gt;This applies to both makers and managers. Being &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;relentless&lt;/span&gt;&lt;/span&gt; is not much a stand out quality itself as you might spend days in doing stuff which does not generate any valuable &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;deliverable&lt;/span&gt;. Many would refer this as 'political gesture', especially useful when your behavior has direct impact on external stake holders' expectation. Being &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;relentless&lt;/span&gt;&lt;/span&gt; also sometimes go with a subtle truth - we do not really know what we are doing, and do not really care, just do stuff and look busy may just be enough to secure the tiny roles we have. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Having said all these, being &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;relentless&lt;/span&gt;&lt;/span&gt; would be an outstanding quality if the person is resourceful in the same time. Whether it is an engineering problem which is new to everyone or a balance point in resource allocation &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;difficult&lt;/span&gt; to negotiate. Being resourceful does not come with total reliance on gut feeling, instinct, although they are very important when people actually know what they are talking about. The instinct or sudden flash of old memory somewhere around the corner might just be enough to give away the clue to the solution. Being resourceful normally also does not imply the individual has to be old enough to have tons of life time stories to tell people with. Sometimes it is about sensitivity. It always amazes me how much we can appreciate with every bits going on around us, if we really open up our sensors in the system. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;Relentlessly&lt;/span&gt;&lt;/span&gt; resourceful individual will deliver, and will always be the direction where people fall on to when there is an urgent situation. If they have a calm personality or willing to spend conscious efforts to remain cool under panic situation, they will be the natural leader you need to look out for in the organisation. In fact, most time, what a bunch of skillful people need is not the answer to the question, but a path or a plan of attack. In reality, there is every opportunity we will become headless chicken and pass the hard nut to someone &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;else's&lt;/span&gt;&lt;/span&gt; should, if we can find one.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4819962841820670000?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4819962841820670000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4819962841820670000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4819962841820670000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4819962841820670000'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/rentlessly-resourceful.html' title='Relentlessly resourceful'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-3461579077839803586</id><published>2009-08-13T03:08:00.000-07:00</published><updated>2009-08-13T04:44:25.044-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xkcd'/><title type='text'>Wonderful comic</title><content type='html'>&lt;div&gt;Jon said, "I found &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;xkcd&lt;/span&gt; philosophy dangerously appealing", when I shared one comic with him today. The reason why I love about good comic is that they not only just make me laugh, but also tell a deep down truth or something taunting you inside for God knows how long. Anyway, this blog is about &lt;a href="http://xkcd.com/137/"&gt;137&lt;/a&gt;, from a guy also worked on robots previously.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Sometimes we say that life is too short that we have to follow our hearts and do what we like, enjoy what we do. It talks about dreams, one thing is too fuzzy for us nowadays, also superficially remote. In Connor's second thesis, he talked about "there is no fault but what we make for ourselves". Randall challenged it more in his comic, "does the routine destroy our creativity or do we lose creativity and fall into the routine?"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How many times you would want to shout out loud, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;FTS&lt;/span&gt;!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-3461579077839803586?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/3461579077839803586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=3461579077839803586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3461579077839803586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3461579077839803586'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/wonderful-comic.html' title='Wonderful comic'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4276352788594920546</id><published>2009-08-07T11:22:00.000-07:00</published><updated>2009-08-11T05:52:08.995-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uClinux'/><category scheme='http://www.blogger.com/atom/ns#' term='Xenomai'/><category scheme='http://www.blogger.com/atom/ns#' term='Blackfin'/><category scheme='http://www.blogger.com/atom/ns#' term='Upgrade'/><title type='text'>The ultimate answer to everything in software - upgrade?!</title><content type='html'>In the last few days, I have been working on a very very nasty problem. To put this into context, I planned to apply one of the existing real time patches to Linux to give us hard real time scheduling performance as opposed to soft real time, which I have briefly explained the difference in &lt;a href="http://hegallis.blogspot.com/2009/05/linux-real-time-kernel-scheduling.html"&gt;my previous blog&lt;/a&gt;. I adopted &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Xenomai&lt;/span&gt; 2 to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;uClinux&lt;/span&gt; distribution for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Blackfin&lt;/span&gt; BF5xx processor using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Adeos&lt;/span&gt; patch supplied with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;uClinux&lt;/span&gt;2008R1.5 , which is running kernel 2.6.22. Anyway, the problem was, one of our &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;existing&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;GPIO&lt;/span&gt; (on I2C bus) driver stops working.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, after a bit of digging in the code, it appears that the kernel has continuously been trapped within one of the interrupt handler registered by this driver. I should say in this case, the interrupt is in Linux domain. That means, since there is no handling done in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Xenomai&lt;/span&gt; primary domain and this interrupt is passed by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;ipipe&lt;/span&gt; all the way to Linux non-real time kernel to handle. The problem is, it worked fine when we did not have real time patch in between. In this instance, google did not help either - no obvious answer. I decided to ask for help in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Blackfin&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;uClinux&lt;/span&gt; forum and also &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Xenomai&lt;/span&gt; help as people are quite helpful there usually, if you are asking something which has been asked before or known issues. Since this seems to be an outlier, I did not get much out of it, until the author of the patch responded. In short, his answer was that the version I used is a legacy version (2.4.0), unless I upgrade to the latest and greatest &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;xenomai&lt;/span&gt; version and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;uClinux&lt;/span&gt; distribution which does not use threaded &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;IRQ&lt;/span&gt; anymore, I am pretty much on my own. Right, so first thought came to my mind is that I am busted. It is not a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;trivial&lt;/span&gt; task to port a heavily modified kernel distribution to another version, let alone Linux does not really maintain backward compatibility that well. Anyway, I was stuck between rock and hard place.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I started to dig into the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;ipipe&lt;/span&gt; to see what is the difference. Unfortunately, the only thing I can see is a positive sign, where the interrupt has been much reliable triggered with smaller amount of latency. Bear this in mind, I have to bet my money on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;Blackfin&lt;/span&gt; implementation at this point. So I went back to check the hardware reference for the type of processor I am using and found out the following:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;“When using either rising or falling edge-triggered interrupts, the interrupt condition must be cleared each time a corresponding interrupt is serviced by writing 0x01 to the appropriate bit in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;GPIO&lt;/span&gt; clear register.”&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Right now I have all the pieces of the puzzle. The problem was that the original driver code did not explicitly clear out the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;GPI&lt;/span&gt; pin we configured for interrupt edge triggering, relying on kernel peripheral to clear out resource its allocated after interrupt being served. With &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;Xenomai&lt;/span&gt; patched, the interrupt comes quicker to the point before work to be finished (previous interrupt status to be cleared out), the next interrupt kicks in (passed by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;ipipe&lt;/span&gt;). Hence the kernel stuck in this particular &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;ISR&lt;/span&gt;. Fix itself is easy enough, one line change to clear the port interrupt register.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What makes me think, however, is that how we normally deal with unknown issues in our system when it comes to software release. Of course there are times that to find out the root cause of A problem would be expensive, which could also become a major distraction from current development undertaking. Unfortunately, from my own experience, many organisations choose to take the altitude to offer system upgrade as a silver bullet when customer has legacy system upon which problems were reported and then pray for those problems to go away on the newer version of release. "Obviously, there are so much we do not know about this world, this problem might just be one of these we could not explain or completely out of our leads, or not worth spending our efforts on. I can to certain degree try to justify if it was for the last reason as we all know sometimes we need to make a balanced decision about where precious resource (as always) should be spent on. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you can clearly see, the suggestion I was offered as threaded &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;IRQ&lt;/span&gt; is a complete wrong shot. Unfortunately, we do blind shot a lot. Question is, have you done this before?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4276352788594920546?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4276352788594920546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4276352788594920546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4276352788594920546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4276352788594920546'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/ultimate-answer-to-everything-in.html' title='The ultimate answer to everything in software - upgrade?!'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-9218510991164287887</id><published>2009-08-03T12:39:00.000-07:00</published><updated>2009-08-03T13:29:20.974-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='death spiral'/><title type='text'>Cul-de-sac</title><content type='html'>Tough economic situation leads people, organisations, governments to react. In my opinion, the danger is not only in the lack of expenditure or confidence in spending which causes the lower sales turnover with less gross profit, as far as a business is concerned, the much more recessive while fatal impact is that this is the time when death spiral will normally be triggered.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Death spiral is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;originally&lt;/span&gt; a finance term where convertible financing used to fund primarily small companies is used against it in the marketplace to cause the company’s stock to fall dramatically and can lead to the company’s ultimate downfall. In simpler terms, it is a vicious loop which eventually leads to the termination of a business due to initial actions taken to rectify negative visible results. What is contradicting here is that often these initial actions seem to be the correct and logic (re-)actions (if not the only choice) to take to improve the immediate circumstances. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Scenario A. The director of company Random decides to cut down cost in production, R&amp;amp;D, customer support, marketing to balance the poor order book and lower income. The initiative is to sustain the business with the means of running it at a lower level cost to accommodate its profit level. It seems to be the right and intuitive thing to do. However, if we take it to another level it is not too difficult to see the problem. To shrink the size of engineering, production, customer support, the direct effect is the output of product delivery, which will in turn immediately affect the future sales and profits, especially when existing products already prove to fail to attract orders under difficult economic situation. Cut down marketing budget will also lower the baseline of potential sales. Hence the sales will come down again to another level. The only hope here is to hit the balance point where the income meets outgoing, which is only possible when there were a significant portion of budget built in in the first place for expansion. Otherwise, such balance is highly unlikely to be achieved. On the other hand, reducing operational cost is absolutely necessary to any organisations to survive under difficult market situations. To achieve so, what we should really focus instead of budget or redundancy strategy, is the '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;mis&lt;/span&gt;-spent' cost. Cost is not equivalent to budget. In another word, this type of cost should not exist if those what involved are running in a healthy &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;condition, such as waste, overhead, duplicate efforts etc.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Scenario B. To speed up software project development, engineers are told to defer the test code to later stage until project momentum is caught up and tight deadline is met. This looks like that engineers are now spend all their working hours writing production code which builds up the confidence in stake holders. However, this assuring false confidence can be easily broken or to be used as a false baseline of team's capability to deliver in terms of time-quality-cost. This will come back to drive the development team in another circle where shortcuts is almost a necessity to hit any promises. Solution here is simple - write your test from the start, or formally known as test driven development.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In both scenarios, the intuitive choices of reaction are doomed to lead organisations to its end, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;cul&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;de&lt;/span&gt;-sac, regardless the good intentions in the beginning. Conscious effort in such decision making process is required, rather than following 'gut feeling'. Sometimes, choose the opposite direction to the rest of crowd could be an easier way.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-9218510991164287887?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/9218510991164287887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=9218510991164287887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/9218510991164287887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/9218510991164287887'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/cul-de-sac.html' title='Cul-de-sac'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-1443420521741189784</id><published>2009-08-02T03:35:00.000-07:00</published><updated>2009-08-02T11:59:54.300-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='permission of communicaiton'/><category scheme='http://www.blogger.com/atom/ns#' term='marketing'/><title type='text'>Permission of communication</title><content type='html'>An excellent presentation from &lt;a href="http://blog.businessofsoftware.org/2009/07/seth-godins-talk-from-business-of-software-2008.html"&gt;Seth&lt;/a&gt; on why we could not afford to leave marketing to marketing department alone. To build marketing into the product is the essence of how to succeed in a cluttered commodity environment. The end customers can and will not only make their own decision on the choice of products to spend their money on, but also represent a more and more important means of marketing, or influence. This concept itself is not new. We have old saying such as have one's ear.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is interesting to me is that Seth has revealed a fact which is difficult to argue and impossible to ignore. A successful product and organisation these days starts from being remarkable.  Where they start smart marketing strategy - to connect people, or to give people something to talk about. It is a remarkable experience for myself to witness big boys like Apple, Google, Amazon win over their users again and again. Where did they start from? Being remarkable, telling a story, creating tribes, establishing customer loyalty, helping to build up lifestyle, utilising word of mouth. Have you ever seen a 30 seconds, million dollars advertisement on TV during your Prison break session to ask you to search on Google? No you won't. Because that is not the choice of yours. An interruptive marketing does not gain the permission to get to your ear and eye, instead they force you to listen, to see. That's why many companies spend astronomical amount of money in developing good ads on traditional media channels which can access their end customers, hopefully in a not too intrusive way. 20 years back, we do not really have many choices, which nowadays we have much to enjoy and much to be distracted by. All these seems to be that they started from the wrong end - to try to pay off the debt created due to the selection of intrusive marketing channel, a significant extra amount of efforts is needed to counter balance and hopefully win some customers over with. The other problem is, the intrusive marketing approach is really shoot-in-the-dark. Even with carefully statistic sampling and measurement analysis, there is little to be learnt in terms of your ROI on expensive marketing budget, not to mention suggestions for next round marketing investment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, 180 degree U turn. What happen if we make a different kind of start - building in story points for people to talk about, to be proud of, to be 'sneezing' in Seth's term?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you earn trust from someone, you have his/her/its permission to feed information through this channel to and from the other end. This type of establishment is now often seen in the format of following someone on Twitter, subscribing to someone's rss feed or podcast, reading blogs etc. This level of trust has ensured the information receiver the quality, relevance and standard. More importantly, it opens up a mutual trustworthy channel to discuss, debate and tell stories. It does not have the problem of turning negativity around from the start. There are many companies in Seth's example list who have managed to establish this connection with their customer after first purchase or usage. They have built in something remarkable, different in their products or services, empowering their customer to take something away other than the pure functionalities, allowing a way to assist their customer either express interest or identities through the usage of the product and influence people around them via trusted channels.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have seen some companies picking up the first part of hint but failed to recognise the starting point. Marketing departments create organisational facebook account, company twitter, linkedin group hope to attract and build up effective marketing channels. However, as Seth said with which I could not agree more, you have to start from being remarkable first - building something which is unique and significant, something can win your first date by. Then you kick off the circle, rather than the other way round.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-1443420521741189784?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/1443420521741189784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=1443420521741189784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1443420521741189784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1443420521741189784'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/08/permission-of-communication.html' title='Permission of communication'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-5901239909853371876</id><published>2009-07-30T16:44:00.000-07:00</published><updated>2009-07-30T17:43:44.394-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='distributed switch'/><category scheme='http://www.blogger.com/atom/ns#' term='MAC'/><category scheme='http://www.blogger.com/atom/ns#' term='Phy'/><category scheme='http://www.blogger.com/atom/ns#' term='MDIO'/><category scheme='http://www.blogger.com/atom/ns#' term='MII'/><title type='text'>Distributed switch architecture</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_szB77yN6fBM/SnI9xfYywhI/AAAAAAAAANA/eIv71QRJ8p4/s1600-h/untitled.JPG"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_szB77yN6fBM/SnIyStmb8gI/AAAAAAAAAM4/n6L4Dk3VE98/s1600-h/6697362-0-large.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 305px;" src="http://2.bp.blogspot.com/_szB77yN6fBM/SnIyStmb8gI/AAAAAAAAAM4/n6L4Dk3VE98/s320/6697362-0-large.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5364405403211526658" /&gt;&lt;/a&gt;&lt;br /&gt;Distributed switch architecture known as DSA has been out in the market since Marvell's first debut in 2004. DSA was targeted at providing a solution for distributed cascade or stacking broadband switching/routing topologies. This brings a lot flexibility in distributed network system with low cost while high switching performance. On the left is a simple picture which explains one of the in-memory switch structure.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am not going to talk too much on the technology here but introduce how to bring this type of chip up from an external processor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Normally, what you would have is an external processor connecting to the DSA chip via MII (Media Independent Interface) bus. If you have worked in the device driver level for ethernet control card or phy device you should be quite familar with this bus. Within this bus, there is a couple of lines dedicated as MDIO (Management Data Input/Output) bus, where most of the Phy device control data will be flowing over. &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;MDIO is a bus structure defined for the Ethernet protocol. It is used to connect MAC devices with PHY devices, providing a standardized access method to internal registers of PHY devices.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;MII is a standard interface used to connect Ethernet MAC-block to a PHY, which means any types of PHY devices can/should be supported and accessed via a defined standard register set. Equivalents of MII for other speeds are AUI (for 10 megabit Ethernet), GMII (for gigabit Ethernet), and XAUI (for 10 gigabit Ethernet).&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;   &lt;/span&gt;REG 0 - Basic Mode Configuration&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;   &lt;/span&gt;REG 1 - Status Word (You can use this to detect whether an Ethernet NIC is connected to a network)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;REG 2,3 - PHY Identification&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;REG 4 - Ability Advertisement&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;REG 5 - Link Partner Ability&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;REG 6 - Auto Negotiation Expansion&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Phy is the actually device which connects to the physical connection (i.e. cable or wireless channel). It provides a set of registers which forms an interface to allow (phy device) drivers to manipulate. While these devices are distinct from the network devices, and conform to a standard layout for the registers, it has been common practice to integrate the Phy driver together with the network driver. BUT I DO NOT RECOMMEND THIS!&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-style-span" style="white-space: normal; "&gt;The DSP chips are usually embedded in access points and routers, and a typical setup with a DSA switch looks something like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_szB77yN6fBM/SnI9xfYywhI/AAAAAAAAANA/eIv71QRJ8p4/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5364418026600055314" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 110px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;From the CPU point of view, this external (DSA) device needs to be driven to take switch configuration and commands. So immediately, you might get the first clue that we need some sort of device driver to initialise and drive the DSA chip. Using Linux as an example. Supposing you have Linux kernel running on the left side CPU, you could develop your own device driver to talk to the MII bus (actually the party you are really interested in talking to is the device on the other end via MDIO bus), which is well defined in linux kernel as mdio_bus module.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The problem is, the switch is a child node on the MDIO bus but it is NOT a standard Phy device although it normally have a similar set of Phy registers for you to poke around. Well, you have got to know what you are poking here!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Two ways of drive the switch, in short. One is the quick but dirty way. Where you can still use the support from Phy device and define your own private module data structure which maps to the specific layout of register set on the non-Phy switch device. Using lower level MDIO bus read and write to control the registers directly to issue commands. (The switch will normally have a defined list of register bit value to the switching or configuration commands.) This approach will be suitable if you are working on an early version of 2.6 kernel which do not have DSA kernel driver extension.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are working on the latest version of Linux kernel then you are lucky enough to use the DSA framework where a nice structure of dsa_switch is introduced. By using this, you can literaturely treat DSA device as an OS external device driven by standard kernel device driver. DSA module has taken care of all the lower level bus access for you. All is left is for you to find out what value to be written to what address from the datasheet (normally you have to obtain them from the chip manufacturers under NDA though). You can use your driver to iterate through all the ports on the switch and presents each port (on the switch) as a separate&lt;/div&gt;&lt;div&gt;network interface to Linux, polls the switch to maintain software link state of those ports, forwards MII management interface accesses to those network interfaces (e.g. as done by ethtool) to the switch, and exposes the switch's hardware statistics counters via the appropriate Linux kernel interfaces (i.e. ioctl is what I did).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just be aware that both approach do not follow through the generic Phy state machine, so you will have to define it yourself of the handlers (either in phy_device and phy_driver for the first approach or the dsa_switch_driver such as poll_link handler).&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-5901239909853371876?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/5901239909853371876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=5901239909853371876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5901239909853371876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5901239909853371876'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/07/distributed-switch-architecture.html' title='Distributed switch architecture'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_szB77yN6fBM/SnIyStmb8gI/AAAAAAAAAM4/n6L4Dk3VE98/s72-c/6697362-0-large.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-3442396787746214151</id><published>2009-07-26T04:41:00.000-07:00</published><updated>2009-07-26T09:00:59.383-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='meeting boy'/><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><title type='text'>Mastering time or being mastered</title><content type='html'>&lt;a href="http://www.paulgraham.com/makersschedule.html"&gt;Paul Graham&lt;/a&gt; just 'stole' my story :-), presented in a much better way though. &lt;div&gt;I was thinking of the same topic while reading Paul's latest Maker's Schedule. It is interesting to see how people decide to go about their schedule and fill in their empty hollow calendar, esp. managers. For some, it is quite obvious that a belief they have been holding on for life time that meet'it'up and we all sorted. In scenarios we have multiple topics to talk about, easy enough, just make it multiple meetings! Truth of the matter is, not long after, you will find everyone is satisfied with the fact that they have done their jobs, now all is left is for time to do its bit. Whatever happens in the end, people are quite comfortable to shrug their shoulders, "hey, we have done our best - we had a meeting - it is just bad luck, that is all."&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is not exaggerating, not a tiny bit. I was lucky enough to work with one guy who really believed the fact driving the business via meetings is the ultimate solution. The fundamental problem here is quite obvious, only if you do not choose to ignore it though. Some smarter managers know when and how to take engineers' viewpoint and understand that it takes 'time', concentrated time to make things happen. So watch out, if you find yourself or people who work for you getting the habit of filling calendar with all sorts of meeting schedules, there could be something going very wrong here. Either people are just trying to disguise from the reality that they do not really know what is going on and what is to aim for, or you are on the edge of dragging the productivity down because you can not find a better way of communicating.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This guy I worked with was a pilgrim of working by timesheet. We soon found him buried in all sorts of meetings and he was never on time for anything. People start to find him take too much of his own and others time to satisfy his timesheet. In the end people unavoidably started to wonder the opposite. Does he know what he is supposed to be doing or he just have to replace the lack of confidence and plans by the stuffed calendar - poor meeting boy?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, to be considerate is what I consider one of the most important criteria to be a good manager. (Being considerate does not mean being nice though :-).) Understand what it takes for engineers to produce something meaningful at certain quality standard is the base of management activity. It always works better for me to make sure I was not managing people's time FOR them. To know when to stand out of people's way is easy to slip from managers' mind, especially when fire starts to come out from everywhere and everyone on the food chain gets beaten up on daily basis. Hey, but what differentiate successful managers from the failed ones? So every time when I try to schedule a meeting I ask myself:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Do I really need this meeting? How much it will cost me and the team to spend an hour in this meeting, would it be worthy consider how much we could probably get out of it?&lt;/li&gt;&lt;li&gt;Is this meeting necessary or it is really just to make some people happy? If to make those people happy is critical, any other more productive ways I can make that happen? If it isn't critical, I am sorry, we are all grown ups...&lt;/li&gt;&lt;li&gt;Am I driven by the calendar? Do I start to rely on calendar to think for me? When was the last time I take a deep breath and a realistic look at the cost and quality of the product, the returning rate of installed products?&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Meeting means nothing really, if the purpose of a group of people to communicate important information in a much condensed manner is skewed. It replaces nothing, as far as I am concerned, certainly not the work itself.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-3442396787746214151?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/3442396787746214151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=3442396787746214151' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3442396787746214151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3442396787746214151'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/07/mastering-time-or-being-mastered.html' title='Mastering time or being mastered'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7530432560585666346</id><published>2009-07-19T05:19:00.001-07:00</published><updated>2009-07-19T07:22:21.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wolfram Alpha'/><title type='text'>Wolfram Alpha and knowing your market</title><content type='html'>It was kinda a mixed feeling when I was reading the latest blog on Joel on Software about Wolfram Alpha's failure. It stroke me it has been weeks since my first trial of Wolfram Alpha allured by its overwhelming PR. Gee..., I can't believe I fell behind again, that was my first reaction. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First thing first, WA just really got it wrong that who are their target customer, target market. In other words, they do not know who will be using this. I am certainly not able to get much out  of it with ten of my search keywords. Yeah, this makes me look very bad, and that's why I stop using it. Who wants to be made like an idiot in front of a machine which is supposed to be considerate and understanding. Most of my inputs have been given the answer as "Wolfram|Alpha isn't sure what to do with your input". Okay, after a deep breath, I thought we need some scientific spirit here. After all, it is still a young child. There are the claims made on the page:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Wolfram|Alpha answers specific questions rather than explaining general topics. &lt;/b&gt;- I guess this is supposed to be where WA wanted to penetrate the overflown search markets, originally at least. However, I did not see the evidence that this has been emphasized, nor been circumvented in any formats. This might be what would happen when you are over ambitious and do not know where you stand when it comes to product introduction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;You can only get answers about objective facts.&lt;/b&gt; - To whom? Is this online version of engineering handbook? We are all in the flood of information and knowledge updating all the time. In a short period of 50 years, look how many changes have already been made about our existing science and engineering 'facts'. To me, everything has a life span. Within it, yes, many assumptions we made about nature or explanations to problems might stands, but I do not believe in eternity in answers. Instead, people who create solutions, who explains mystery with their own eyes and hands are there to tell their findings, present their opinions, answer or challenge each other's theory or questions. If WA was targeted to replace our high school science book then fairy enough. However, even first grade university student knows that other than some fundamental formula (which have not yet been proved otherwise), most of the study is about critical thinking, finding unique solutions to problems.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Only what is known is known to Wolfram|Alpha.&lt;/b&gt; - No other comments, but &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;WTF&lt;/span&gt;!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Only public information is available. &lt;/b&gt;- Okay, what else are we supposed to be expecting?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And the suggestions offered by WA to its users are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;"&lt;i&gt;If Wolfram|Alpha is still not sure what to do, try the following:&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic; "&gt;Don't use long complete sentences; just enter the minimum number of words needed to communicate&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic; "&gt;Try different words or notations&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-style: italic; "&gt;Use whole words instead of abbreviations&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Check your spelling&lt;/i&gt;"&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;We all know sometimes we use workarounds or tips sections as vehicle to achieve a good balance between development cost, time and quality. I really can not see how these group ever going to achieve this trade off other than drive users away after first trial out. Patience as beauty is gradually fading out from our society as the close button paint on the elevator. People really can not afford to be nice and offer many chances to decide what search portal can help them out when they are desperately to get over this bit after information is retrieved. I am not saying Google has figured it all out. But it surely has understood the fact that to lure end users to your product, the way to do so is to do as much as jobs for them, in a subtle way still protect pride while simplify the input requirements from end users to the last drop. I already have tips for WA: &lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Do not assume user inputs and it is certainly not a good idea to assume a superior status to your end user in the product design. Customer is always right!&lt;/li&gt;&lt;li&gt;Clearly identify your market (maybe the market has potential is where Mathematica has been sold to, or more specific search products with institutes, education bodies etc.) After all, it needs a profitable business model to sustain. To replicate Google's Ads might not be such an easy idea here.&lt;/li&gt;&lt;li&gt;Get more data! Before than, make it clear about the product boundary. It can not be claimed be claimed a global distributed product when I could not even get house price data in Cambridge or London.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Just a happy ending to this story, finally, after 10 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;mins&lt;/span&gt; with a piece of paper, I have my search results with WA on "inverse Fourier transform sin(x)"......&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_szB77yN6fBM/SmMqNG85q2I/AAAAAAAAAMw/BON5A1iXo64/s1600-h/untitled.JPG"&gt;&lt;img src="http://3.bp.blogspot.com/_szB77yN6fBM/SmMqNG85q2I/AAAAAAAAAMw/BON5A1iXo64/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5360174386193738594" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 320px; height: 283px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7530432560585666346?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7530432560585666346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7530432560585666346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7530432560585666346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7530432560585666346'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/07/wolfram-alpha-and-knowing-your-market.html' title='Wolfram Alpha and knowing your market'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_szB77yN6fBM/SmMqNG85q2I/AAAAAAAAAMw/BON5A1iXo64/s72-c/untitled.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-3175460509539565755</id><published>2009-07-18T14:06:00.001-07:00</published><updated>2009-07-18T15:39:19.041-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='on target test'/><category scheme='http://www.blogger.com/atom/ns#' term='remote debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='multithreading'/><category scheme='http://www.blogger.com/atom/ns#' term='Lua'/><category scheme='http://www.blogger.com/atom/ns#' term='automated test'/><title type='text'>On target automation test engine</title><content type='html'>While I was on the train the other day to see a crappy doctor for my eyes (I am sorry but he has certainly proved that the visit does not worth my fifty pounds!), I thought just to see whether I could implement a small idea with one eye open, just you know, the other one was in pain...&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, my team has been suffering from lack of on target testing for a while now. Most of the existing testing is more of a hardware &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;exercise&lt;/span&gt; test at best. The verification of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;functionalities&lt;/span&gt; and integration test are left for the last minute surprise. There were some standard approaches such as building drives and applications into the binary image and download to the target device, relying on the start up scripts to do its job. Again, most of these tests are more of automated hardware &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;exercise&lt;/span&gt; testing rather than simulation. I guess one of the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;subtly&lt;/span&gt; here is that to simulate run time device performance in a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;realistic&lt;/span&gt; working environment is much involved when various components with timing constraints, system load difference, hardware limitation as well as failure mode recovery are really non-deterministic by nature. Some would argue the best we can do really is to do our deterministic part and leave nature to do its part. Well, we all know nature likes to surprise us every single time, just to show our ignorance I guess, for fun :-). We thought about adopting some off-the-shelf testing framework to write our test programs checking the components while they are running on the target device and integration test programs will simulate as many as possible scenarios we can think of, of course this would only be possible when the device running modes are well captured and defined. These simulation tests are not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;trivial&lt;/span&gt; to develop nor easy to maintain. The best part is, when something gets changed, or tests failing to be updated accordingly with the production code, things start to fall apart and no one has a clue what the heck is going on other than running around to setup &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;JTAG&lt;/span&gt; debugger or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;gdbserver&lt;/span&gt; and start to get into our &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;ancestor&lt;/span&gt; beloved register and assembly world.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My idea is simple, in fact, the engine I wrote on the train is only 200 lines of code. To define a light structure where each time when a new component is dropped to target, some standard test &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;scripts&lt;/span&gt; or test programs will be put under certain location. They will be automatically picked up when a high level unit test mode command is issued. For the traditional integration test, we can run multiple scripts simultaneously, following the pattern the application demands. And finally, the best part is Panic test, where a high level command will be something like this: &lt;i&gt;run_as_wish&lt;/i&gt;. This mode will certainly cause quite a lot of failures but I guess it is better to know your bottom line earlier rather than keep looking for it all the time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The engine is written in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Lua&lt;/span&gt;. So we will need to get &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Lua&lt;/span&gt; onto the target first. It defines three modes for invoking &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;existing&lt;/span&gt; test scripts/programs in a protect mode. If you want to know how to kick off multiple scripts in parallel, this &lt;a href="http://kotisivu.dnainternet.net/askok/bin/lanes/"&gt;post&lt;/a&gt; worth reading, and of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;course&lt;/span&gt; &lt;a href="http://www.tecgraf.puc-rio.br/~diego/professional/luathread/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;luathread&lt;/span&gt;&lt;/a&gt;. The beauty of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;Lua&lt;/span&gt; is that you can easily integrate it into all sorts of different languages, even .Net, via certain interface. Since &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;Lua&lt;/span&gt; has been used widely as embedded script engine in games, you should not be surprised too much. In my engine, again, simple and easy, use a global script to kick off the whole process and iterate through all those scripts needed to be concurrently running, in the scenarios you defined. Obvious question would be, why do not we just write multiple C programs? Okay, first of all, since &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;Lua&lt;/span&gt; scripts does not have tight dependencies to the low level OS &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;APIs&lt;/span&gt;, they are much easier to port. Secondly, with &lt;a href="http://www.keplerproject.org/remdebug/example.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;RemDebug&lt;/span&gt;&lt;/a&gt;, you can actually remote debug &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;Lua&lt;/span&gt; test scripts from PC. Thirdly, when your tests gets bigger and heavier to maintain, it is unavoidable that your production logic sneaks into your test code, if they are written in the same language, that is even more &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_21"&gt;convenient&lt;/span&gt; for us lazy people to do. This way, it force you to look at your production code independently and poke it in a protected environment. By doing this, you do not have to rebuild your image every time, which is really a time killing task!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-3175460509539565755?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/3175460509539565755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=3175460509539565755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3175460509539565755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/3175460509539565755'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/07/on-target-automation-test-engine.html' title='On target automation test engine'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8899891348913910890</id><published>2009-07-06T12:24:00.000-07:00</published><updated>2009-07-06T12:30:22.778-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shared whiteboard'/><category scheme='http://www.blogger.com/atom/ns#' term='online collaboration tools'/><category scheme='http://www.blogger.com/atom/ns#' term='test coverage'/><title type='text'>Test coverage and online collaboration</title><content type='html'>&lt;p class="MsoPlainText"&gt;A quick note just incase my brain is stuffed with rubbish some day.&lt;/p&gt;&lt;p class="MsoPlainText"&gt;All free.&lt;/p&gt;  &lt;p class="MsoPlainText"&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Online collaboration and whiteboard tools:&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;To share code snippet quickly: &lt;a href="http://dpaste.com/"&gt;dpaste&lt;/a&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;To share code within Visual Studio 2008, 2010: Dashboard Extension &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;Browser based whiteboard: &lt;a href="http://www.imaginationcubed.com/index.php"&gt;Imaginationcubed&lt;/a&gt; (You cannot get better than this! :-)) &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;Client app based: &lt;a href="http://www.mikogo.com/en/"&gt;mikogo&lt;/a&gt;, Dimdim or just do twittering &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoPlainText"&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Testing coverage tool&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;  &lt;p class="MsoPlainText"&gt;&lt;o:p&gt;NCover or PartCover for C# (work nicely with NUnit) &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;COVTOOL for C++ &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;GCOV and lcov (come with linux distribution) for gcc &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;xCover for both C/C++&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoPlainText"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;o:p&gt;Not free: BullseyeCoverage, Testwell CTC++, CoverageMeter, Rational PureCoverage or Test RealTime Coverage&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8899891348913910890?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8899891348913910890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8899891348913910890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8899891348913910890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8899891348913910890'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/07/test-coverage-and-online-collaboration.html' title='Test coverage and online collaboration'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2801335560654254825</id><published>2009-06-30T12:27:00.000-07:00</published><updated>2009-07-01T15:06:58.185-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kernel module'/><category scheme='http://www.blogger.com/atom/ns#' term='device driver'/><category scheme='http://www.blogger.com/atom/ns#' term='/proc'/><category scheme='http://www.blogger.com/atom/ns#' term='special file'/><category scheme='http://www.blogger.com/atom/ns#' term='/dev'/><title type='text'>/proc vs. /dev</title><content type='html'>/dev and /proc files are both means for user space programs to communicate with linux kernel but for different purposes.&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;/dev: file system for devices and stored in hard drive (not the same to DevFS which is also in RAM). (&lt;b&gt;Static&lt;/b&gt;)&lt;br /&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;/proc: file system for processes stored in memory. &lt;b&gt;/proc is an in-memory file system used to provide file based communication with the kernel.&lt;/b&gt; Also, to provide the user space applications the information about kernel, modules in the kernel sometimes create entries in /proc about their state information. Often, entries (&lt;i&gt;files and directories&lt;/i&gt;) under /proc will refer to (or explain) files under /dev. /proc/devices lists all of the devices (divided into the "block" and "character" categories) available on the system. Any kernel component that wants to &lt;b&gt;communicate with the user&lt;/b&gt; can create a file under the /proc and that can be used to exchange data. (Otherwise, it will have to &lt;a id="lsyl" href="http://www.linuxjournal.com/article/3326" title="create a system call" style="color: rgb(85, 26, 139); "&gt;create a system call&lt;/a&gt;.) (&lt;b&gt;Dynamic&lt;/b&gt;) The &lt;i&gt;sysctl &lt;/i&gt;command is another option for dynamic kernel configuration. &lt;a id="lxcb" href="http://www.ibm.com/developerworks/linux/library/l-proc.html" title="Here" style="color: rgb(85, 26, 139); "&gt;Here&lt;/a&gt; is a good and simpler example of how to create and use entry defined in /proc from a loadable kernel module, and how the memory should be handled. In fact, &lt;b&gt;/proc/devices&lt;/b&gt; will always provide you a list of available devices in the system (dynamically updated). This is often being used to create (&lt;i&gt;mknod&lt;/i&gt;) /dev file automatically after loadable module is installed via &lt;i&gt;insmod.&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style="font-size: 12pt; "&gt;Interact with kernel processes&lt;/h3&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;1. via /proc (with kernel): Processes can using files in /proc as media to communicate, between user space and kernel space. Parameters in /proc are used for tuning hardware and kernel internal settings. The &lt;a id="wads" href="http://www.geocities.com/ravikiran_uvs/articles/proc.html" title="reading and writing handlers" style="color: rgb(85, 26, 139); "&gt;reading and writing handlers&lt;/a&gt; are the channels for this communication to happen. They could be either blocking or non-blocking mode. This entry can be used by fread and fwrite from user space programs. &lt;i&gt;User program &lt;-&gt; /proc &lt;-&gt; kernel components&lt;/i&gt;. /proc file can also be used for hardware configuration.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;2. via /dev (with kernel): Processes access /dev file with the intention to issue I/O control or receive I/O data via read, write or mmap. Kernel will recognise these I/O requests and call requested device drivers (kernel modules), which will then communicate with the hardware. Compared with /proc, which could also be used to change hardware configuration, /dev files focus on using configured hardware device rather than configuring. &lt;i&gt;User program &lt;-&gt; /dev/* &lt;-&gt; device driver &lt;-&gt; hardware I/O&lt;/i&gt;. Although there is not a one to one relationship between /dev file and hardware piece in the system (except network interface cards). When an user program accesses a /dev file, kernel recognise the device driver based on the /dev file &lt;i&gt;major &lt;/i&gt;and &lt;i&gt;minor &lt;/i&gt;number (the kernel module numer). &lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Major number identify the device driver and the minor number is used to identify  one of the possible multiple devices managed by this device driver. &lt;b&gt;The kernel uses the major number to redirect an I/O request to the appropriate driver, and the driver uses the minor number to figure out which specific device to access&lt;span style="font-weight: normal; "&gt;. &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span style="font-weight: normal; "&gt;You can also access one device module from another kernel device module using &lt;i&gt;try_module_get/module_put/symbol_get/symbol_put/symbol_request,&lt;/i&gt; for ensuring loading of the other module, and the fact that it is not unloaded during usage. As long as the functions in the first module has been exposed via &lt;i&gt;EXPORT_SYMBOL&lt;/i&gt; (or &lt;i&gt;EXPORT_SYMBOL_GPL&lt;/i&gt;) macros.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;User space linux APIs applied on /dev files will invoke system calls which will then be passed to device drivers, if the operation is supported. The supported system calls are implemented as file operations, defined in &lt;i&gt;file_operations&lt;/i&gt; structure within linux/fs.h &lt;linux/fs.h&gt;, as a collection of function pointers, need to be implemented for device driver to be invoked correctly. There is a good analogy between available system calls applicable for a file and the file operations in the &lt;i&gt;file_operations&lt;/i&gt; structure. (Am I just repeating myself? :))&lt;/linux/fs.h&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Device driver is one type of kernel module. This means kernel module does not have to implement any of the file operations other than &lt;i&gt;module_init&lt;/i&gt; and &lt;i&gt;module_exit&lt;/i&gt;.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Of course the beloved ioctl provides all the freedom you need if you do not like any restriction as to the number of functions you want to implement.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;On slightly different subject, some special /dev files also can be used solely for IPC between user space programs such as /dev/null, /dev/full, /dev/zero. Particularly, you can create named pipe using mkfifo, which will internally call mknod to create a special /dev file until explicitly deletion. Once created, /dev fifo file can be used for IPC communication between two processes no matter which spaces they live in. Fifo /dev file requires two parties to join the communication with support for both blocking and non-blocking mode accesses.&lt;/div&gt;&lt;h3 style="font-size: 12pt; "&gt;Implementation&lt;/h3&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;1. /proc entry: to create an entry under /proc in your kernel module, use &lt;i&gt;create_proc_entry()&lt;/i&gt;.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Normally, there is only &lt;i&gt;&lt;b&gt;read_proc &lt;/b&gt;&lt;/i&gt;and &lt;i&gt;&lt;b&gt;write_proc&lt;/b&gt;&lt;/i&gt; for you to create a /proc entry in the kernel module.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;2. /dev file: &lt;i&gt;mknod or MAKEDEV or mkfifo&lt;/i&gt; to creates a FIFO (pipe), character &lt;b&gt;special &lt;/b&gt;&lt;b&gt;file&lt;/b&gt;, or block &lt;b&gt;special&lt;/b&gt; &lt;b&gt;file &lt;/b&gt;with the specified name. "&lt;b&gt;special file&lt;/b&gt;" means something that can generate or receive data. &lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Unfortunately, you have to do this manually when you implement your own new device driver in the linux kernel. Of course you will also be responsible for the module major and minor number allocation although there are kernel APIs which can help you find available numbers.&lt;i&gt;    &lt;/i&gt;&lt;i&gt;mknod -m permissions name type major minor&lt;/i&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;You can change the permission of /dev files after creation but need to be careful as you are opening a window to the underneath world!&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;To support a /dev file to access hardware devices, we need to implement device driver.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2801335560654254825?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2801335560654254825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2801335560654254825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2801335560654254825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2801335560654254825'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/proc-vs-dev.html' title='/proc vs. /dev'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2078302289246588298</id><published>2009-06-26T07:24:00.000-07:00</published><updated>2009-06-26T13:34:26.006-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><title type='text'>Patch the patches</title><content type='html'>If you have suffered the pain of patching Linux kernel for either driver changes or target device support, I am sure you are just as unimpressed as I am when the patch fails with absolutely no indications, no logs, no nothing, in the middle of file update. With some very careful tracing, it turns out to be that your applications requires you to change the same files which are set for patching, especially those from third parties.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now here is a clean thread,&lt;/div&gt;&lt;div&gt;1. You have a target device, for argument sake, you need to change some of the kernel driver files to accommodate those hardware various, or even just you fancy ideas of changing Linux itself. After all, that's what you are expecting from open source OS, isn't it?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. In parallel, you wanted to patch your existing Linux source distribution with some other third party addon, such as RTAI or Xenomai. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my case, I had a problem that both of them require changes in xxx_gpio.c file, and same lines! The third requirement is, I do not want to manually do the file copy thing or scripted file copying thing every time when I rebuild the whole lot. After a nice lunch time beer, this is what I have done.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 1. file_ver0.c =&gt; Apply third party changes (only because they are normally dumber!) =&gt; file_ver1.c&lt;/div&gt;&lt;div&gt;Step 2. file_ver1.c =&gt; Apply your changes on top of third party changes =&gt; file_ver2.c&lt;/div&gt;&lt;div&gt;Step 3. Do a &lt;b&gt;&lt;i&gt;diff -u file_ver0.c file_ver2.c &gt; diff.txt&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Step 4. Replace the patch section of this file in the original .patch file with content in diff.txt.&lt;/div&gt;&lt;div&gt;Step 5. Or create your own patch file and do &lt;i&gt;&lt;b&gt;patch -p1 &amp;lt; whatever.patch&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;b&gt;&lt;b&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Ok, this is done once for all.&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2078302289246588298?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2078302289246588298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2078302289246588298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2078302289246588298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2078302289246588298'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/patch-patches.html' title='Patch the patches'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7039011330645981290</id><published>2009-06-21T10:27:00.000-07:00</published><updated>2009-06-21T12:20:47.520-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Chromium'/><title type='text'>For those who love Chrome</title><content type='html'>&lt;div&gt;Chromium is an open source browser project. In case you have not realised by now, it is the code base where Google Chrome grew from. Crossover chromium is a Mac and Linux port project, where I have to eventually try my luck to get similar user experience of browser of Chrome on Ubuntu. There are some posts introducing way of installing Chrome via Wine. I do not particularly like the idea to install another layer of run time engine between browser and os as one of the nice things about Chrome is its low latency, which is the not exactly the whole idea of wine anyway (portability of windows applications to Linux).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To keep this short, get Chromium up and running, the following steps works for me (Hardy 8.04):&lt;/div&gt;&lt;div&gt;First thing first, you are unlucky as I were, you have to upgrade to 8.10 at least to be able to run Chromium. Regardless how many people say it works, my finding is, yes, the install will be completed with warnings on a few dependencies. The worst thing is, the browser is barely usable and crashes very easily.&lt;/div&gt;&lt;div&gt;So do a "update-manager -d" to get you from 8.04 to 8.10; another one will then get you upgraded to 9.04.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Download .deb package&lt;/div&gt;&lt;div&gt; wget http://media.codeweavers.com/pub/crossover/chromium/cxchromium_0.9.0-1_i386.deb&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Install deb package&lt;/div&gt;&lt;div&gt; sudo dpkg -i cxchromium_0.9.0-1_i386.deb&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Using Ubuntu PPA&lt;/div&gt;&lt;div&gt;  sudo gedit /etc/apt/sources.list&lt;/div&gt;&lt;div&gt;Add the following two lines&lt;/div&gt;&lt;div&gt; deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main&lt;/div&gt;&lt;div&gt; deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main&lt;/div&gt;&lt;div&gt;Do NOT use "jaunty" version on Hardy otherwise you will have a crashing install. "jaunty" is for 9.04. Save and exit the file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Add and activate GPG key&lt;/div&gt;&lt;div&gt; sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. Update source list in the repository&lt;/div&gt;&lt;div&gt; sudo apt-get update&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Finally, get chromium installed!&lt;/div&gt;&lt;div&gt; sudo apt-get install chromium-browser&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now go to Applications-&gt;Internet-&gt;Chromium Web Browser, and you are sorted.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7039011330645981290?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7039011330645981290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7039011330645981290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7039011330645981290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7039011330645981290'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/for-those-who-love-chrome.html' title='For those who love Chrome'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4018023351352214922</id><published>2009-06-10T05:50:00.000-07:00</published><updated>2009-06-10T05:56:18.178-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RPC'/><category scheme='http://www.blogger.com/atom/ns#' term='SOAP'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='Multiprocessor scheduling'/><title type='text'>Distributed system notes - Part IV</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Parallel computing vs. Distributed computing - Get down another level&lt;/span&gt;&lt;/b&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Flynn gave the taxonomy for distributed architecture as: SISD, SIMD, MISD and MIMD.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To sub-classify MIMD by &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Memory&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Shared memory system -&gt; multi-processors&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;No shared memory system -&gt; network of computers&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Interconnection&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Bus&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Switch (Circuit-switched and packet-switched)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Delay/bandwidth&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Tightly coupled system - Processors share most resources inc. Memory. The communication is achieved over shared bus too. (Not very flexible and scalable, fault sensitive)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Loosely coupled system - Most resources are not shared with each processor normally own private cache (in tight coupled system too) and dedicated memory. The communication is achieved via messaging over explicit communication link or shared virtual memory.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Five categories in the degree of granularity &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;table id="knsu" width="100%" cellpadding="3" cellspacing="0" border="1" class="" border style="line-height: inherit; border-collapse: collapse; color:#666666;"&gt;&lt;tbody&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%" style="text-align: center; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Grain size&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="33.333333333333336%" style="text-align: center; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="15%" style="text-align: center; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Synchronisation interval (Instructions)&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Fine&lt;/span&gt;&lt;/td&gt;&lt;td width="33.333333333333336%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallelism inherent in a single instruction stream&lt;/span&gt;&lt;/td&gt;&lt;td width="15%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Medium&lt;/span&gt;&lt;/td&gt;&lt;td width="33.333333333333336%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel process of multi-tasking in a single application program&lt;/span&gt;&lt;/td&gt;&lt;td width="15%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;20 ~ 200&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Coarse&lt;/span&gt;&lt;/td&gt;&lt;td width="33.333333333333336%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Multiprocessing of concurrent processes in multiprogramming environment&lt;/span&gt;&lt;/td&gt;&lt;td width="15%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;200 ~ 2000&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Very Coarse&lt;/span&gt;&lt;/td&gt;&lt;td width="33.333333333333336%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Distributed processing across network nodes to form a single computing environment&lt;/span&gt;&lt;/td&gt;&lt;td width="15%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2000 ~ 1M&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="text-align: left; "&gt;&lt;td width="10%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Independent&lt;/span&gt;&lt;/td&gt;&lt;td width="33.333333333333336%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Multiple unrelated process&lt;/span&gt;&lt;/td&gt;&lt;td width="15%"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;N/A&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Intra-machine&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;u style="text-decoration: none; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Machine architecture&lt;/span&gt;&lt;/u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Interconnection&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Symmetric Multi-Processing (SMP)&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - all CPUs connected to single backbone bus&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This way memory and peripheral I/O will be accessed via the same shared bus.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Local cache is used to avoid bus overload&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To maintain memory coherence -&gt; Snoopy cache&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;b&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Switched multi-processors&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SMP doesn't really scale well. Switched multi-processors divide memory into groups and connect memory chunks with CPUs via a crossbar switch. (n&lt;/span&gt;&lt;sup&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2&lt;/span&gt;&lt;/sup&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; switch crosspoint, constant 1 switching stage)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To reduce the number of crosspoints, Omega network introduces more switching stage. (for each CPU &lt;-&gt; memory chunk combination, there is a log&lt;/span&gt;&lt;sub&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2&lt;/span&gt;&lt;/sub&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;n switching stage, each with n/2 switches; totally n*log&lt;/span&gt;&lt;sub&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2&lt;/span&gt;&lt;/sub&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;n/2 switches)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;NUMA - hierarchical memory system&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;HyperCube&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/b&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Approach to share OS responsibility&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Master/slave - Master process executes most of the operating system code, inc. I/O tasks, with slaves performing processor-bound user programs. Thus slave processors normally have to wait master to handle the interrupt for OS level operations.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Separate kernels - Each CPU runs its own OS and responds only to its local processes. Synchronisation can be achieved via critical region or software/hardware (TSL) level spinlock.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Symmetrical (shared OS)&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - OS is in charge here. OS manages a pool of identical processors with high amount of resource sharing as well as mutual exclusions. This approach allows OS maximise parallelism potential and process to utilise all computation power as much as possible with the load significantly on OS.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Memory access&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Uniform memory access (UMA) - All processors share main memory. This would typically be used in shared bus or SMP system.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Non-uniform memory access (NUMA) - Global memory is divided into partitions which are then allocated to processors as local memory. This avoid bus conflicts and quicker local memory access for processors.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;COMA&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;NORMA&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;u style="text-decoration: none; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;u style="text-decoration: none; "&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;OS Scheduling&lt;/span&gt;&lt;/u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - &lt;/span&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;determine&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; the order and to which processor the process is assigned and dispatched to&lt;/span&gt;&lt;/u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Issue break down&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Assignment of processes to processors&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Use of multiprogramming on individual processor&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Actual dispatching of a process &lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Goals&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Achieve parallelism&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Timesharing - synchronised single queue based scheduling&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Synchronisation of parallel programs - Gang scheduling&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Achieve processor Cache affinity - affinity based scheduling, space-partitioning scheduling (what that means is for example, an interrupted process has already put its data, state on the L1 cache of one processor, to move/migrate to the other processor based on naive rescheduling will slow waste the cached info hence slow things down. This could be even worse if underlining architecture is NUMA rather than symmetric access.)&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Soft affinity&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Hard affinity&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Types of scheduling&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Job-blind - direct extension from single processor scheduling&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;FIFO, EDF, Round-robin, shortest process first&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Job-aware&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The ones to maximise parallelism - shortest-number-of-processes-first, Round-robin job, co-scheduling (MIS ?)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The ones to maximise affinity - dynamic partitioning&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Process migration - minimal residual dependency&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Request initiated from either sender processor or receiver&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender suspends the migrating process&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender creates message queue for migrating process&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender transmit the migrating process state to a dummy process in receiver - there are various migration strategies as far as how to copy memory pages is concerned. &lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender forward the messages to receiver&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender and receiver notify the others of the migration&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sender kills the original instance of the process it holds&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Load balancing - Queuing theory&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Static load balancing - Distribute the load &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;and &lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;minimise communication cost&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Dynamic load balancing - Present communication challenge&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Policies - Sender initiated, receiver initiated, symmetric, random&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Algorithms - Bidding, drafting&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Case study - background comparison between &lt;/span&gt;&lt;a id="p0yh" href="http://widefox.pbworks.com/Scheduler" title="Windows and Linux" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Windows and Linux&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Linux 2.6 multi-processor scheduling&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - Prior to 2.6.23, Linux kernel only supports one runqueue per CPU. The introduction of Completely Fair Scheduler (CFS, complexity increased to O(logn) as opposed to O(1)) in 2.6.23, is to improve the separation between I/O intensive tasks and CPU intensive tasks, which was originally estimated by penalising CPU intense processes and favor for I/O intense via tuning the priorities. Bear in mind Linux has mainly been used in &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;symmetrical shared OS structure&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; as far as OS responsibility is concerned. The underneath data structure used by CFS is a red-black tree per runqueue. Scheduling domain based Load balancing was introduced in 2.6.17 to address unsatisfactory Linux scheduling performance on SMP and NUMA. The hierarchy of scheduling domain is built on actual hardware resources available. Load balancing takes place at the domain level between different groups. Linux also introduced energy saving scheduling. A good reference on this can be found on &lt;/span&gt;&lt;a id="eo9q" href="http://software.intel.com/sites/oss/pdf/mclinux.pdf" title="Intel's website" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Intel's website&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;One queue per processor - a run queue (containing multiple priority array to achieve O(1) scheduling selection as in &lt;/span&gt;&lt;a id="f.24" href="http://hegallis.blogspot.com/2009/05/linux-real-time-kernel-scheduling.html" title="single processor's case" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;single processor's case&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;) per processor&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Same task tends to stay in one queue - to achieve cache affinity&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Load balancing - move tasks around queues&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;No native support for gang scheduling as yet.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Windows multi-process scheduling&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - The scheduling on windows is thread-based, with priority from 0 to 31 (as opposed to Linux 140 priority within which 100 is for real time tasks). These threads will be allocated time slices on round-robin fashion. Scheduling on SMP system, Windows introduces the notion of a &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;thread's processor affinity&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; and &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ideal processor&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; for a given thread.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;h4&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Inter-machine&lt;/span&gt;&lt;/h4&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Architecture&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Centralised model - Terminal-based computing service (slot) provider&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Client-server model&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;P2P - Each peer has equivalent capability =&gt; no peer is dedicated to only serve others. Publisher-consumer design patter, brokerless messaging.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Processor pool model - Task scheduling, mapreduce&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Grid computing - for heterogeneous and geographically distributed system, providing seamless access to available resources.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Multi-tier C/S&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;u style="text-decoration: none; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    &lt;/span&gt;&lt;u style="text-decoration: none; "&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Remote procedure call&lt;/span&gt;&lt;/u&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; -&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="font-weight: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To execute function/service defined within other components of the system&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Stub based design. An interface definition stage is involved during the design to product consistent stubs to be used both in RPC invokers and invokees. The execution of RPC could either be blocking or non-blocking, in other words, synchronous or asynchronous.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parameters have to be &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;marshalled -&gt; serialised -&gt; transmitted -&gt; de-serialised -&gt; unmarshalled&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, by value in essence (be aware of different data representation in different physical nodes)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;How to locate the RPC service provider and how/when to bind?&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Name services operations&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Binding operations (via appropriate protocols)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Endpoints operations&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Security operations&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Data conversion (marshalling)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Stub memory management (temporarily buffer 'reference' data)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;RPC API calls (compatibility, fault tolerance)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;    &lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Case studies&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Native RPC&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sun RPC - also known as ONC RPC, interface defined in IDL (rpcgen compiler). Early binding approach, not by procedure call basis. It requires programmer to pick a unique interface definition ID.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;DCE RPC - Interface is defined in IDN file. Integrated with DCE's security service and directory service. uuidgen is used to produce the unique ID.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Object RPC&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MS DCOM - Client connects to SCM (Service Control Manager, running on server) to request the creation of object on server. Underneath data transfer DCOM uses DCE RPC protocol packets + version info + IPID (&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;remote object references&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;). MIDL file is compiled by IDL compiler to produce C++ code, proxy (client) and stub (server), both are COM objects. One key point is the object (in the server) lifetime is controlled by &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;remote reference counting&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CORBA - OS and language independent. To achieve, &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;request services of a distributed object&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. ORB (Object request broker) delivers the client request to the object and return results to client. The interfaces are defined in IDL, interface definition &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;language (Yes, it is a real language!)&lt;/span&gt;&lt;span style="font-weight: normal; "&gt;&lt;span style="font-style: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="font-weight: normal; "&gt;&lt;span style="font-style: normal; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;which will then be compiled to target language client or server use, to produce stub and skeleton. ORB takes a lot of responsibility in this case such as locating remote object, sending request, collecting result. This way, the client and object implementation could be on completely different platform in different language, not like DCOM. IIOP is defined as an inter-ORB network protocol. There are many CORBA standard services providing services as naming, events, managing object life cycle, transaction, load balancing etc.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="rjmg" style="margin-top: 0px; margin-bottom: 0px; text-align: center; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_60hdjgkqd7_b" style="width: 648px; height: 263.788px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="rjmg" style="margin-top: 0px; margin-bottom: 0px; text-align: center; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Java RMI - using &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Object Registry&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; to relate objects to names within name servers. rmic is the compiler to produce stub and skeleton class files. In the server side, the object implementation needs to register itself with the Object registry via &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;binding&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, after which, client will inquiry rmiregistry to &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;lookup&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; name. It will then return a remote reference handle to the client for it to invoke exposed methods.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Webservices - the third generation of RPC implementation. The goal is to have remote &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;hosted &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;services behind firewalls could be utilised.&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;XML RPC - marshal data into XML format with explicit typing, transported over standard HTTP protocol to get around firewall restrictions. There are standard XML-RPC data types defined, as opposed to native data types.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SOAP - to generalise XML RPC, SOAP still defines message in XML format but not necessary RPC, instead SOAP adopts XML over HTTP. Web service interface is defined in WSDL, which is exchangeable. In terms of &lt;/span&gt;&lt;a id="m3g7" href="http://www.pluralsight.com/community/blogs/dbox/archive/2006/02/17/18869.aspx" title="SOAP v POX" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SOAP v POX&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (plain-old-XML), AJAX adopts the standard XML approach to send and receive data, allowing client side javascript to initiate asynchronous HTTP request (REST) and process the result at object level. Google has obviously spit out its favorite as POX.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MS .Net Remoting - I have briefly covered .Net remoting in &lt;/span&gt;&lt;a id="mbms" href="http://hegallis.blogspot.com/2008/11/inter-component-communication.html" title="previous blog" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;previous blog&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. Aiming at replacing low level DCOM, MS introduced Remoting on top of the new common language runtime (CLR) as the object run time environment. Webservice will be compiled into immediate language (IL) format whichever language was chosen to implement. CLR just-in-time compiler will generate native code for the first loaded programs. (It is possible to pre-load the interpreted assembly into target machine instruction binary to global assembly cache though.) Object derived from &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MarshalByRefObject &lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;is deemed as remote objects. The communication is supported in XML, SOAP or binary encoding, through HTTP, TCP and SMTP protocol channel. In summary, .Net also has an explicit set of Web Service, based on &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;HTTP&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (communication protocol) + &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;XML&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (data format) + &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SOAP&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (format to request service) + &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;WSDL&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (format for defining service) + &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;UDDI&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (protocol for discovering service). I hope you can see the difference between Remoting and .Net Web Service, as the latter is a fixed combination and higher functional level.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4018023351352214922?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4018023351352214922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4018023351352214922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4018023351352214922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4018023351352214922'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/distributed-system-notes-iv.html' title='Distributed system notes - Part IV'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8581350186972776800</id><published>2009-06-09T08:00:00.000-07:00</published><updated>2009-06-09T09:28:04.300-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='soft modem'/><category scheme='http://www.blogger.com/atom/ns#' term='chinese market simplification'/><category scheme='http://www.blogger.com/atom/ns#' term='3G'/><title type='text'>3G in China</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Market development&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;1. Step one - standard&lt;/span&gt;&lt;/b&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Chinese market, IP, &lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Diversity of suppliers. &lt;span class="Apple-style-span" style="font-weight: normal; "&gt;multiple standards presents challenges but also opportunities to the suppliers at different level of the food chain.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;TD-SCDMA go abroad by directing/influencing suppliers, technology via massive Chinese market.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2. Step one - network (200 billions RMB in 2009 alone)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Three carriers are being licensed for 3G network infrastructure construction in Jan 2009:&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;China Mobile - TD-SCDMA&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;China Telcom - CDMA2000&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;China Unicom - WCDMA&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;HuaWei, ZTE will be playing critical roles in infra-structure construction, so as many third party suppliers.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;3. Step three - UE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;In the next 3 years, 3G mobile phone, data card etc. is projected/planned at 400 billions RMB, more than 40 billions GBP.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Diversity of suppliers&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Chipset: Icera, Qualcomm&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Device: All the big names + local device vendors&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;China Mobile joined Google's Open Mobile platform alliance, adopting Android as mobile OS. Very much like DOCOMO in Japan.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;WCDMA - G1, iPhone, N97 (Nokia), X1 (Sony Ericsson), HTC Touch HD&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CDMA2000 - Blackberry, D90 (ZTE), ZN4 (Motorola), SCH-U940(Samsung)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;TD-SCDMA - L800t (Motorola), S700 (Dupuda), U981 (ZTE), TD800 (Lenovo)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;4. Step four - service provider, content provider&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Application vendors&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Value-added service provider&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Technical stuff&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;UE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal; font-family:Verdana;"&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_57fkvkdfgv_b" style="width: 648px; height: 143.233px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="h600" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Baseband processor&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_58f3dmq4ct_b" style="width: 648px; height: 413.438px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Network infrastructure - &amp;amp; integration with each other&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Node B implementaion&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Integrate existing network&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Challengess&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="td7t" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Wireless Communication Channel, multiple modulation and channel coding standard co-exist (&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Soft modem&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Packet Network, modified TCP/IP implmentation on top of MAC and link layer control in application processor.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Small packaging and integrated fabric&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold; font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Products&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;D&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ata card&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Qualcomm's Gobi&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, Icera's soft modem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Mobile device - reference design&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8581350186972776800?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8581350186972776800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8581350186972776800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8581350186972776800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8581350186972776800'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/3g-in-china.html' title='3G in China'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7748899836314898856</id><published>2009-06-08T05:28:00.001-07:00</published><updated>2009-06-08T05:30:47.812-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='distributed clock synchronisation'/><category scheme='http://www.blogger.com/atom/ns#' term='virtulisation'/><category scheme='http://www.blogger.com/atom/ns#' term='clustering'/><title type='text'>Distributed system notes - Part III</title><content type='html'>&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;h3  style="font-size:12pt;"&gt;&lt;span style="font-size:100%;"&gt;Virtulisation&lt;/span&gt;&lt;/h3&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Memory virtulisation - process owns individual memory space. Created by MMU, configured by OS&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Storage virtulisation - Logical storage images. DFS (distributed file system) is one typical example. Another one is SAN (Storage Area Network).&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;CPU/Machine virtulisation - Process has its own CPU, machine resources, created by OS pre-emption and scheduler.&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;For unprivileged instructions, they will be interpreted to the physical CPU instruction sets.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;For privileged instruction, VM will &lt;i&gt;trap&lt;/i&gt; these instructions and emulate them. However, X86 doesn't support &lt;i&gt;Trap&lt;/i&gt;. So either we have to replace these instructions (VMWare) or just don't use them (Xen).&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Virtual Machine Monitor - &lt;i&gt;&lt;b&gt;Hypervisor&lt;span style="font-style: normal; "&gt;&lt;span style="font-weight: normal; "&gt;, the program responsible for the virtulisation&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Arbitrate accesses to physical resources (hypervisor sometime can be run on top of a thin layer OS itself - Xen.)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Pre&lt;span style="font-size:85%;"&gt;sent a set of virtual device interface to each &lt;/span&gt;&lt;i&gt;&lt;span style="font-size:85%;"&gt;host&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:85%;"&gt; OS&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-size:85%;"&gt;Hypervisor-based rootkits&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="font-size:85%;"&gt;VMWare, Parallels, Xen, MS Virtual PC, xVM Virtual Box, Altris&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;h3  style="font-size:12pt;"&gt;&lt;span style="font-size:100%;"&gt;Clustering&lt;/span&gt;&lt;/h3&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Clustering is to achieve reliability and scalability by interconnectin multiple autonomous standard servers into appear-to-be single machine image.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Existing clustering types:&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;High Performance (Super)-Computing (HPC)&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Typically &lt;i&gt;Linux + message passing software + remote exec + remote monitoring&lt;/i&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Interconnect network isolated from external network&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Network load is determined only by application&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Global process ID provided, Global signaling mechanism&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Batch processing&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Single-queue work distribution&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;&lt;b&gt;Application specific&lt;/b&gt;&lt;/i&gt;: graphics rendering&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Dispatcher remotely exec process&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;A portable Batch System - OpenPBS&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Grid Computing&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Not application-specific, use general-purpose protocols for accessing resources, authenticating, discovery etc.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Coordinate computing resources that are not subject to centralized control&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Open Grid Services Architecture (&lt;i&gt;&lt;b&gt;Globus Toolkit&lt;/b&gt;&lt;/i&gt; - open source software tool kit used for building Grid systems and applications.)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;All grid resources are modeled as services&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Protocols&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Grid Resource Information Protocol (GRIP), Register resources; based on LDAP&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Grid Resource Access and Management Protocol (GRAM) Allocation &amp;amp; monitoring of resources; based on HTTP&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;GridFTP, Data access&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Service&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Define service’s interface (GWSDL)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Implement service (Java)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Define deployment parameters (WSDD)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Compile &amp;amp; Generate GAR file (Ant)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Deploy service with Ant&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;High availabitlity (HA)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Load balancing - Redirect request, most router has now load balancing capability, simple NAT table load balancing.&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Software load balancing - Forward request via load balancing (&lt;i&gt;&lt;b&gt;&lt;u&gt;IBM interactive network dispatcher&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;)&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Leaves original source address&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Load balancer not in path of outgoing traffic (high bandwidth)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Kernel extensions for routing TCP and UDP requests&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Each client accepts connections on its own address and dispatcher’s address&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Dispatcher changes MAC address of packets.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Load balancing Router - &lt;i&gt;&lt;b&gt;Virtual Router Redundancy Protocol, LSNAT protocol&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Pick machine with least # TCP connections&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Factor in weights when selecting machines&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Pick machines round-robin&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Pick fastest connecting machine (SYN/ACK time)&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Port level redirection&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Multiple virtual addresses to be assigned to physical address&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Manage &lt;i&gt;Session&lt;/i&gt; during redirections.&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Network load balancing, component load balancing&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Multi-tier clustering system&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Top tier: cluster abstractions - Failover manager, resource monitor, cluster registry&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Middle tier: distributed operations - Global status update, quorum (keeps track of who’s in charge), membership&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Bottom tier: OS and drivers - Cluster disk driver, cluster network drivers, IP address takeover&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style="font-size: 12pt; "&gt;Clock synchronisation&lt;br /&gt;&lt;/h3&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;b&gt;&lt;i&gt;Physical clock&lt;/i&gt;&lt;/b&gt; - Keep consistent wall clock across all components.&lt;/p&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Problems: Clock drift and skew =&gt; NTP and SNTP protocol&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;i&gt;Logical clock&lt;/i&gt;&lt;/b&gt; - Maintain logical relationship between events. The key is the &lt;i&gt;&lt;b&gt;sequence&lt;/b&gt;&lt;/i&gt; of the messages, which each component maintains its own&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Partial ordering - Lamport's algorithm&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Each message carries the physical timestamp from the sender;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;When a message arrives, if the receiver's physical clock &lt; timestamp =""&gt; set receiver's clock to message's timestamp + 1, otherwise do nothing;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Clock must be advanced between two events in the same process.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;When there is no logical sequential ordering among events in different components, i.e. no send-receive &lt;i&gt;&lt;b&gt;causal&lt;/b&gt;&lt;/i&gt; relationship, we have &lt;i&gt;&lt;b&gt;concurrency&lt;/b&gt;&lt;/i&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Total ordering&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Force each timestamp in the system to be unique in {&lt;i&gt;&lt;b&gt;T&lt;/b&gt;&lt;/i&gt;&lt;sub&gt;&lt;i&gt;&lt;b&gt;i&lt;/b&gt;&lt;/i&gt;&lt;/sub&gt;&lt;i&gt;&lt;b&gt; &lt;span style="font-style: normal; "&gt;&lt;span style="font-weight: normal; "&gt;, &lt;/span&gt;&lt;/span&gt;i&lt;/b&gt;&lt;/i&gt;}. "&lt;i&gt;&lt;b&gt;i&lt;/b&gt;&lt;/i&gt;" is the process identifier in the system. Total ordering does not related to event ordering.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;Use &lt;b&gt;&lt;i&gt;Vector clock &lt;/i&gt;&lt;/b&gt;to analyse and identify concurrent events in a distributed system.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="vy28" style="margin-top: 0px; margin-bottom: 0px; text-align: center; "&gt;&lt;div id="va2-" style="margin-top: 0px; margin-bottom: 0px; text-align: center; "&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_55m563d9hg_b" style="width: 648px; height: 415.734px; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7748899836314898856?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7748899836314898856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7748899836314898856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7748899836314898856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7748899836314898856'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/distributed-system-notes-part-iii.html' title='Distributed system notes - Part III'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-6646070781440005837</id><published>2009-06-08T05:26:00.000-07:00</published><updated>2009-06-08T05:27:46.668-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='distributed system'/><category scheme='http://www.blogger.com/atom/ns#' term='mapreduce'/><category scheme='http://www.blogger.com/atom/ns#' term='parallel'/><category scheme='http://www.blogger.com/atom/ns#' term='MPI'/><title type='text'>Distributed system notes - Part II</title><content type='html'>&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Intra-machine parallel computing vs. inter-machines distributed computing&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Find the parallel task potential and independent data sets, or both -&gt; &lt;b&gt;&lt;i&gt;commutative &lt;/i&gt;&lt;/b&gt;property.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Parallel computing at intra-machine level normally is achieved via multi-threading on single CPU or multi-processing across multiple CPUs (but sharing memory and I/O resources). The key is how to build in parallelism into the task, process and thread level design by exploiting the implicit &lt;i&gt;&lt;b&gt;commutative property&lt;/b&gt; &lt;/i&gt;of the problem. Here &lt;b&gt;&lt;i&gt;synchronisation&lt;/i&gt;&lt;/b&gt; on the shared resource and dependency over the similar non-commutative logic is the main difficulties.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Distributed computing at inter-machines, connected through homogeneous or heterogeneous network, has underlining limitation (proved by consensus attack problem). In real world scenarios, we always either simplify the network model (i.e. client-server, peer-to-peer) with certain constraints, or assuming probability in the failures. Hence the fundamental challenges in inter-machine distributed system is &lt;b&gt;&lt;i&gt;communicat&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;ion and &lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;messaging &lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;protocol&lt;/i&gt;&lt;/b&gt;&lt;span style="font-size:85%;"&gt; plus&lt;/span&gt;&lt;b&gt;&lt;i&gt;shared, synchronised and consistent data support&lt;/i&gt;&lt;/b&gt;&lt;span style="font-size:85%;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;h4  style="font-size:10pt;"&gt;&lt;span style="font-size:85%;"&gt;Message Passing Interface (MPI) - Open MPI&lt;br /&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;span style="font-size:85%;"&gt;Explicit data control over nodes; &lt;/span&gt;&lt;i&gt;1&lt;/i&gt;&lt;span style="font-size:85%;"&gt;-&lt;/span&gt;&lt;i&gt;n, n&lt;/i&gt;&lt;span style="font-size:85%;"&gt;-&lt;/span&gt;&lt;i&gt;1&lt;/i&gt;&lt;span style="font-size:85%;"&gt; and &lt;/span&gt;&lt;i&gt;n&lt;/i&gt;&lt;span style="font-size:85%;"&gt;-&lt;/span&gt;&lt;i&gt;n&lt;/i&gt;&lt;span style="font-size:85%;"&gt; messaging support; support high performance localised applications; defined synchronisation and shared virtual memory; explicit distributed processes control.&lt;/span&gt;&lt;i&gt;Open MPI &lt;/i&gt;&lt;span style="font-size:85%;"&gt;implementation.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4  style="font-size:10pt;"&gt;&lt;span style="font-size:85%;"&gt;MapReduce&lt;/span&gt;&lt;/h4&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;Less direct process and data control in distributed nodes with hidden complexity, based on &lt;i&gt;DFS&lt;/i&gt;and &lt;i&gt;JobTracker&lt;/i&gt;.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;br /&gt;MapReduce -&gt; Map (parallel tasks working on independent raw data sets) + Reduce (parallel tasks working on independent hash key sets)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="a05." style="margin-top: 0px; margin-bottom: 0px; text-align: center; "&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_52cvjpnmck_b" style="width: 648px; height: 407.044px; " /&gt;&lt;/div&gt;&lt;ol style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;The MapReduce library in the user program first shards the input files into M pieces of typically 16 megabytes to 64 megabytes (MB) per piece. It then starts up many copies of the program on a cluster of machines.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;One of the copies of the program is special: the master. The rest are workers that are assigned work by the master. There are M map tasks and R reduce tasks to assign. The master picks idle workers and assigns each one a map task or a reduce task.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;A worker who is assigned a map task reads the contents of the corresponding input shard. It parses key/value pairs out of the input data and passes each pair to the user-defined Map function. The intermediate key/value pairs produced by the Map function are buffered in memory.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;Periodically, the buffered pairs are written to local disk, partitioned into R regions by the partitioning function. The locations of these buffered pairs on the local disk are passed back to the master, who is responsible for forwarding these locations to the reduce workers.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;When a reduce worker is notified by the master about these locations, it uses remote procedure calls to read the buffered data from the local disks of the map workers. When a reduce worker has read all intermediate data, it sorts it by the intermediate keys so that all occurrences of the same key are grouped together. If the amount of intermediate data is too large to fit in memory, an external sort is used.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;The reduce worker iterates over the sorted intermediate data and for each unique intermediate key encountered, it passes the key and the corresponding set of intermediate values to the user's Reduce function. The output of the Reduce function is appended to a final output file for this reduce partition.&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;When all map tasks and reduce tasks have been completed, the master wakes up the user program. At this point, the MapReduce call in the user program returns back to the user code.&lt;/li&gt;&lt;/ol&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;After successful completion, the output of the MapReduce execution is available in the R output files. To detect failure, the master pings every worker periodically. If no response is received from a worker in a certain amount of time, the master marks the worker as failed. Any map tasks completed by the worker are reset back to their initial idle state, and therefore become eligible for scheduling on other workers. Similarly, any map task or reduce task in progress on a failed worker is also reset to idle and becomes eligible for rescheduling.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;Completed map tasks are re-executed when failure occurs because their output is stored on the local disk(s) of the failed machine and is therefore inaccessible. Completed reduce tasks do not need to be re-executed since their output is stored in a global file system.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-6646070781440005837?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/6646070781440005837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=6646070781440005837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6646070781440005837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/6646070781440005837'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/distributed-system-notes-part-ii.html' title='Distributed system notes - Part II'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2168216515426451944</id><published>2009-06-08T05:11:00.000-07:00</published><updated>2009-06-08T05:31:31.880-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='distributed system'/><category scheme='http://www.blogger.com/atom/ns#' term='distributed clock synchronisation'/><category scheme='http://www.blogger.com/atom/ns#' term='mapreduce'/><category scheme='http://www.blogger.com/atom/ns#' term='virtulisation'/><title type='text'>Distributed system notes - Part I</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: small;"&gt;To be truly reliable, a distributed system must have the following characteristics:&lt;/span&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Fault-Tolerant: It can recover from component failures without performing incorrect actions.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Highly Available: It can restore operations, permitting it to resume providing services even when some components have failed.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Recoverable: Failed components can restart themselves and rejoin the system, after the cause of failure has been repaired.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Consistent: The system can coordinate actions by multiple components often in the presence of concurrency and failure. This underlies the ability of a distributed system to act like a non-distributed system.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Scalable: It can operate correctly even as some aspect of the system is scaled to a larger size. For example, we might increase the size of the network on which the system is running. This increases the frequency of network outages and could degrade a "non-scalable" system. Similarly, we might increase the number of users or servers, or overall load on the system. In a scalable system, this should not have a significant effect.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Predictable Performance: The ability to provide desired responsiveness in a timely manner.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Secure: The system authenticates access to data and services&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;8 Fallacies or assumptions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p align="center" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;ol style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The network is reliable.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Latency is zero.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Bandwidth is infinite.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The network is secure.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Topology doesn't change.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;There is one administrator.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Transport cost is zero.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The network is homogeneous. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Design principles&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;As Ken Arnold says: "You have to design distributed systems with the expectation of failure." Avoid making assumptions that any component in the system is in a particular state. &lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Explicitly define failure scenarios and identify how likely each one might occur. &lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Both clients and servers must be able to deal with unresponsive senders/receivers.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Think carefully about how much data HAVE to be sent over the network. Minimize traffic as much as possible.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Latency is the time between initiating a request for data and the beginning of the actual data transfer. Minimizing latency sometimes comes down to a question of whether you should make many little calls/data transfers or one big call/data transfer. The way to make this decision is to experiment. Do small tests to identify the best compromise.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Don't assume that data sent across a network (or even sent from disk to disk in a rack) is the same data when it arrives. Do checksums or validity checks on data to verify that the data has not changed.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Caches and replication strategies are methods for dealing with state across components. We try to minimize stateful components in distributed systems, but it's challenging. State is something held in one place on behalf of a process that is in another place, something that cannot be reconstructed by any other component. If it can be reconstructed it's a cache. Caches can be helpful in mitigating the risks of maintaining state across components. But cached data can become stale, so there may need to be a policy for validating a cached data item before using it.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;If a process stores information that can't be reconstructed, then problems arise as &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;single point of failure. &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To deal with this issue, &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Replication&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; strategies are also useful in mitigating the risks of maintaining state. But synchronizing multiple &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Replications&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; is another problem.There are a set of tradeoffs in deciding how and where to maintain state, and when to use caches and replication. It's more difficult to run small tests in these scenarios because of the overhead in setting up the different mechanisms.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Be sensitive to speed and performance. Take time to determine which parts of your system can have a significant impact on performance: Where are the bottlenecks and why? Devise small tests you can do to evaluate alternatives. Profile and measure to learn more.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Acks are expensive and tend to be avoided in distributed systems wherever possible.&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Retransmission is costly. It's important to experiment so you can tune the delay that prompts a retransmission to be optimal.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;h3 size="12pt"&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Fault tolerance&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Failure is the defining difference between distributed and local programming&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Since failure (either it is transient, intermittent or permanent&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;) is unavoidable in distributed system, (referring to &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;C&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;onsensus attack problem&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-weight: normal; "&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;). &lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Nowadays, problems are most often associated with connections and mechanical devices, i.e., network failures and drive failures.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Software residual bugs in mature systems can be classified into two main &lt;/span&gt;&lt;a id="h:05" href="http://en.wikipedia.org/wiki/Heisenbug#Heisenbug" title="categories" style="color: rgb(85, 26, 139); "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;categories&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Heisenbug: A bug that seems to disappear or alter its characteristics when it is observed or researched. A common example is a bug that occurs in a release-mode compile of a program, but not when researched under debug-mode. The name "heisenbug" is a pun on the "Heisenberg uncertainty principle," a quantum physics term which is commonly (yet inaccurately) used to refer to the way in which observers affect the measurements of the things that they are observing, by the act of observing alone (this is actually the observer effect, and is commonly confused with the Heisenberg uncertainty principle).&lt;/span&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Bohrbug: A bug (named after the Bohr atom model) that, in contrast to a heisenbug, does not disappear or alter its characteristics when it is researched. A Bohrbug typically manifests itself reliably under a well-defined set of conditions.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Types of failures that can occur in a distributed system&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Halting failures: A component simply stops. There is no way to detect the failure except by timeout: it either stops sending "I'm alive" (heartbeat) messages or fails to respond to requests. Your computer freezing is a halting failure.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Fail-stop: A halting failure with some kind of notification to other components. A network file server telling its clients it is about to go down is a fail-stop.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Omission failures: Failure to send/receive messages primarily due to lack of buffering space, which causes a message to be discarded with no notification to either the sender or receiver. This can happen when routers become overloaded.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Network failures: A network link breaks.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Network partition failure: A network fragments into two or more disjoint sub-networks within which messages can be sent, but between which messages are lost. This can occur due to a network failure.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Timing failures: A temporal property of the system is violated. For example, clocks on different computers which are used to coordinate processes are not synchronized; when a message is delayed longer than a threshold period, etc.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 1.5em; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Byzantine failures: This captures several types of faulty behaviors including data corruption or loss, failures caused by malicious programs, etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 15px; "&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To achieve fault tolerance, we normally apply redundancy to the system.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;nformati&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;on&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; redundancy - &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;replicating or coding the data.&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;For example, a Hamming code can provide extra bits in data to recover a certain ratio of failed bits. Sample uses of information redundancy are parity memory, ECC (Error Correcting Codes) memory, and ECC codes on data blocks.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Time&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; redundancy - &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;performing an operation several times. Timeouts and retransmissions in reliable point-to-point and group communication are examples of time redundancy. This form of redundancy is useful in the presence of transient or intermittent faults. It is of no use with permanent faults.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Physical&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; redundancy - &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;deals with devices, not data. We add extra equipment to enable the system to tolerate the loss of some failed components. RAID disks and backup name servers are examples of physical redundancy.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Active Replication - &lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;TMR &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(Triple modular redundancy)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Primary &amp;amp; backup, heartbeat is required periodically between servers.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Impossibility of the agreement&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Faulty communication channel - Referring to consensus attack problem&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Faulty distributed component - Byzantine General problem, agreement can be reached, but requires significant amount of additional nodes and messages transfer.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2168216515426451944?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2168216515426451944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2168216515426451944' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2168216515426451944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2168216515426451944'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/distributed-system-notes-part-i.html' title='Distributed system notes - Part I'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-1621469769137720277</id><published>2009-06-04T02:09:00.000-07:00</published><updated>2009-06-04T14:44:57.406-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='virtulisation'/><category scheme='http://www.blogger.com/atom/ns#' term='multi-cloud'/><title type='text'>Cloud, cloud and cloud</title><content type='html'>&lt;div&gt;Cloud computing, so called the third revolution of IT industry. It is really interesting to see how the research initiatives rolling into commercial world producing one generation after another products. I remember the first time I came across cloud computing is about 8 years back a buzz word gave me very fuzzy warm feeling but meant absolutely nothing at that time. Here we go, truth to be told, we are really good at exploring! In fact, many similar or related concepts have been around for quite a while, i.e. cluster, grid computing, SaaS, etc. It is good to see all these confusion names finally start to make sense to my simple mind :-).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Based on virtulisation or distributed file system, many organisations took the initiative by allowing the access of applications from any place where you have a browser - moving from desktop-oriented client side application to services supplied from server side plus a lightweighted UI presentation, most likely via a browser. I guess companies such as Google and SalesForce do not have this problem as they do not particularly need to worry about the existing investment; they started fresh. Thus the products (in the cloud) from Google and SalesForce are much more straightforward. Google does not seem to be a big believer in virtulisation, which is the path many companies like VMWare, Citrix and even Amazon took. I have always thought that adopting virtulisation or not, itself does not necessary have anything to do with Cloud computing. Virtulisation is simply an approach of supporting the infrastructure which could be used for providing cloud-based service, or not. Later in this blog you will see, as far as I am concerned, the only company seems to figure it out and spit it out is Cisco. What we could not ignore is the fact that there are more companies from virtulisation background smelling the competition than the ones whose main interests are in cluster or grid computing. The other important thing is the available support for service developers. One thing is clear is that apart from some very generic services (if there are still some), it is likely that service template requires customerisation and tailoring to suit for individual user (business). To allow this to happen, either the cloud service provider takes on all responsibility of customerising for each individual, or the cloud service provider gets clever and tricks the (arrogant :)) user to develop his own services based on suppored APIs, via appropriate development tools. The other option is, as companies like Amazon does, to team up with traditional software suppliers such as Oracle, IBM, to deploy standard software via virtulisation. This could satisfy some of the customers today, but surely is not a scalable solution by just reusing the existing products.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I quoted the definition from Wikipage here as a &lt;a href="http://en.wikipedia.org/wiki/Cloud_computing"&gt;nice introduction&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;"Cloud computing is a style of computing in which dynamically scalable and often virtualized resources are provided as a service over the Internet. Users need not have knowledge of, expertise in, or control over the technology infrastructure in the "cloud" that supports them.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The concept incorporates infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS) as well as other recent technology buzzwords that have the common theme of reliance on the Internet for satisfying the computing needs of the users. Cloud computing services usually provide common business applications online that are accessed from a web browser, while the software and data are stored on the servers."&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok, as usual, I am trying to summarise some of the major players in the market, and willingly or unwillingly, in this race.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Amazon &lt;/span&gt;- Amazon has to take the number one seat in this race. There is a lot to be said about EC2, S3, Simple DB and couple of new services offerings like CloudFront and SQS. Amazon started from trying to make the most of its data center computing capacity and also trying to integrate many of its web services. Luckily, because within their design, every development project is to deliver a service, so it starts from a more or less easy ground. There are already a lot of commercial adoption of either low level storage S3 service or application level EC2 service. Amazon has a very well-plotted pricing model as well which I think is a key element. However, my feeling about Amazon is a little too much on the details. For example, Amazon made its elastic MapReduce and SimpleDB as standard purchasable services as well. It is kinda confusing because there is a clear difference between development support and commericial product or service. I doubt there will be any direct real commercial value on such services. Having said that, the API support to most of the services are great. They are well defined and support different standard development IDE. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Google &lt;/span&gt;- As I said before, Google is a lucky boy who had a fresh start. Who knows, maybe Google is the one who kicked this off. Google App Engine certainly is a polite while huge punch to its competitors. While I was thinking, I am sure many of us were as well, what Google's next step would be, after some great (beta) products such as Gmail, Google maps, Search engine of course, and Google office suite. It wasn't that intuitive, for me at least, to see through the mesh and got a grip on Google's intention, if they had a clear one in the first place :-). Now it seems much clearer - Google has first delivered those good individual product/service on the infrastructure which was built in with scalability and flexibility in mind (a cloud); then Google wasn't shy of exposing what it has to the public of what make it possible for them to build their services, the infrastructure. Hence we are reading all these papers about mapreduce, playing with google app engine, trying to figure out what big table is all about, and its distributed file system. So till now, Google seems to have its camp set. On one hand they provide some of the best services based on the cloud; on the other hand, via GAE, the support and possibility to develop your own service is immense. Although one thing I would say here is that the building blocks available for commercial usage might be a little too lower level compared with those offered from companies such as SalesForce and Intuit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Salesforces&lt;/span&gt; - This must be one of the most popular buzz word in your sales and marketing people around you. If it is, consider yourself lucky! Because it is eventually the way to go, I am convinced. Salesforce has a clear ground to take off, that is online CRM system. Instead of relying on individual unreliable in house CRM system (esp. for small and medium size businesses), you give it up to Salesforce. Very well designed CRM service template, from what I can tell. Its commitment in providing development support is also pretty strong as Force.com and AppExchange. More recently, Salesforce has teamed up with Google to integrate applications and services developed on Google app engine, and easy deployment onto Salesforce platform. However, one thing I still can not get over my mind is the security of the data as nature of the business, one thing I did not see Salesforce stress hard enough as Cisco did.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Microsoft &lt;/span&gt;- Azure. I have briefly covered the layers in Azure in my &lt;a href="http://hegallis.blogspot.com/2009/06/vs2010-and-net-40-beta-first-taste.html"&gt;previous blog&lt;/a&gt; as a section of introducing support from VS2010 to services development and deployment in Azure cloud. It does look like Microsoft has thrown a lot of cash in Azure, even though the development of it does not seem to match the expectation quite well. Azure has reasonably well-defined layers as described before, and an ambition of providing the similar level of services as Microsoft did on desktop world. Azure is targetting at providing a software infrastructure to support services and applications which will be deployed in microsoft cloud. It aims to allow enterprise web services or individual websites to run in the cloud. Of course this includes the standard services provided from Microsoft itself such as Office suite, SharePoint, Exchange and CRM software in the cloud. The strength here is definitely the development support, from well built up developer community to available framework building blocks as .Net.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Oracle &lt;/span&gt;- Coming from Grid Computing background, Oracle offers Real Applications Clusters (RAC), Automatic Storage Management (ASM), and Storage Grid. In September 2008, Oracle introduced new offerings that allow enterprises to benefit from the developments taking place in the area of Cloud Computing. The initial strategy is to team up with Amazon Web Services (AWS) to offer services in the cloud, rather than propel their own cloud service platform.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;VMWare &lt;/span&gt;- Virtulisation in the Cloud or Cloud in the virtulisation? VMWare focues on how to utilise or change the way IT resources are consumed in organisations. One of their goals I believe is to ease the management of those available built-in resources.  Their target is at companies who want to invest in their IT infrastructure, e.g. private clouds. Main products are vSphere and vCenter, providing server and hardware management and interface to support application deployment respectively. vCloud API is in Beta at this point of time.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Citrix &lt;/span&gt;- C3. Citrix is another player who heavily relys on its virtulisation background and Xenserver. I had always suspected that whether the taking over of open source Xen is one of the strategic step Citrix took. However, Citrix has taken a quite awkward position in this market as some other do as well. It has not quite clearly yet identify itself as either an infrastructure supplier as Cisco is or a cloud service provider as Amazon is or even as VMWare is, targetting at building private cloud for enterprises who has IT resources need to be properly managed and deployed. Although practically, its reference product strcuture is a little similar to VMWare.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Yahoo &lt;/span&gt;- One of the pioneers in developing Hadoop. They have a few different applications but still yet not able to unleash a complete and unified cloud platform, even though Yahoo has claimed to do so back in mid 2008. I think it is still in Yahoo research territory and not mention developer APIs. Yahoo has teamed up with Intel and HP to proceed further research on this. Maybe it is sign of lacking innovation in all three businesses but it is certainly interesting to see what will come out from this strong combination.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;IBM &lt;/span&gt;- Computing on Demand (CoD). Well, I would rather call it a solution than a clear-cut product. Not obviously, but if you can see through all marketing campaign, IBM is taking the similar route as Oracle, teaming up with Amazon to deploy their traditional applications in EC2. Quite frankly, I donot think IBM has quite figured it out yet as where it wants and could place itself in this emerging market, and what is the strength, what its product portfolio looks like. Whether it is going to be a virtulisation based solution to provide supercomputing facility, or rooting from IBM's background as application specific cluster or grid solution, IBM seems to be still exploring. Nothing wrong with deep computing, in fact that is a unique strength. If IBM can hold on to this strength and exploit in some very specific areas, then I am sure good products will eventually come out, only not too late! IBM team has released a plugin on Eclipse to support development for Hadoop. Other than that, as far as I can tell, there is a little in developerWorks for cloud support.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Sun&lt;/span&gt; - Now part of Oracle, Sun offers its virtulisation (xVM Virtual Box) and very strong product background in data storage and modular data center to provide infrastructure level of cloud computing support. With the purchase earlier in 2008 of MySQL and Qlayer, whose strength is to automate the deployment and management of both public and private clouds, Sun seems to secure its position in provide support to the 'bone' of cloud computing, with some of its own services too, including Open Solaris. I am sure Oracle bought Sun for many many good and right reasons, but it would be interesting see how this part commitment is developed over the next 6 months.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Cisco &lt;/span&gt;- A clear thinker in this game. One thing impressed me is that after a few months snooping around, Cisco's positioning strategy and product offering has a much clearer focus. Cisco claimed its plan to supply infrastructure to enable others to offer cloud-based services, rather than becoming one itself - a wise move from Cisco, my opinion. It is not Cisco couldn't do it. They did release a secure and scalable de facto standard system all right - Cisco WebEx Collaboration Cloud. "Bring the Cloud down to earth" is a mark form Cisco. Behind this strategy, there is a logic thinking - Cisco believes that the first wave of cloud computing is to deliver various business services as cloud-based such as salesforce, as opposed to desktop applications; however, the mid- to long term path would really to enable "workload portability", i.e. reuse of data centers from other providers. There are huge markets there for products to support the infrastructure, designated cloud, cloud management etc. Interestingly, with people like James Urquhart's taking on the role of Marketing Manager/Technology Evangelist for Data Center Virtualisation at Cisco, I am very interested to see Cisco's Cloud Computing and Data Center 3.0 strategy to pan out. So far Cisco is still quite in the clique of virtualization apparently.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Smaller players are catching up very fast in the meantime.&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Intuit &lt;/span&gt;- Similar to Saleforces, Intuit came up with a well polished CRM service and financial service (Quickbook) in the cloud. Its recently published Quickbase would be another major attempt to win the developers over. The strength is that Intuit has a very clear focus point in the finance and CRM sector where it clearly has good understanding of the workflow hence able to provide suitable service template. However, what is still not clear to me is that whether Intuit is really just one tail pony, and not that different to a transformed portal service provider. Also whether it can afford the data center and sustainable backend services in the long term is still yet to be seen.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.rightscale.com/"&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;RightScale&lt;/span&gt;&lt;/a&gt;, with former CEO from MySQL on board, I think they are coming out pretty strong. RightScale is in the stage deploying a lot of backend servers. From what it looks like is that they are determined to be the cloud service provider themselves. There is one partiluar unique selling point for RightScale is that it doesn’t lock you in to any single cloud provider; instead, RightScale took the route of integrating with multi-cloud and hybrid cloud strategies, which more and more new players start to focus on. RightScale claimed to support Amazon Web Services, GoGrid, FlexiScale, and Eucalyptus at the moment and has a plan to add support for Rackspace and Sun Microsystems cloud very soon. I think their strength is in their automation engine which makes management possible on multi-cloud infrastructure and well designed cloud deployment templates.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;There are a few other smaller players (Rackspace,&lt;a href="http://www.eucalyptus.com/"&gt;Eucalyptus&lt;/a&gt;, &lt;a href="http://aptana.com/cloud"&gt;Aptana&lt;/a&gt;, etc.) although they are coming up very strong. Also, more and more companies are combining efforts together to integrate with each other's solution. Just while I am writing this script, Oracle has released Gadget Wizard for Google Apps and support for Google's Secure Data Connector™ with the debuts of Siebel CRM support for Google Apps. I think with the right team and approach, this battlefield is still quite open and anything could happen! &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-1621469769137720277?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/1621469769137720277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=1621469769137720277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1621469769137720277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1621469769137720277'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/cloud-cloud-and-cloud.html' title='Cloud, cloud and cloud'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-2010494925267014408</id><published>2009-06-03T04:03:00.000-07:00</published><updated>2009-06-06T16:26:49.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallel programming'/><category scheme='http://www.blogger.com/atom/ns#' term='.net 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='WF'/><title type='text'>VS2010 and .Net 4.0 Beta 1 - first taste!</title><content type='html'>&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel programming&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        Just to be clear, similar to parallel python, JavaSpaces, this package is a MS way of dealing with multi-core age.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd460717(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Task Parallel Library (TPL)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - Basic abstraction is &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Task&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (Tasks &lt;&gt; Threads). &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;System.Threading.Parallel, System.Threading.Tasks&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;These types rely on a new &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Task Scheduler&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (replacing Task Manager in previous drops) that is integrated with the .NET ThreadPool. &lt;/span&gt;&lt;/span&gt;&lt;a id="d:bl" href="http://msdn.microsoft.com/en-us/magazine/cc163340.aspx" title="Here" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Here&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is a good summary from MS.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;For example, Parallel.For() will automatically partitions the work into tasks based on the number of processors on the machine. Parallel class provides method-based parallel implementations of &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;for &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;foreach &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;loops. (In &lt;/span&gt;&lt;/span&gt;&lt;a id="fu6e" href="http://msdn.microsoft.com/en-us/library/dd537608(VS.100).aspx" title="data parallel operations" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;data parallel operations&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; , the source collection is partitioned so that multiple threads can operate on different segments concurrently.) When a parallel loop runs, the TPL partitions the data source so that the loop can operate on multiple parts concurrently. Behind the scenes, the &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;T&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ask Scheduler&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; partitions the task based on system resources and workload. When possible, the scheduler redistributes work among multiple threads and processors if the workload becomes unbalanced. (You can control each involved thread's state via &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ParallelState&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.). Here I stole an image from &lt;/span&gt;&lt;/span&gt;&lt;a id="klii" href="http://aviadezra.blogspot.com/2009/04/task-parallel-library-parallel.html" title="Aviad" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Aviad&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div id="gcb:" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_447fk8mzgx_b" style="width: 648px; height: 267.531px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;By using &lt;/span&gt;&lt;/span&gt;&lt;span class="nolink"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel.Invoke&lt;/span&gt;&lt;/span&gt;&lt;span class="nu"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;() to &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;invoke any number of asynchronous, concurrent operations with a single method call.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Manipulate the &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Task&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; explicitly.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Apparently, you can write your own &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Task Scheduler or Partitioner &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;if you are really keen at &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;scheduling&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd460688(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel LINQ (PLINQ)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; for .NET - A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; parallel implementation of LINQ to Objects, ParallelEnumerable vs. IEnumerable.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;PLINQ runtime library analyses the overall structure of the query whether it is likely to yield speed by parallelism. PLINQ partitions the source sequence into tasks that can be run concurrently. If it is not safe to parallelize a query, PLINQ simply runs the query sequentially.You can use the &lt;/span&gt;&lt;/span&gt;&lt;span class="nolink"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;WithExecutionMode&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; method to instruct PLINQ to select the parallel algorithm.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel Performance Analyzer&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; in Visual Studio Team Server can be used to compare the performance of various queries, to locate processing bottlenecks, and to determine whether your query is running in parallel or sequentially.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;In sequential LINQ queries, execution is deferred until the query is enumerated either in a &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;foreach&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; loop or by invoking a method such as &lt;/span&gt;&lt;/span&gt;&lt;span class="code" style="color: rgb(0, 0, 102); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ToList&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class="code" style="color: rgb(0, 0, 102); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ToArray&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; or&lt;/span&gt;&lt;/span&gt;&lt;span class="code" style="color: rgb(0, 0, 102); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ToDictionary&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. In PLINQ, &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;foreach&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; itself does not run in parallel and it therefore requires that the output from all parallel tasks be merged back into the thread on which the loop is running. In PLINQ, you can use &lt;/span&gt;&lt;/span&gt;&lt;span class="code" style="color: rgb(0, 0, 102); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;foreach&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; when you need to preserve the final ordering of the query results. For faster query execution when order preservation is not required and when the processing of the results can itself be parallelized, use the &lt;/span&gt;&lt;/span&gt;&lt;span class="nolink"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ParallelEnumerable.ForAll&lt;/span&gt;&lt;/span&gt;&lt;span class="nu"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; method to execute a PLINQ query without performing final merge step.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel query CAN be cancelled. (Thanks God for that!). It could be done via &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;WithCancellation&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; method and &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CancellationTokenSource &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;class.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Aggregated Exceptions (&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To catch exceptions thrown from user code via PLINQ, you must uncheck the "Enable Just My Code" checkbox under &lt;/span&gt;&lt;/span&gt;&lt;span class="label"&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Tools, Options, Debugging, General&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Concurrency debugging and profiling tools&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;New Parallel Stacks window and Parallel Tasks window. Of course Task is another level on top of thread, I find these windows are useful if you are really interested in Task &lt;-&gt; Thread relationship in run time, and a very good visual tree presentation of all threads. Unfortunately, you can't &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;freeze &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;a Task. Here is a nice &lt;/span&gt;&lt;/span&gt;&lt;a id="szad" href="http://msdn.microsoft.com/en-us/library/dd554943(VS.100).aspx" title="walkthrough" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;walkthrough&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;a id="d_8x" href="http://msdn.microsoft.com/en-us/library/dd164415.aspx" title="Visual Studio Team System Developer Edition Profiling Tools" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Visual Studio Team System Developer Edition Profiling Tools&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. Very nice set of tools to create performance profile for your applications. No need for external tool such as IBM Rational PurifyPlus. You can profile CPU timing, memory usage and even able to look at the locking time among different threads. Also, a nice report plugin can make the managers happy too, which is always a bonus :). With built-in code metrics and analysis tool. It looks like MS is finally taking coding seriously. The dependency walker has finally evolved into 21st century - a nice tree structure, by assembly, namespace and class. I do hope &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CLRProfiler &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;is going to be supported still though. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Coordination Data Structures&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;System.Collections.Concurrent&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, the one I have been long waiting for! You don't have to worry about locking for using generics as it was in previous versions. &lt;/span&gt;&lt;/span&gt;&lt;a id="ujzj" href="http://msdn.microsoft.com/en-us/library/dd460684(VS.100).aspx" title="This" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is how easy to implement a standard P&amp;amp;S. There are also concurrent queue, stack, FIFO, Dictionary classes available.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The new synchronization primitives in the &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;System.Threading&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; name-space enable fine-grained concurrency (spinlock) and faster performance by avoiding expensive locking mechanisms found in legacy multi-threading code. New types such as &lt;/span&gt;&lt;/span&gt;&lt;span class="input"&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Barrier&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; and &lt;/span&gt;&lt;/span&gt;&lt;span class="input"&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CountdownEvent &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;are very useful. It starts to get clearer that as a developer, you are encourage to draw the picture of multiple concurrent running streams in mind and really sure about the dynamic data flows.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;With lazy initialization, the memory for an object is not allocated until it is first accessed. Lazy initialization can improve performance by spreading object allocations evenly across the lifetime of a program. You can enable lazy initialization for any custom type by wrapping the type &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Lazy&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="nu"&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;T&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="nu"&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. You can use &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;LazyExecutionMode to specify the initialisation needs further&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;span style="color: rgb(85, 85, 85); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Office Development&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(85, 85, 85); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;You can now create either document-level or application-level project for MS Office suite within VS IDE. Supposedly you have to be familiar with different Object Model in various office applications such as Excel, Word, Visio etc. (For long time, I have always wanted to be able to reuse some nice features built in Visio elsewhere. However this was very difficult until VS2008 (well, not before MS publishes Visio interop assembly reference documentation.) ) Kiss goodbye to the old VBA and macroes!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;a id="n_vy" href="http://msdn.microsoft.com/en-us/library/dd504870(VS.100).aspx" title="Concurrency runtime (ConcRT)" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Concurrency runtime (ConcRT)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  is &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;a concurrent programming framework for C++.&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; Here is an image from MSDN.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd492627(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Asynchronous Agents Library&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; and the &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd492418(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parallel Patterns Library (PPL)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; for C++. The use of which are very similar to TPL and concurrent data collections available for C#.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd465215(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;C++0x features&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd293608(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;lambda functions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, move-semantic &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd293668(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;rvalue references&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, the new &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/6k3ybftz(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;auto&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd537655(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;decltype&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, and the ever-helpful &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd293588(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;static_assert&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="f:cv" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_46d4fsp8gv_b" style="width: 416px; height: 233px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Azure cloud development&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; - With &lt;/span&gt;&lt;/span&gt;&lt;a id="br20" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=b44c10e8-425c-417f-af10-3d2839a5a362" title="Azure cloud development kit" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Azure cloud development kit&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. You will have to move to at least Vista SP1 though, which is NOT a good release!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        Visual studio 2010 comes with many tools to support apps development, build and deployment on different layers, via individual SDK for various &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Services&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A bit of background on Azure cloud from MS:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Layer zero&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (not on this slide) is Microsoft’s Global Foundational Services. GFS is the lowest level of the software that interfaces directly with the servers.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Layer one&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is the base &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Azure operating system&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. This is what used to be codenamed Red Dog. Red Dog was designed by a team of operating-system experts at Microsoft, led by &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.microsoft.com/presspass/exec/srivastava/default.aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Amitabh Srivastava,&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; Dave Cutler, father of VMS and Windows NT, focusing heavily on how the hypervisor/virtulisation technology could be made to scale across datacenter servers. Red Dog, a Microsoft-hosted cloud, consists of Storage (like a file system), a management system for modeling/deploying and provisioning, virtualised computation/VM, and a development environment, which allows developers to emulate Red Dog on their desktops and plug in Visual Studio, Eclipse or other tools to write cloud apps against it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Layer two&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is the set of building block services that run on top of Azure. Developers are not required to use these services and will be able to mix and match among them. The initial set of services include &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Live Services&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (the Live Mesh platform), &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SQL Server Data Services&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;a id="jdki" href="http://msdn.microsoft.com/en-us/magazine/dd569759.aspx" title=".Net Services" style="color: rgb(85, 26, 139); "&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.Net Services&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, SharePoint Services and Dynamics CRM Services&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. Developers will be able to build on top of these lower-level services when constructing cloud apps. (&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Windows Strata = Azure platform = Layer one + Layer two&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Layer three&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; are the Azure-hosted applications, i.e. SharePoint Online, Exchange Online, Dynamics CRM Online.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div id="nb45" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_45gbgddqhp_b" style="width: 648px; height: 302.167px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Extension for WCF &amp;amp; WF&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(8, 8, 8); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Service discovery - To discover the available services on the network seems to be easiest extension step to take.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(8, 8, 8); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Built-in tracking and monitoring &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(8, 8, 8); "&gt;&lt;a id="kz-s" href="http://msdn.microsoft.com/en-us/library/dd851337.aspx" title="Workflow Designer Programming Model" style="color: rgb(85, 26, 139); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Workflow Designer Programming Model&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; . I copied a couple of workflow models here. As you will find out, VS 2010 is pretty good at providing a visual presentation of a workflow, as long as you are clear about it yourself :)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div id="zti." style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="hm.i" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_48d2vh8pt7_b" style="width: 578px; height: 388px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="zti." style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_4753dj3tcz_b" style="width: 578px; height: 432px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="zti." style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="iz.-" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_49c6h4x4gq_b" style="width: 501px; height: 420px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="iz.-" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="m404" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_50g387f5gg_b" style="width: 578px; height: 440px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="m404" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div id="jmep" style="text-align: center; margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://docs.google.com/File?id=dgts3pwm_51vh986pdf_b" style="width: 600px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;ul style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;li style="margin-top: 0px; margin-bottom: 0px; "&gt;&lt;span style="color: rgb(51, 51, 51); "&gt;&lt;b style="margin-right: 0px; margin-left: 0px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;functional programming - &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;the &lt;/span&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd553242(VS.100).aspx" style="margin-right: 0px; margin-left: 0px; text-decoration: none; color: rgb(38, 94, 21); "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;F# programming language&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. (I simply have not got up to speed with MS functional language as yet!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;After this blog was first written, I have picked more and more nice things. I can not go over all of them but I will try to update this list as I go along.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;- Dynamic type, which allows you to declare type to be resolved at runtime. This finally enables MS stuff like C#, VB can talk to others like Python, Ruby etc. via DLR.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;- IDE extension. MS started to emphasize the IDE open extentibility from VS2008 based on add-in style. VS2010 introduced MEF and &lt;a href="http://demodashboard.codeplex.com/"&gt;Dashboad&lt;/a&gt; is just so coooool. It even intergrated with Twitter.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-2010494925267014408?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/2010494925267014408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=2010494925267014408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2010494925267014408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/2010494925267014408'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/06/vs2010-and-net-40-beta-first-taste.html' title='VS2010 and .Net 4.0 Beta 1 - first taste!'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8212383925372306637</id><published>2009-05-20T06:31:00.000-07:00</published><updated>2009-05-21T04:21:49.798-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mock object for embedded C'/><category scheme='http://www.blogger.com/atom/ns#' term='Rhino'/><category scheme='http://www.blogger.com/atom/ns#' term='Googlemock'/><category scheme='http://www.blogger.com/atom/ns#' term='mock object'/><category scheme='http://www.blogger.com/atom/ns#' term='unit test for embedded C'/><title type='text'>Mockup short survey</title><content type='html'>&lt;div&gt;If you are a completely stranger to mock object concept, wiki page is a good &lt;a href="http://en.wikipedia.org/wiki/Mock_object"&gt;start&lt;/a&gt;! When and how to use mock object is as much a coding issue as a design choice. Things will get more tricky when the interdependence's among various components and third party APIs where the visibility is usually not ideal. You may also want to make sure the mock object can be easily replaced later stage by the real implementation. There is a general mix up that test framework is equivalent to mock objects, or offers mock up facilities. First thing is that is so not true although you might naturally decide to test your production code by creating some mock ups when those implementations from the other lazy boy do not turn up on time. In this sense, mock objects could be part of test harness definition. I have always believed that we should separate the mock object themselves from test framework as much as possible. Otherwise, you will be in the middle of confusions between test logic, mockup logic and production code fairy easily.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Here, I will only go through a few off-the-shelf mock object packages for different languages. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C++: &lt;a href="http://code.google.com/p/googlemock/"&gt;Googlemock&lt;/a&gt;, Not surprisingly, I typed "GMock" in google when I started this blog. As I thought it is safely to assume that there is nothing those people do not do. After some internal tips, Goolgemock eventually joined my starred projects. Googlemock is quite tightly bound with Googletest which I talked a bit in previous &lt;a href="http://hegallis.blogspot.com/2009/04/c-test-framework.html#links"&gt;blog&lt;/a&gt;. Although in the latest release, it seems to break this dependency. Googlemock is pretty much based on expectation model by setting up the expected call results and validating later in the logic code. Just as a comparison, &lt;a href="http://mockpp.sourceforge.net/"&gt;Mockcpp&lt;/a&gt; is a typical recall&amp;amp;replay model implementation. the reason I am not a particular fan of Mockcpp is that it confuses itself what it is from start, a test framework or mock objects package, or both?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C#: &lt;a href="http://ayende.com/projects/rhino-mocks.aspx"&gt;Rhino&lt;/a&gt; mocks originates from &lt;a href="http://sourceforge.net/projects/easymocknet/"&gt;EasyMock.Net&lt;/a&gt; which was a pure recall&amp;amp;replay mocking model. Rhino mocks integrates the RR model with expectation model which &lt;a href="http://www.nmock.org/"&gt;NMock&lt;/a&gt; heavily relies on. One plus for me is that Rhino mocks seems to be quite independent to any test framework while NMock is normally used together with NUnit test framework. There is a simple &lt;a href="http://swik.net/Mock-Object-Frameworks-Comparison"&gt;comparison&lt;/a&gt; for some of the popular mock up schemes in .Net.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C: It is not that straight forward to adopt this concept to traditional C world and embedded system development. The group in &lt;a href="http://www.atomicobject.com/pages/Embedded+Software#MockingEmbeddedWorld"&gt;Atomic object&lt;/a&gt; has definitely made some marks here by introducing Unity (an embedded unit test framework for C) and &lt;a href="http://apps.sourceforge.net/mediawiki/cmock/index.php?title=CMock_-_C_Mock_Module_Generation_Framework"&gt;CMock&lt;/a&gt; to the embedded world, and also nice Eclipse plugins to make people like me life easier. So Kudos to Atomic!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8212383925372306637?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8212383925372306637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8212383925372306637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8212383925372306637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8212383925372306637'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/05/mockup-survey.html' title='Mockup short survey'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8886930006579270412</id><published>2009-05-14T03:57:00.000-07:00</published><updated>2009-06-03T08:48:17.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RTAI'/><category scheme='http://www.blogger.com/atom/ns#' term='Xenomai'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time linux'/><category scheme='http://www.blogger.com/atom/ns#' term='RT patch'/><category scheme='http://www.blogger.com/atom/ns#' term='scheduling'/><title type='text'>Linux real time kernel scheduling</title><content type='html'>&lt;div&gt;&lt;/div&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;While I am &lt;a href="http://elib.uni-stuttgart.de/opus/volltexte/2008/3643/pdf/DIP_2749.pdf"&gt;working&lt;/a&gt; on a real time design on TCP/IP protocol stack, I have the chance to clear the thread of real time scheduling capability on Linux 2.6 kernel and its variants. With O(1) scheduling and real time priority (0 - 99) task and scheduling policy support, standard Linux 2.6 kernel offers soft real time scheduling capability. The defer of the bottom half of interrupt also minimises the interference (delay) to scheduler via softirq and tasklet. I really like the double priority list (active and expired) design in the runqueue where the O(1) scheduling comes from and time slicing calculation, independent to the number of process in the run queue (and wait queue).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="http://www.captain.at/howto-linux-real-time-patch.php"&gt;RT patch&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;There is a &lt;a href="http://lkml.org/lkml/2005/6/22/347"&gt;hardcore test&lt;/a&gt; to prove &lt;a href="http://www.kernel.org/pub/linux/kernel/projects/rt/"&gt;Ingo's contribution&lt;/a&gt;. There are many detailed &lt;a href="http://www.opentux.nl/artikelen/t-dose2006.klaas.realtime.pdf"&gt;analysis&lt;/a&gt; of Real time Linux patch. This patch is maintained by Ingo Molnar, who is responsible for many other nice features in 2.6 kernel including O(1) priority and time slice calculation, CFS scheduler etc. In a nutshell, RT patch implemented both hard and soft interrupt service function as tasks. Hence instead of running in separate interrupt context, they will be running in kernel task context. RT patch also changed the spinlock from disabling preemption to mutex and introduce localised critical section. Priority inheritance is used to resolve the typical priority inversion problem. Again, this patch is known providing soft real time scheduling, with the best efforts.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;RTAI:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255); font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;RTAI (Real-Time Application Interface) is a real-time extension for the Linux kernel. It supports several architectures:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li style="text-align: left;"&gt;x86 (with and without FPU and TSC)&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;x86-64&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;PowerPC&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;ARM (StrongARM; ARM7: clps711x-family, Cirrus Logic EP7xxx, CS89712, PXA25x)&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: left;"&gt;MIPS&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;RTAI provides deterministic response to interrupts, POSIX compliant and native RTAI real-time tasks. It consists mainly of two parts:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;An Adeos-based patch to the Linux kernel which introduces a HAL (hardware abstraction layer)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A broad variety of services which make real-time programmers' lives easier. RTAI does provide implementations for scheduling policies as &lt;a href="http://www.cs.ru.nl/lab/rtai/exercises/9.RMS-EDF/Exercise-9.html"&gt;RMS&lt;/a&gt;, and EDF other than the standard ones offered by Linux 2.6 kernel such as SCHED_FIFO, SCHED_RR, SCHED_OTHER (where dynamic priority scheduling is enabled). SCHED_FIFO and SCHED_RR are normally used for real time tasks which are both static priority scheduling and both do not allow lower priority tasks to preempt higher priority ones, even when allocated time slices are exhausted (in SCHED_RR case). RTAI has a finer timer and also introduces a real time (non-blocking) FIFO for deterministic data transfer between tasks. The heart of RTAI implementation is the HAL layer between Linux kernel and different hardware, which makes this layer very much platform-dependent. The other arguable feature introduced by RTAI is allowing user space tasks to be scheduled via LXRT interface to achieve hard real time performance. It was reported that RTAI is integrated most desirable with Vanilla kernel (2.6.19).&lt;/li&gt;&lt;li&gt;&lt;a href="http://linuxdevices.com/articles/AT9847654820.html"&gt;Here &lt;/a&gt;is a good example project to start from. If you wish to carry out a quantative comparison of how much boost RTAI brings to you, &lt;a href="http://www.linuxdevices.com/articles/AT3479098230.html"&gt;this post&lt;/a&gt; gives a few bench mark measurements. Just in case, I put the &lt;a href="https://www.rtai.org/RTAICONTRIB/RTAI_Installation_Guide.pdf"&gt;installation guide&lt;/a&gt; here as well. To port your existing Linux programs to take advantage of RTAI, you might want to start from &lt;a href="http://people.mech.kuleuven.be/~psoetens/portingtolxrt.html"&gt;LXRT APIs&lt;/a&gt;. At last, if you want a quick summary to take away, &lt;a href="http://www.cse.iitd.ernet.in/~suban/csl373/A5/RTOS/rtos.pdf"&gt;here&lt;/a&gt; is your PPT. With a worse case report at 48 us scheduling latency and jitter in the range of 10's microseconds on its LXRT branch, RTAI is my favorite.&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Xenomai:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Originally from RTAI/fusion branch, Xenomai focuses on extensibility, portability, and maintainability while RTAI is focused on performance such as real time scheduling, latencies, etc. A good comparison article could be found here.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Supported architectures are:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;x86: from i386 to latest Pentiums and AMD's, UP and SMP&lt;br /&gt;&lt;/li&gt;&lt;li&gt;x86_64&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PowercPC (follows DENX tree):&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Freescale family: PowerQUICC I, PowerQUICC II, PowerQUICC III, ..&lt;br /&gt;&lt;/li&gt;&lt;li&gt;AMCC family: 405, 440, ..&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PowercPC 64 (follows DENX tree):&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PA6T&lt;br /&gt;&lt;/li&gt;&lt;li&gt;IA64 (discontinued since v2.5)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ARM cores:&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Integrator/CP ARM 1136&lt;br /&gt;&lt;/li&gt;&lt;li&gt;PXA&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SA1100-based&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Freescale iMX21/csb535fs&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Atmel at91rm9200 (tested on CSB637)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Samsung S3C24xx&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Intel ixp4xx&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Atmel at91sam926x&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Motorola i.MX family&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Analog Devices Blackfin BF52x, BF53x, BF54x and BF56x&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;I do like the &lt;a href="http://www.rts.uni-hannover.de/images/b/b3/ELROB_TechnicalPaper_RTS_University_of_Hannover.pdf"&gt;robot project&lt;/a&gt; from Hannover. A good serial port driver comparison between RTAI and Xenomai is available on &lt;a href="http://www.captain.at/review-rtai-versus-xenomai.php"&gt;Capitain&lt;/a&gt;. The other major focus of the Xenomai project is to help creating emulators of traditional RTOS APIs that ease the migration from these systems to a GNU/Linux-based real-time environment. As of now, the following real-time interfaces&lt;/div&gt;&lt;div style="text-align: left;"&gt;are available:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;pSOS+ emulator&lt;br /&gt;&lt;/li&gt;&lt;li&gt;VRTXsa emulator&lt;br /&gt;&lt;/li&gt;&lt;li&gt;VxWorks emulator&lt;br /&gt;&lt;/li&gt;&lt;li&gt;uITRON implementation&lt;/li&gt;&lt;/ul&gt;I could really see Xenomai playing an interesting role in the real time virtulisation applications rather than providing powerful generic emulation interfaces for multiple RTOSes. Minute virtual machine in Xenomai comes with a graphical debugger named Xenoscope that allows tracing the execution of real-time software at source code level in a simulated environment. This tool shows precisely how the multiple threads running in the system work together sharing the resources of a given real-time interface (e.g. who is locking a semaphore, which thread has been readied or suspended by a given system call, and so on).&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: center;"&gt;-------------------------&lt;/div&gt;&lt;div style="text-align: center;"&gt;- Real time application  -&lt;/div&gt;&lt;div style="text-align: center;"&gt;-------------------------&lt;/div&gt;&lt;div style="text-align: center;"&gt;-     RTOS emulators     -&lt;/div&gt;&lt;div style="text-align: center;"&gt;-------------------------&lt;/div&gt;&lt;div style="text-align: center;"&gt;-  Xenomai nanokernel  -&lt;/div&gt;&lt;div style="text-align: center;"&gt;-------------------------&lt;/div&gt;&lt;div style="text-align: center;"&gt;-   Host software arch    -&lt;/div&gt;&lt;div style="text-align: center;"&gt;-      (e.g. RTAI-x86)      -&lt;/div&gt;&lt;div style="text-align: center;"&gt;-------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RTLinux (To be updated)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8886930006579270412?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8886930006579270412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8886930006579270412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8886930006579270412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8886930006579270412'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/05/linux-real-time-kernel-scheduling.html' title='Linux real time kernel scheduling'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8421155728631683158</id><published>2009-05-11T01:49:00.000-07:00</published><updated>2009-05-11T04:58:10.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network interface'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='TCP/IP'/><title type='text'>Mysterious network interface</title><content type='html'>Any types of Linux network interface drivers will initialise an instance of &lt;span class="Apple-style-span" style="font-style: italic;"&gt;net_device&lt;/span&gt; data structure. Here is a very concise summary of what is happening between NIC hardware and before IP Protocol stack is invoked.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Packet reception:&lt;/div&gt;&lt;div&gt;DMA packet memory copy is completed -&gt; NIC hardware interrupt ISR is invoked -&gt; Receive interrupt detected -&gt; gather the buffer containing raw packet into a socket buffer (avoid coping: we can set up socket buffer to point directly at DMA space.) -&gt; place packet onto queue (by protocol input function) -&gt; Queuing layer kicks in -&gt; softIRQ threads to process the scheduled interface&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Packet transmission:&lt;/div&gt;&lt;div&gt;(Based on registered queuing discipline and scheduler) Queuing layer (dev_queue_xmit) invokes Hard_start_xmit -&gt; Hard_start_xmit checks hardware buffer -&gt; Hard_start_xmit puts socket buffer in driver's local queue and enable the Transmit Interrupt&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Status notifier chain: This is really just a linkedlist of functions to be called on event for notification, nice and simple (to my like). Registering is actually appending callback function point to the list in this case. &lt;span class="Apple-style-span" style="font-style: italic;"&gt;netdev_chain&lt;/span&gt; is the implementation for NIC.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As a bonus for whoever is reading this, the following are comments for in the include/linux/netdevice.h&lt;/div&gt;&lt;div&gt;/*&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;The DEVICE structure.&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Actually, this whole structure is a big mistake.  It mixes I/O&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;data with strictly "high-level" data, and it has to know about&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;almost every data structure used in the INET module.&lt;/div&gt;&lt;div&gt; *&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;FIXME: cleanup struct net_device such that network protocol info&lt;/div&gt;&lt;div&gt; *&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;moves out.&lt;/div&gt;&lt;div&gt; */&lt;/div&gt;&lt;div&gt;struct net_device {...}&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8421155728631683158?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8421155728631683158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8421155728631683158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8421155728631683158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8421155728631683158'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/05/mysterious-network-interface.html' title='Mysterious network interface'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-8760326658552940721</id><published>2009-05-09T02:27:00.000-07:00</published><updated>2009-06-08T14:21:13.000-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conscious effort'/><title type='text'>What went wrong</title><content type='html'>2 years exactly, since I joined CD. Boy, it was not easy for me to make up my mind to leave, even though it is crystal clear to me now that the right choice is made.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What went wrong then? Well, maybe nothing has to be wrong for anyone to move on. This is probably the case for me. Retrospectively speaking, I have had to take many extreme steps to make things happen in a very much traditional business, structure-wise and culture-wise, which is obviously conflicting with the product and technology the business was setup to achieve, unfortunately. Do I regret what I have done? No, not a second. I have done what it takes to make improvement in many dead corners, and get things done. Sometime I think myself more of a doer rather than a speaker. However, there are things I could have done, more at least...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Two things learnt, know when to play dumb and conscious effort. Knowing when to ask the right questions, when to build a escalator to encourage others to climb up and realise, able to face and tackle their own ambiguious areas, will actually go a longer way than fighting through alone. A successful leader should not only be able to visage and direct the way, more importantly, to carry people with you.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am not a huge fan of spiritual walk or meditation as such, but Dona's &lt;a href="http://www.youareyourpath.com/consself.html"&gt;conscious self&lt;/a&gt; has given a quite concise definition as what it takes to make conscious efforts. Here goes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Effort is work directed toward a specific goal. The word effort implies trying. With effort, there is something you want to achieve. ... Conscious effort is that action which is chosen, that effort which chooses action other than that determined by unconscious forces, habitual reaction. "&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-8760326658552940721?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/8760326658552940721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=8760326658552940721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8760326658552940721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/8760326658552940721'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/05/what-went-wrong.html' title='What went wrong'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-368768460805743456</id><published>2009-04-29T14:35:00.000-07:00</published><updated>2009-05-09T02:27:14.746-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='real-time linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='cross compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='cygwin'/><category scheme='http://www.blogger.com/atom/ns#' term='gcc toolchain'/><title type='text'>ARM Cross Compiler on Windows</title><content type='html'>&lt;div&gt;Instead of using commercial suite such as RealView, I decided to set up my own cross compiler and development enviroment. The target ARM device has a &gt; 2.6 linux kernel running, and host as usual is on Windows.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Install Cygwin with gcc packages and other make tools selected.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Get the source for cross compiler&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Dan Kegel's crosstool project provides a fully automated build script covering plenty of different architectures and compiler versions. The latest stable version can be found at http://www.kegel.com/crosstool/ or svn from googlecode:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;svn checkout http://crosstool.googlecode.com/svn/trunk crosstool&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a good reference on wikipage for &lt;a href="http://wiki.openfi.org/index.php/Setting_Up_An_ARM_Cross_Compiler#CYGWIN_.28Windows_OS.29"&gt;other options&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Build the cross compiler in your enviroment for your target device&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;After checking out the source code, you will find several shell scripts named demo-*.sh under /src. Open the file for the architecture you require, in this case ARM, thus I chosed the demo-arm.sh file. This script has one line for each known working toolchain for this architecture. An example of the demo-arm.sh looks like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RESULT_TOP=/opt/crosstool&lt;/div&gt;&lt;div&gt;[...]&lt;/div&gt;&lt;div&gt;#eval `cat arm.dat gcc-4.1.0-glibc-2.2.2.dat` sh all.sh --notest&lt;/div&gt;&lt;div&gt;eval `cat arm.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If you require a gdbserver to build, you need to add --gdb to the end of the eval command. Running this shell script will build the cross compiler and gcc binaries for you under /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/bin. You will be likely to get errors as crosstool shell script won't support space in windows style directory in your HOME enviroment setting, however with not so helpful error message "...incorrect number of arguments". To get over this, &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;$ printenv HOME&lt;/div&gt;&lt;div&gt;/cygdrive/c/Documents and Settings/&lt;userid&gt;&lt;/userid&gt;&lt;/div&gt;&lt;div&gt;$ HOME=/cygdrive/c/DOCUME~1/&lt;userid&gt;&lt;/userid&gt;&lt;/div&gt;&lt;div&gt;$ ./demo-arm-softfloat.sh&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;It seems a neat idea to install remote file system plugins on Eclipse (+ CDT package as I am using C++). It turned out to be quite a hurdle! I will try to post my tuning on Eclipse (on Windows) to use the cross compiler we just had and transfer binary across to remote Linux OS.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-368768460805743456?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/368768460805743456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=368768460805743456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/368768460805743456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/368768460805743456'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/04/arm-cross-compiler-on-windows.html' title='ARM Cross Compiler on Windows'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7525419705947993380</id><published>2009-04-23T03:38:00.001-07:00</published><updated>2009-06-03T04:02:37.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><category scheme='http://www.blogger.com/atom/ns#' term='Mono'/><title type='text'>Android and device computing</title><content type='html'>&lt;div&gt;&lt;p class="MsoNormal"&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;I have been playing all the sample code from Android SDK in the last couple of weeks. Being voted as the best supported plugin for Eclipse, ADT works very well for me. (Just for the sake of completeness, you can find the set up using emacs for Android &lt;a href="http://riddell.us/tutorial/android/android.html"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;) What I particularly like about is the debugging and testing support. The emulator looks pretty cool and you can view all the live process in the Device window. Other than the standard, basic thread monitoring, you can monitor and trace the heap memory after you triggered the heap update on the selected process, similarly for threads contained in that process. You can trace the call stack on each thread. The only pity is that you do not have the full source code for Android library with the SDK, although you can get them from &lt;a href="http://source.android.com/download"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt; LogCat seems to pretty handy as well for dumping the system messages. The other debugging tools have been summarised in &lt;a href="http://developer.android.com/guide/developing/debug-tasks.html"&gt;developer guide&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I quite like the simple view designer comes with ADT and how xml files are organised as resources. The magic AndroidManifest.xml has also a nice application editing view where you can define your activities, process, tasks and permissions etc. Although there are a few low priority usability bugs such as adding nodes.&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;As far as testing is concerned, it does not seem to be that straight forward to automate test other than via host os scripts using &lt;i style="mso-bidi-font-style:normal"&gt;adb shell&lt;/i&gt; command. There are some good &lt;a href="http://dtmilano.blogspot.com/2008/11/android-testing-on-android-platf.html"&gt;discussions &lt;/a&gt;on test project on emulator, and &lt;a href="http://www.mujandroid.cz/2009/04/testing-android-applications-part-1/"&gt;here&lt;/a&gt;.&lt;/span&gt; &lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;Within SDK, there are a built-in test framework and mock templates to be used which come quite handy with additional support tools such as emulator control. It would be really helpful to have the full support for all the other peripheral I/O as well, such as USB, Bluetooth, motion sensor etc. At the moment emulator control only offers interface for test input to telephony (with options could be set for different network latency and speed settings) and location based service.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;There was one incidence while I was playing with the thread creation. The notepad sample project failed with an exception telling me that thread has stopped from updating UI unexpectedly (I have always had difficulties in understanding what exceptions are expected.). Again, &lt;a href="http://jnb.ociweb.com/jnb/jnbJan2009.html"&gt;Eric &lt;/a&gt;has already caught this out.&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;In general, HW test for me for Android is quite nice. With another big player joining in the mobile device platform, there is no question that much more interesting applications will come out fairy soon. Although it might need some smart minds to create profitable products. There are news already that &lt;a href="http://www.androidandme.com/2009/03/news/pre-order-your-android-netbook-here/"&gt;manufacturers&lt;/a&gt; like Samsung, &lt;a href="http://www.gadgetted.com/?p=5114"&gt;Skystone &lt;/a&gt;and &lt;a href="http://www.engadget.com/2009/04/21/skytone-debuts-arm-based-android-powered-netbook-tablet/"&gt;others&lt;/a&gt;&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;&lt;a href="http://www.engadget.com/2009/04/21/skytone-debuts-arm-based-android-powered-netbook-tablet/"&gt; &lt;/a&gt;are looking to adopt open source platform like Android in other embedded system products&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;. The mobile computing device should be able to benefit from this significantly, I think. Apparently, Android has been successfully ported to X86 architecture as well for &lt;a href="http://groups.google.com/group/android-porting/browse_thread/thread/66862bdb52dac936"&gt;ASUS&lt;/a&gt;&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;Rebuild Android kernel seems to be only possible on Linux yet claimed on this well-referenced &lt;a href="http://honeypod.blogspot.com/2007/12/compile-android-kernel-from-source.html"&gt;post&lt;/a&gt;&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;. What I have not realised that there are crazy folks actually re-built &lt;a href="http://www.koushikdutta.com/2009/01/building-mono-for-android.html"&gt;Mono for Android&lt;/a&gt;&lt;/span&gt;&lt;span style="Georgia&amp;quot;,&amp;quot;serif&amp;quot;;font-family:&amp;quot;;color:black;"&gt;, to which I would really want to try. It would be fun to see me recompile some of the MS .Net apps using Mono and port to Android. You might have noticed by now that Android is not just a SDK from which you can build smart phone apps. The Linux nature of Android actually offers OS level support for apps development. To enable on-target development, HTC has recently published &lt;a href="http://www.htc.com/www/support/android/adp.html"&gt;Android system image&lt;/a&gt; (1.5) to help curious developer build a device from scratch. Although there is a discrepancy between developer phone (&lt;a href="http://developer.android.com/guide/developing/device.html"&gt;Android Dev Phone 1&lt;/a&gt;) and real one, the latest SDK was setting to reconcile this. I guess I would never know until I try!&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7525419705947993380?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7525419705947993380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7525419705947993380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7525419705947993380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7525419705947993380'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/04/android-and-device-computing.html' title='Android and device computing'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4423595496318097577</id><published>2009-04-21T09:31:00.000-07:00</published><updated>2009-06-02T03:00:17.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Test-driven development'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ test framework'/><title type='text'>C++ Test Framework</title><content type='html'>I am in the process of helping my team to get a grip on test-driven development, with most of them have no experience nor exposure to automation test framework. In the middle of hunting, thanks to &lt;a href="http://mydiaryz.blogspot.com/"&gt;Jiayao&lt;/a&gt;, (who seems to determinate to save the digital resource for the planet hence not to update his blog anymore) an alternative light weight test framework is introduced - &lt;a href="http://code.google.com/p/googletest/wiki/GoogleTestPrimer"&gt;GTest&lt;/a&gt;, another xUnit type of testing package. (Is there anything those people do not do?) However, if you only prepare to spend 10 minutes on this subject, you should be looking at Olve's &lt;a href="http://olvemaudal.wordpress.com/2007/01/20/qunit-a-simple-unit-test-framework-for-c/"&gt;QUnit&lt;/a&gt; right now and shut this tab down. Olve has a pretty concise TDD presentation on his blog. Officially you do not have agree with his attitude to all other frameworks :-). There is a quite comprehensive in &lt;a href="http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks"&gt;wiki&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, what I need is a simple test framework for cross-platform c++ projects. And I put my hands up to say I am a crappy tester and programmer. So this is really just an attempt to clear my own threads. So do not be surprised if you saw some terms you never heard before - it has to be my invention. Candidates on the short list finally come down to:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.boost.org/doc/libs/1_38_0/libs/test/doc/html/index.html"&gt;Boost.Test&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://cppunit.sourceforge.net/doc/1.8.0/index.html"&gt;CPPUnit&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://tut-framework.sourceforge.net/"&gt;TUT&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/googletest/wiki/GoogleTestPrimer"&gt;Google Test&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There was a good summary from &lt;a href="http://gamesfromwithin.com/?p=29"&gt;Snappy Touch&lt;/a&gt; about using unit test framework in game and iPhone development. My list is much simpler:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Licensce free (I am sorry, but this has to be on top of my list. It is not about price; it is the principle :-))&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Passed my 30 mins HW test. (30 minutes for me to run a Hello World program successfully, officially in this case is Hello Test World.)&lt;/li&gt;&lt;li&gt;Robust. I REALLY do not want to spend a second in debugging the framework itself!&lt;/li&gt;&lt;li&gt;Most of test framework is about predefined macros, fixtures etc. To me, it has to be just as easy as using a probe. Minimum code snippets required for invoking the actually test and output test results. &lt;/li&gt;&lt;li&gt;Support good test template for input of expected results (whether it is a value, condition check, status machine transition, whatever). This is actually the most tricky one, in my opinion.&lt;/li&gt;&lt;li&gt;Test code itself MUST be easy to port. In addition to the no-dependencies on non-standard libraries contraint, I found it is extremely important to leave those compiler-dependent features out, otherwise, we will spend awful a lot of time in figuring out what the heck has went wrong when test failed miserably after you come out from Microsoft illusion to the reality, on target device, not mention after tools such as Lint is applied to assure the code quality itself.&lt;/li&gt;&lt;li&gt;Handles exceptions well. Remember my days in Symbian, one thing I really loved is the replacement concept to exception as in Panic!&lt;/li&gt;&lt;li&gt;It would be very nice if it comes with some scripts available to kick off the automated build and run process.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Maybe I should cook out my own test framework someday, just for fun...&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4423595496318097577?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4423595496318097577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4423595496318097577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4423595496318097577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4423595496318097577'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/04/c-test-framework.html' title='C++ Test Framework'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4690594281942149074</id><published>2009-04-20T06:21:00.001-07:00</published><updated>2009-04-20T07:12:31.161-07:00</updated><title type='text'>When all these are over</title><content type='html'>I still remember one of interviews I had few years ago with &lt;a href="http://www.dataconnection.com/"&gt;DataConnection&lt;/a&gt;. It is one of these companies that appears really attractive with its growth graph. The reason was quite simple, I failed, which does not happen very often. DC has been known as a company has the lowest attrition rate while most strict interview process. Anyway, I failed the second round.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I can't remember the guy's name but what I do remember is the question. We (5 of us sitting in a small teeny room, and I bet someone was peeking us through the window) were asked to present a solution to resolve TCP transmission for ancient Greek philosophers. What I have had is an unforgettable session with this guy in another 'interrogating' room. I was pretty sure that I would get that job at that point, until he helped me to rip all the fuzzy part of my brain apart. Surely I still appreciate what he has done there. I quit convincing myself that I got a grip on something I did not really see through.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is rather interesting to me is that DC has really spent significant amount of time, efforts in looking for the best people, not about what kind of experience they have, but the way they approach things. Officially I was not the right person at that time. The fact they have managed to maintain a consective growth ever since they kicked off in 1982 owes to their dedication and determination to only take the best on board. It is quite easy and convenient to get over with every recruitment, every personnel change, every up and down phase of a business unit. I have seen quite often people shrugging their shoulders and admitted that there is nothing more we can do and it just happened. It seems like we have done nothing incorrect and just bad luck. I can't help thinking that if luck is really about probability, how come the damn thing just keeps hitting us all the time!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;During one conversation I have just had with our HR director, I have tried to subtlely expressed my opinion - 2, 3 years is a short period of a company's history, probably in one's whole career life. However, every compromise we made has an impact on what we would like to shape the team into. Flexibility becomes such an easy excuse for lack of capability for making decision.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I have realised so far is, you can not really tell the fact nor the future from what has happend (in one's cv for instance), just like you have no idea which cycle path I have just taken to get here; while you will have pretty good chance to guess where I would be heading to from the way I took from here.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4690594281942149074?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4690594281942149074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4690594281942149074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4690594281942149074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4690594281942149074'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/04/when-all-these-are-over.html' title='When all these are over'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-5041143803735686372</id><published>2009-03-31T13:03:00.000-07:00</published><updated>2009-04-09T12:08:00.410-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='real-time linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='orocos'/><category scheme='http://www.blogger.com/atom/ns#' term='Scratchbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Diopsis'/><category scheme='http://www.blogger.com/atom/ns#' term='coLinux'/><title type='text'>Open source target motion control - Part I</title><content type='html'>&lt;div&gt;&lt;div&gt;I have always wanted to be a pioneer to introduce an open source ARM based dual core processor into machinery control. Most of the machine control platform right now are either based on third party generic design motion controller (i.e. Baldor) or in-house microcontroller and DSP based for very specific control application. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Basically, we need a host enviroment, a target-simulation enviroment and a real target device to do the work. In simplest term, it roughly go like this: develop and then port your programs from host to the target-simulator, and then download the image to the target device.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Host, in this case I use Ubuntu&lt;/li&gt;&lt;li&gt;Target-simulator (or a cross-compiling platform). Install Scratchbox on Ubuntu Hardy&lt;/li&gt;&lt;li&gt;Target device, the latest dual core automotive control SoC device &lt;a href="http://www.atmel.com/products/Diopsis/"&gt;DIOPSIS&lt;/a&gt; from Atmel&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;wget http://repository.maemo.org/stable/3.1/maemo-scratchbox-install_3.1.sh &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;chmod +x maemo-scratchbox-install_3.1.sh &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;sudo ./maemo-scratchbox-install_3.1.sh -d&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;/scratchbox/sbin/sbox_adduser USER yes&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;/scratchbox/login&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;[1] For the inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion ‘(void *) ph-&gt;p_vaddr == _rtld_local._dl_sysinfo_dso’ failed! problem, it’s necessary to disable “vdso”:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;echo 0 | sudo tee /proc/sys/vm/vdso_enabled&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;[2] For problems when building packages (mmap: permission denied when building), it’s necessary to reduce the mmap minimum address:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;echo 4096 | sudo tee /proc/sys/vm/mmap_min_addr&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;[3] To make these changes permanent across reboots, one can add these settings to /etc/sysctl.conf:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;vm.vdso_enabled = 0&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;vm.mmap_min_addr = 4096&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Then run&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;sudo sysctl -p&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Unfortunately, I am running scratchbox in Ubuntu Hardy, which in turn is within a virtual box on Windows XP SP2... Anyway, the fact is you will not be able to access network within scratchbox after the installation. Somehow this is not a problem if you install on Debian distributions (this shows how much scratchbox people love Debian!)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What you need to do is to modify the following two conf files:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;/scratchbox/etc/nsswitch.conf (change nameserver to the correct IP address in your subnetwork)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/scratchbox/etc/resolv.conf (change the line "hosts: xxxx" to "hosts: files dns")&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;One caveat is that you will not be able to change these two files IN scratchbox, even you do chmod 666 magic. You have to logoff scratchbox and change these two files outside. (Display hidden port and programs which are using them, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;netstat -nap&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now you can use apt or wget to install packages onto your target simulation linux device. Here is a quite template list for &lt;a href="http://www.linuxquestions.org/questions/debian-26/post-your-source.list-330913/"&gt;/etc/apt/sources.list&lt;/a&gt;. Mine are&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;deb http://ftp.us.debian.org/debian/ stable main contrib non-free&lt;/div&gt;&lt;div&gt;deb-src http://ftp.us.debian.org/debian/ stable main&lt;/div&gt;&lt;div&gt;deb http://security.debian.org/ stable/updates main contrib non-free&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After the enviroment is ready, one of my first step was to get my favorite messaging middleware onto ARM + Linux combination - &lt;a href="http://hegallis.blogspot.com/2009/02/lightweight-messaging-middleware.html"&gt;zero messaging queue&lt;/a&gt;.  Malo has &lt;a href="http://lists.zeromq.org/pipermail/zeromq-dev/2008-November/000195.html"&gt;reported &lt;/a&gt;that he has successfully done the porting. Somehow I found there are many more quite involved problems. I will find some other time to list them all.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Be aware that if you are trying to build latest version of autotools or GNU M4 for marco scipting you will find them in " /usr/local/bin", rather than the "/scratchbox/tools/bin". So make sure in your sh script file you are referring to the correct location to use the right version.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some useful links:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href="http://beans.seartipy.com/2006/03/15/installing-c-boost-on-gentoo-and-debianubuntu/"&gt;Boost&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.internettablettalk.com/forums/showthread.php?t=8241"&gt;http://www.internettablettalk.com/forums/showthread.php?t=8241&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href="http://linux.zipitwireless.com/wiki/Scratchbox"&gt;http://linux.zipitwireless.com/wiki/Scratchbox&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0221a/ar01s02s01.html"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0221a/ar01s02s01.html&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://colinux.wikia.com/wiki/ExpandingRoot"&gt;Change the size of existing image&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-5041143803735686372?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/5041143803735686372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=5041143803735686372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5041143803735686372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/5041143803735686372'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/03/cross-platform-orocos.html' title='Open source target motion control - Part I'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-7104537745154756199</id><published>2009-03-26T09:24:00.000-07:00</published><updated>2009-03-28T14:44:01.062-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Publish and Subscribe'/><category scheme='http://www.blogger.com/atom/ns#' term='real time'/><category scheme='http://www.blogger.com/atom/ns#' term='messaging'/><title type='text'>Publish and subscribe - real time system</title><content type='html'>I seems to get the feeling that this is not the first time I wrote something about this &lt;a href="http://hegallis.blogspot.com/2008/11/inter-component-communication.html"&gt;pattern&lt;/a&gt;. Since I could not control my temptation, as always, I decided to pick it up again. It does make perfect sense, to me at least, that there are generally two roles everything plays, producer or consumer. In another word, every entity in the system is either producing something or consuming, or both. &lt;div&gt;In a system where the scale is by nature big, there is little hope that you can manage and control the behavior via tight-bound relationships among the entities you are able to indentify. Under this circumstance, what has bigger chance to survive is a loose and distributed system - we are expecting each individual cell is 'good' enough to be self-sufficient, have its own purpose of life ;-).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Topic-based messaging publish and subscribe structure is quite useful and flexible to meet this requirement - a word I am a little reluctant to use right now. There are some good articles descrbing how to implement this concept in &lt;a href="http://www.codeproject.com/KB/IP/PubSubUsingWCF.aspx"&gt;WCF&lt;/a&gt; and raw &lt;a href="http://www.codeproject.com/KB/IP/SocketBasedPubSub.aspx"&gt;socket&lt;/a&gt;. Compared with zeromq, I am still yet to try which one offers better flexibility. I think I the easiest simulation is to come up with a set up producing tons of publishers and consumer and see how the time latency and throughput would hold up. When it comes to real time (or near real time) communication, whether leaving the publish service running in each individual entity or centralising the service publishing capabilities in server (entity itself will only issue publish or subscription requests to the centralised service host), where redundancy could be applied is still a bit question mark for me. If each entity hosts the service publishing itself, that means itself will need to maintain all subscribers' information locally, as well as the callbacks for all the published service on the network this entity is interested, or even maybe those publishers' information as well. There will a burst of multi-casting packages whenever new entity joins or leaves the party. While in the centralised server structure, most of the communication will be uni-cast.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Down another level, to use TCP might not be a good idea for the de-centralised structure as the overhead of maintaining the connection, and also the fact TCP packets demanding more load on the network might present a bit of problem for the overall throughput when the number of entity increases significantly. In the real time control scenario, some of the data are timing and quality critical, sometimes 'best-effort' delivery just is not good enough. Field bus is really for this purpose. I am thinking maybe a different priority or type of delivery-assured channel could be available when a service is to be published by certain entity, with default higher QoS level. (&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;I wonder there is an easy way for one multi-casting receiver to determine whether the other receiver has consumed the same packet or not?&lt;/span&gt;&lt;/span&gt;)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-7104537745154756199?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/7104537745154756199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=7104537745154756199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7104537745154756199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/7104537745154756199'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/03/publish-and-subscribe-real-time-system.html' title='Publish and subscribe - real time system'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-1300469361812972670</id><published>2009-03-22T11:23:00.000-07:00</published><updated>2009-03-22T14:58:44.340-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agility'/><category scheme='http://www.blogger.com/atom/ns#' term='self-testing'/><title type='text'>Legislative Control System</title><content type='html'>I always get the feeling wanting to punch a bag when getting something I am really proud up and running. This is one of them. After many weeks hard work, we have managed to get this whole new system to a decent, demonstrable state, in a pretty much 20% time investment sort of way (well, at least for me). Great job everyone!&lt;br /&gt;&lt;br /&gt;This is what I have always believed, do what is opposite to everyone else does. Otherwise we are just gonna be another someone else. There was no what so called by-the-book project management, we have confidence and trust on each individual and believe in their commitment and skills to deliver their parts. This is one of the situation when everything was well-considered up front, and they are plugged together, they just worked! When I looked back to those intense nerve-breaking argument and challenges everyone brought onto the table, they suddenly all make sense. I am so proud what we have achieved so far and really looking forward this to be recognised sooner by our customers and competitors, well, maybe in different ways.&lt;br /&gt;&lt;br /&gt;Of course this does not mean that we are just a bunch of ad hoc headless chicken. Quite oppositely, I realised that once the best practice becomes habit, it is hard to not to make it work. We have some great team players who are willing to keep their head up, taking up all the shitty, bread-and-butter daily supporting work to allow us being able to tackle with problems. They are real heroes. I could not remember how many times I have shouted to get people's mind around and brought all of us to focus, they took it in the constructive way I would never be able to do myself. Thank you very much for putting up with me and the credit should be with you.&lt;br /&gt;&lt;br /&gt;Here is what we have done.&lt;br /&gt;We have initially scribbled down all the desirables end users would like to be able to feel about, of which they are very descriptive. Everyone is not sure where we are going to start as it did not make sense by any book of knowledge as where the system architecture is going to be. To manage this stage of fuzzy feelings and ideas are quite a tricky thing as people would naturally have doubts and suggested whether it would make more sense by starting to do something for real, i.e., writing some function spec. Spec is important, no doubt about that. But without sound and very objective outside views, I would not dare to think what would come out of months and even years of work without sense of customer perspective. So I would suggest, knowing your customer, knowing who you are serving is paramount. To achieve so, is to sit tight and being critical about every single assumption or limitation in the system-to-be.&lt;br /&gt;&lt;br /&gt;Next stage is what we are confident and comfortable to a reasonable degree where we want to achieve. We scan through the very basic functionalities user are expected to be see within first 5 minutes when they are exposed to the system-to-be. Believe it or not, the first 5 minutes are extremely important when you are evaluating a new system. Sexy UI, plug and play, easy and almost transparent self configuration of every piece of system, dynamic update of system status, well captured of all the thinkable failure scenarios and their fallback positions, these are what some experts would refer to as user experience. &lt;br /&gt;&lt;br /&gt;Then we start, eventually, working on the design. We literately locked ourselves in a 'dark' room for a good couple of months. In very human unfriendly languages, we have abstract the core system into pieces and pinned down the fundamental data support structure, component definition, logic break down of the system layers, messaging and communication protocol, generic external device control interface. Let's just say at that point, when we walked out of that room, we do not know how to speak English (maybe I have never been able to do anyway). We do not know whether we needed coffee or just another sandwich. What an enjoyable painful period!&lt;br /&gt;&lt;br /&gt;Coding could not be easier. I know people kept saying not everyone could be great programmer unless you have mastered a lot of cunning skills in the language you use or the subtlety the platform you are working on could provide. But at the end of day, what really seems to matter is how you drive, how you picture and to find the piece in the puzzle fit your purpose. We did not choose to let the language or OS API to lead us. We did the opposite, yet again. Coding could not be easier, as long as you know what you want. In fact, I got annoyed every time when I tried to pair program on one of team member's computer as he kept setting the keyboard setting to some bizarre configuration and I could never be able to find my icon and not mention all the familiar shortcuts which have become essentials to me. The code was far from being great as some of them are not that straight forward to understand. In fact, I started to think whether easy-to-understand is really a fair criteria. The dynamic performance of the code requires us to put a lot of dummy code behind us. Being a real time control system, we just could not afford to have ten lines of code to manage the stream overloading or fancy dictionary. What actually came out is a nice flowing picture how every cell of the system passing information and behave itself when they are supposed to be working together.&lt;br /&gt;&lt;br /&gt;Test, is not a nice to have, it is a nature of this business. There is no more to say about this. We are by far from being testing expert, nor do we have great automated test suite. But we test every component in our mind and by means of poking the component from every possible angle dynamically. We have had a nice clock mechanism in placed where it will initiate some random sequence of system behaviour and update with no assumption of what preconditions are. Test the code itself seems to be too nice a fantasy to have, but we certainly tasted a slice of it. With a graceful failure capture engine in place, we could know exactly where the failure happen and thanks to the master clock, we were allowed to replay exactly the sequence which made the failure happen. The key point is, we have something always running from almost the first week of the development. Of course many of those failures come from our 'dummy' internal users! Many thanks to you and we are grateful to your support along the way, doubts, challenges, rants :).&lt;br /&gt;&lt;br /&gt;This is certainly not the end, we all know there are lots hard work in front of us. But this day is to be remembered, and this day we are so proud of what we have achieved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-1300469361812972670?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/1300469361812972670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=1300469361812972670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1300469361812972670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/1300469361812972670'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/03/legislative-control-system.html' title='Legislative Control System'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-4563022238426483034</id><published>2009-03-19T14:45:00.000-07:00</published><updated>2009-03-19T15:14:34.495-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='COM'/><category scheme='http://www.blogger.com/atom/ns#' term='unmanaged code'/><title type='text'>Use standard COM component in unmanaged code</title><content type='html'>This subject itself is a bit messy, I know. Sorry, but as I am sitting in between a bunch of 'well-designed' unmanaged C++ code and a nice, shiny C# code, and a third party COM component supplied with absolutely no documentation, here I am. Two hours later, I plodded through a path.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First thing, if you are not familiar with how to write or use one of the Microsoft's oldest 'open' component-oriented design - COM, you might want to start from a good &lt;a href="http://www.cs.umd.edu/~pugh/com/"&gt;tutorial&lt;/a&gt;. Believe it or not, there are countless man months of many great engineers' professional lives have been ruthlessly swallowed by Microsoft.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok, I had my rants. Here is the trick, and I have not found any help or information in dealing with such problem via Google, so my two pennies.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could use Visual Studio 2003/2005/2008 etc to work on your own unmanaged code if you are indeed a solid C++ engineer and have belief in the pure logic world. Problem comes when you try to use COM component within your unmanaged code (not via Interop which is to serve marshalling between managed and unmanaged boundary). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First of all, you use magic #import "xxx.tlb" to import type library into your unmanaged world, and choose your fancy namespace, such as:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;#import "MyCOM15.tlb"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;using namespace MyCOM15;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then you initialise your code to be "COM aware" by calling &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;CoInitialize(NULL);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;in the beginning of your code snippets. In the meantime, put CoInitialize(NULL); before you are done. (Apology if this reads like teaching grandma sucking eggs.) After this, you retrieve the famous Dispatch interface and create instance of choice based on uuid:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;CLARITYCOMLib::IMyField10Ptr fieldPtr = NULL;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;fieldPtr.CreateInstance(__uuidof(MyField10));&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now you think you can relax... so did I.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can not compile!!! You will see error like this &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;error C3861: 'TEXT': identifier not found C:\Program Files\Microsoft Visual Studio 8\VC\include\comdef.h 255&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"TEXT" is a macro for different character set setting. You might think to make sure all your project have Unicode character setting would make this go away. Well, apparently we are wrong again. Long story short, the way to fix this is to change "TEXT" into "(_TCHAR*)&amp;amp;". For example, the original line in comdef.h:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;_COM_PRINTF_S_1(m_pszMsg, 32, TEXT("IDispatch error #%d"), wCode);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;will become&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;_COM_PRINTF_S_1(m_pszMsg, 32, (_TCHAR*)&amp;amp;("IDispatch error #%d"), wCode);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, include "tchar.h" in your header files.&lt;/tchar.h&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At last, make sure your unmanaged code project does not have /clr:pure or /clr:safe turned on. These two types of common runtime support are not compatible with what we are trying to achieve here.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16997043-4563022238426483034?l=hegallis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hegallis.blogspot.com/feeds/4563022238426483034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16997043&amp;postID=4563022238426483034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4563022238426483034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16997043/posts/default/4563022238426483034'/><link rel='alternate' type='text/html' href='http://hegallis.blogspot.com/2009/03/use-standard-com-component-in-unmanaged.html' title='Use standard COM component in unmanaged code'/><author><name>Yang</name><uri>http://www.blogger.com/profile/04751892087548976607</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_szB77yN6fBM/SQtnjyj3FAI/AAAAAAAAAJQ/bdyXqL8M-AU/S220/yang_zhang.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16997043.post-390833063845593522</id><published>2009-03-13T01:24:00.000-07:00</published><updated>2009-03-13T06:21:01.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Robotics'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><title type='text'>Fox networked!</title><content type='html'>You could not get better morning wake up calls like this. Our product manager just &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;announced&lt;/span&gt; that &lt;a href="http://en.wikipedia.org/wiki/Fox_Business_Networ
