Lazy Makes Others Busy – a bad experience with DLL

The Story:

Recently, I’m working as a deployment engineer at customer site with my team members. The system under deployment consists of a cluster service, a NoSql database and some client applications which interact with the cluster/database by using the Dynamic Link Library (DLL) provided by the vender.

We were requested to deploy one new module which collects the database usage and health statistics such as running time, average read/write rates, database response delays and etc. Let’s call it Statistics Service as brief. We were also asked to upgrade the DLL for each client programs. I didn’t think too much even a big question mark in my mind: “Why we also need to upgrade the DLL for client for the Statistics Service?”

Everything went well at the beginning, but after deployment, we found that some statistics items were still zero. We re-checked our upgrade process including checking the configuration files, the file md5sums, DLL version numbers. It seems nothing was wrong. We asked the developer in the other city for help but no valuable information still. Then we did the deployment again and still no luck.

After several days, problems were still there. We started to analysis the log of the Statistics Service line by line. We happened to recognize a phenomenon that if the client program creates the connection to the database before the Statistics Service is ready, the Statistics Service won’t initiate statistics data collection for this client. The question popped up in my mind again: “Why we also need to upgrade the DLL for client for the statistics service?”

I made a call to the developer to check why the system has such weird behavior. To my surprise, he said that the clients notify the statistics service via the DLL method calls quietly. And the DLL’s cluster connection method creates a TCP connection to the Statistics Service in the background for the clients. I asked why? He says: “I’m a newcomer; I failed to persuade the developers of the cluster service to monitor the statistics data and notify the Statistics Service. So we added code for collecting the statistics data in the DLL file for client programs which is an easiest and fastest way.” And later I asked another question: “why we still have problems that some statistics items are still zero? We already checked that DLL version is the latest one. ” Again, he managed to surprise me again: “We just found that we might released different DLL versions with the same version numbers before.” Later that day, we received a new DLL and after upgrading, everything went OK!

No, it’s still far away from OK!!!

The Questions:

Why such a version control pitfall happened?

Why does the DLL care about statistics and does weird work furtively?

Why did the vender choose this easiest and fastest design without carefully thinking about the whole system and the consequences?

Further Reading:

What is DLL? http://zh.wikipedia.org/wiki/%E5%8A%A8%E6%80%81%E9%93%BE%E6%8E%A5%E5%BA%93

时间: 2024-08-28 11:07:02

Lazy Makes Others Busy – a bad experience with DLL的相关文章

Optimizing Oracle RAC

Oracle Real Application Clusters (RAC) databases form an increasing proportion of Oracle database systems. RAC was introduced in 2001 as part of Oracle 9i and was based on Oracle's earlier Oracle Parallel Server architecture. RAC is almost unique as

《coredump问题原理探究》Windows版 笔记

<coredump问题原理探究>Windows版 笔记 Debug 一.环境搭建 1.Win7捕获程序dump 2.Windbg符号表设置(Symbols Search Path) 二.WinDbg命令 三.函数栈帧 1.栈内存布局 2.栈溢出 3.栈的规律 4.定位栈溢出问题的经验方法 四.函数逆向 五.C内存布局 1.基本类型 2.数组类型 3.结构体 六.C++内存布局 1.类的内存布局 2.this指针 3.虚函数表及虚表指针 4.单继承 5.多继承(无公共基类) 七.STL容器内存布

新书《深入应用C++11:代码优化与工程级应用》出版,感谢支持

经过一年的编写,这本书终于和大家见面了, 已经由机械工业出版社出版,希望本书能给学习C++尤其是C++11的朋友们更多的帮助. 关于C++11 在StackOverflow的最近一次世界性调查中,C++11在所有的编程语言中排名第二, C++11受到程序员的追捧是毫不意外的,因为它就像C++之父Bjarne Stroustrup说的:它看起来就像一门新的语言.C++11新增加了相当多的现代编程语言的特性,相比C++98/03,它在生产力.安全性.性能和易用性上都有了大幅提高.比如auto和dec

Lession 1-2 Are you busy

                                                                                                                                                                     By Leizl 一 发音 Colleague Extremely [ik-streem-lee] Wonder generally 二 单词 1 Suspense 悬疑

[share]How to Become a Lazy but Productive Android Developer

How to Become a Lazy but Productive Android Developer How can we optimize throughput time for writing the business logic for the app and avoid lazy code to write? by Paresh Mayani · Dec. 16, 13 · Mobile Zone Like (1) Comment (3) Save Tweet 21.63k Vie

POJ1337---A Lazy Worker(dp)

Description There is a worker who may lack the motivation to perform at his peak level of efficiency because he is lazy. He wants to minimize the amount of work he does (he is Lazy, but he is subject to a constraint that he must be busy when there is

Swift singleton &amp;&amp; Lazy initializition

偷个懒,看到了个比较靠谱的答案,直接复制过来了. 原网址:http://stackoverflow.com/questions/24024549/dispatch-once-singleton-model-in-swift From my short experience with Swift there are three approaches to implement the Singleton pattern that support lazy initialization and thr

关于延迟加载(lazy)和强制加载(Hibernate.initialize(Object proxy) )

PO 即Persistence Object VO 即Value Object PO 和VO 是Hibernate 中两个比较关键的概念. 首先,何谓VO,很简单,VO 就是一个简单的值对象. 如: TUser user = new TUser(); user.setName("Emma"); 这里的user 就是一个VO.VO 只是简单携带了对象的一些属性信息. 何谓PO? 即纳入Hibernate 管理框架中的VO.看下面两个例子: TUser user = new TUser()

Hibernate学习(五)lazy属性学习(true和extra区别)

Lazy(懒加载)在hibernate何处使用:1.<class>标签上,可以取值:true/false,(默认值是:true)2.<property>标签上,可以取值:true/false,需要类增强工具3.<set>,<list>集合上,可以取值:true/false/extra,(默认值为:true)4.<one-to-one>,<many-to-one>单端关联上,可以取值:false/proxy/noproxy 在在set集