谈谈Dogulas E. Comer的TCP/IP卷一
2010-03-22
大神W. Richard Stevens的TCP/IP卷一是真正的圣经。他从一个技术人员的角度来写TCP/IP竟然超过了诸多协议制定者以及学校里的教授,是很令人吃惊的。不过,教授们也不是浪得虚名的,其中就有个叫Comer的也写了一套TCP/IP,也是三本。但这套书的价值在国内至少是被低估了。其实在豆瓣上,尽管Stevens得到了9.8分,Comer也拿到了9.4分。
如果说W. Richard Stevens是细节男,那么Dogulas E.Comer就是宏观男。他们不是竞争而是合作的关系。
为什么大多人推崇Stevens,无视Comer。这是因为读TCP/IP以程序员为多,implementation的过程中,很多时候在与细节抗争,消灭一个细节,遇到一个新细节,直到某方不支。因此,有Stevens这样仔细的大师在这一路上陪伴,自然会顺利很多。最后漂亮的把活干完,当然是感激不尽。
其实我想说说Comer。Comer的TCP/IP系列我只读过卷一。和很多人一样,我是读完Stevens的卷一后再Comer的。坏处是先入为主,因为Stevens写的太好了,几乎不敢相信有人能超过他。好处是有比较,同样的章节我能非常明显感觉到风格的差异。拿snmp来说,Comer有段很精彩的评述:
Although they appear to specify details about data structures, MIB standards do not dictate the implementation. Instead, MIB definitions provide a uniform, virtual interface that managers use to access data; an agent must translate between the virtual items in a MIB and the internal implementation.
不是每个人都有能力描述清楚的。很多人能告诉你MIB的实现和接口是有区别的,但仅此而已。Comer能用干净到极致的语句替你描绘出来,并用灰底加粗体突出。Comer能在实现和协议间很好的把握度,他不是没有细节的:
In programming language terms, we think of the IP address table as a one-dimensional array, where each element of the array consists of a structure(record) that contains five items: an IP address, the integer index of an interface corresponding to the entry, an IP subnet amsk, an IP broadcast address, and an integer that specifies the maximum datagram size that the router will reassemble. Of course, it is unlikely that a router has such an array in memory. The router may keep the information in many variables or may need to follow pointers to find it. However, the MIB provides a name for the array as if it existed, and allows network management software on individual routers to map table references into appropriate internal variables.
细节这东西,有了Google以后是非常方便的。只要挑准关键字,基本能逐步逼近某个问题。但从宏观上抓住重点是很难的。一个概念,要经过相当长的时间后才能领悟,从根本上吸收掉,Comer能帮你节约这方面的时间。
在某个领域工作的时间越久越能体会细节是弄不完的,一个概念会被包装成各种样子,以各种闻所未闻的名称出现在不同的文档中。当商业利益驱动、坊间传言、伪专家、糟糕的中文翻译、错误实验得出的正确结果等多种因素夹杂在一块的时候,唯一值得信赖的就是真正的一手资料以及对资料的正确理解,这方面,Comer已经替你完成了。