Palatable fruit : The 7 habits of highly effective people

June 4th, 2008 by

This is my second time to read throughout this great book, but it actually impacted on my soul further more than the first time when I just casted so valuable book in my washroom. So stupid, wasn't it?

 During the recent periods of time, I come into several bad true examples around me which can be defined the adverse stuff  against all of the policies advocated in this book. As a result, terrible consequences happened, they have to pay the bitter price for their unreasonable behaviors. Living on the world, nobody can get rid of the necessary of dealing with the relationship with your spouse, friends, colleagues, clients and so on. When growing up, coming into the scoiety, everyboday also has to shoulder various roles as well as responsibilities.

In China, there's an very ancient probverb : Character dominates Fate. Though it's not completely right in the modern society. But in some sense, character is crucial terribly for making decision, communication and building relationships. How to conquer the untangible shadow enemy? No people or power compel you to fulfill the change, the unique approach is you aware consciously and chemical action  takes place spontaneously. You ought to shpe up with Inside-Out congruence, to keep highly integrity between deep value and behaviors. For achieving this, this book comes up with three policies to cultivate efficient habits, essentially pursue you to provide abstract leadership and pragmatic manament to yourself, build up the principles centered value and circle of the influence.

Spreading to wider range and more importantly,this book also contributes three suggestions for public relationship, likewise family, marriage, friends and partners. The premise is you have to be highly integrated with your thinking and behaviors and be proactive. To win the relationship and to be credible, you should be sincere and not faked, you should deliver value to them, listen their needs and concerns, work and live well with them. More significantly, transfering all of these to your posterity with your principles in place. More siganificantly, transfering all of these to your posterity is no other than the biggest treasure and bequest, which will propel them to struggle for their splendid life.

This book also gives the key of “Alibaba's treasure” in the last chapter. Please move this treasure to our lives and don't forget to recap it time by time.

Being a Southy

May 19th, 2008 by

Being as a Southy for almost 2 weeks, I enjoy my everyday in such booming fast company.  In such a environment which highlights atmosphere of communication, everybody shares with open-minded attitude together. I'm amazing about how passionate my colleagues work and build the culture to push this company from good to great.

 For the first 2 weeks,I have the opportunity to take a closer look at several facets of WCF fundamentals, which enhance my comprehension in some way.

Today, I would like to talk a bit about synchronization context, which is launched in .NET 2.0 and adopted well in WCF. As you see, synchronization context is something talking about concurrency management.Generally speaking, WCF offers three options for concurrency mode. What concurrency mode means actually is to constraint multi requests from client towards same service instance simultaneously. How to cope with the concurrency problem of service is asked to interact with another application, typically Windows Form Application? How do we think of the problem when multi services are competing to get access to same Windows Application resource? It's synchronization context.

 Basically, Windows Application uses a constant UI thread to update their UI and communicated with Windows message queque. When requests from client side, WCF will created some worker thread to execute its logic. But these worker threads can't get access to UI updating in windows application or other parties application. synchronization context can play an important role here to marshal calls from other contexts into some specific execution-context,because some third party application require to run on their own threads. What synchronization context assure is to run the call on the correct thread, or even on single thread. When calls from services arrived in to update UI on another application, synchronization context to enqueue all of the calls and execute on marshalling thread to prevent deadlock.

 To use synchronization context well in your wcf service and resource application, you can get it via SynchronizationContex.Current property. It provides two methods, one is Send() and another is Post(). The difference between them is the issue of synchronous and asynchronous marshalling call from wcf worker thread to resource application thread. For example, logic wcf used to update a resource application UI, is marshalling to resource application specific thread to proceed.

In addition, WCF also allows to set service synchronization context. For the sake of this purpose,It can easily associated the service with synchronization context,  aware it and marshal some worker thread into service synchronization context. Once you decide to use service synchronization context, you have to take into account of concurrency mode more reasonlly. For ConcurrcyMode.Multi, perhaps multi client calls go through the channel and ask service to execute simaltaneiously, at that time, marshalling thread has to deal with these calls, maybe can't process its own duty very well. For ConcurrencyMode. Reentrant, it still results in deadlock possibly, because marshalling thread may wait for the service worker thread, which is blocked in callback operation. Therefore, ConcurrencyMode.Single is the best choice, but you know this option is worst for the performance and scalability for applications.

In summary, it's still recommended to use concurrencymode.multi ,integration with custom synchronization context.[:P]