[好文推荐] From Dilbert to Lumberg: the evolution of an engineering leader

本文来自Linkedin Engineer Blog,并非是翻译,只是原文+阅读笔记,未加润色

I’ve spent twenty years as an engineering director and vice president, managing and mentoring engineering leaders across Silicon Valley and international teams. Over the years, I’ve shipped many products, worked under some amazing leaders, and as a leader myself, written hundreds of performance reviews. During all this time, I’ve learned that great engineering leaders aren’t born; they are made. Or, to be more accurate, they seem to evolve, one step at a time, through four focus areas: technology, process, product and people.

Step 1: the Tech Guy

Most engineering leaders start here. Promoted recently from engineering, they typically focus on technology problem solving; after all, that’s what made them successful in the first place. Java or C++? MySQL or NoSQL? Threaded or evented? They tend to focus the organization around themselves and are central to every project. While this makes them an indispensable individual contributor, they don’t fully leverage their people and scale their organization.

 

一个伟大的engineering leader不是天生的,而是逐步形成的,在不同时期他们会有不同的重点:技术、流程、产品、人员

阶段1:技术达人

大部分的技术负责人是因为技术一流而被提拔的,他们更关注技术问题,毕竟是技术才让他们获得当前的成功。是采用Java还是C++,是Mysql还是NoSql,是多线程还是事件驱动?他们往往成为项目和团队的核心,变得不可或缺,但这也使得他们无法充分发挥团队的力量也非常不利于团队的扩展

Step 2: the Process Master

After seeing their team suffer and miss commitments, many engineering leaders begin to appreciate how the application of well defined software development processes can help to improve transparency, coordination, and early discovery and resolution of issues. Keywords like agile, waterfall, extreme programming, six sigma, and scrum start flying around. Teams who embrace new practices sometimes outshine and outproduce others. But sometimes, too much focus on process can result in a leader alienating his team; don’t forget the cover on your TPS report.

 

阶段2:流程大师

团队无法完成既定目标,负责人开始关注开发流程,如何提高透明性、协作以及问题的早期发现和定位。敏捷、瀑布、极限编程、6西格玛,scurm这些关键词开始满天飞。使用了新的实践后团队开始显现出优势,但过多的关注流程会导致负责人疏远他的团队

Step 3: the Product Guru

The rare engineering manager will start to focus not only on how something gets built and shipped, but also on what is being shipped. Having a deep product understanding is an important trait in a good engineering leader. However, everybody has an opinion and many engineers fall into the trap of designing solutions in an inside-out manner. Better solutions result from listening to stakeholders through Sales, Business Development, Product Managers and Designers. Better yet, engineering leaders and their team should get out into the field to spend time directly with customers.

 

阶段3:产品Guru

有极少的负责人开始关注产品本身,对产品的深入理解是一个好的技术负责人的重要特质。但别被各种选择搞晕

Step 4: the People Person

The most experienced engineering managers know it’s all about the people. Unfortunately, many managers make the mistake of confusing the goal of “everybody is working effectively” with “everybody likes me”. Being buddies with your co-workers is great, but not enough to be an effective engineering leader.

 

阶段4:People Person

有经验的负责人知道人才是一切,但糟糕的是,很多manager误解了“每个人都高效工作”和“每个人都像我”,让其他变得像你一样这很棒,但还不够

Update: 谢谢@骆逸 提醒,这段确实没仔细看清楚,更正为:许多Manager搞混了“每个人都高效工作”和“每个人都喜欢我”,和同事成为朋友这很棒,但对于一个高效的技术负责人来说这还不够

 

Step 5: the Evolved Leader

The best leaders manage to strike a delicate balance between technology, process, product and people. They teach best practices, remove impediments, and get out of the way. They focus on dream, fit and passion . They know that if you hire the right people and put those people in the right positions, they will figure out the right technology and process to get the job done. They have a deep understanding of motivation , and create an environment where engineers have autonomy, mastery, and purpose.

 

阶段5:

最好的负责人能够达到技术、流程、产品和人员的微妙平衡。他们传授最佳实践,去除团队障碍,寻找出路。他们专注在梦想、配合和激情,他们知道如果能招到适合的人并放在合适的位置,他们就能找到合适的技术和流程并完成工作,他们对motivation有很深的理解,能够创造环境让工程师能够自主、自制、找到目标

Engineering Leadership at LinkedIn

LinkedIn prizes highly technical leaders at all engineering levels from manager to vice president and I feel fortunate to be a part of a leadership team that balances all four focus areas. I get the chance to work on advancing our technology (designing active serving from multiple data centers, decoupling services, refactoring key systems, and implementing new frameworks and platforms), optimizing our processes (testing practices, code reviews, agile practices, streamlined release to production), and improving my product knowledge (we’re starting “follow me home” customer visits to keep our engineers attuned to how customers are using our products, and understand their unmet needs). In addition, we get to set up our people for success (improving hiring practices, implementing a technical career ladder, expanding development centers around the world, organizing team learning). And we’re hiring. LinkedIn is looking for software engineering leaders in multiple areas from evolving paid services, to mobile and platform APIs for third-party developers.

 

Visit the LinkedIn Careers Page to learn more

Posted in tech | Tagged , | 1 Comment

2011过去了,2012就这样来了

2011,像是一个大棒,打得我晕头转向。掉进不知名的河流,浮起沉下,反反复复。

看清了一些事,有些让我感激,有些让我厌恶

感谢这些事,让我开始反思,过去的四年。

感谢两本书《少有人走的路》、《人生如登山》

感谢一些人,我记在心里

2012,坚定做自我

人生苦难重重,我们都在山上,下不去,下不得。没有捷径,不能偷懒。某些责任,是你的包裹,不能抛,不舍抛,饿了还要来两口。

人生如登山,不回头,只看眼前路,专注,全力投入。

Posted in Uncategorized | Leave a comment

Reborn

之前的空间数据丢失,千辛万苦找回一些数据,后续还得慢慢恢复。希望接下来能把荒草除掉,弄些小苗

Posted in Uncategorized | Tagged | Leave a comment

Data Management at Twitter-Scale

Twitter在最近的Devoxx2010大会上透露了一些最新的数据:

  • 每天9500万条tweet
  • 最高达到大约每秒3000条tweet
  • 每个tweet平均会推送给600个订阅者
  • 每天要分析处理12TB的数据

早在2010年3月,twitter就存储了超过100亿条tweet,twitter对这些tweet做了数据库的分割,并开发了通用的Sharding框架Gizzard,以及分布式UUID生成器Snowflake

image

Twitter将用户间的Follow关系通过分布式存储系统FlockDB存储,FlockDB针对Social graph的特点而设计。底层基于Mysql,关系被双向存储,支持超大规模的查询。

flockdb-layout

twitter在写入的时候对聚合生成timeline,也就是我们常说的推模式。聚合后的timeline缓存在内存中,目前采用的是Memcached,未来准备使用twitter自己开发的Haplo系统,Haplo基于Redis开发,可以直接操作int列表,通过Gizzard做数据分片和复制。

twitter在大规模数据挖掘,地理位置(Geo)数据库,实时分析这三个场景中使用了Cassandra。HBase在Slide也被提及,但并没有写明在twitter内的应用情况

Hadoop和Pig被用于离线数据分析

image

 

Posted in Uncategorized | Leave a comment

Facebook技术体系窥探之P级数据

我们来看一下Facebook处理P级数据的两个案例:图片存储和数据仓库

Facebook目前是世界上最大的图片共享网站,用户上传了超过20亿的图片,每张图片会被处理成四种分辨率,所以总的存储在80亿以上。为了存储这些图片,图片存储方案经过了三个阶段的改进

第一阶段,使用商用的NFS做文件存储,庞大的图片数量产生了大量的元数据,远远超过了NFS的缓存能力,导致I/O居高不下

第二阶段,建立自己的缓存层,将较小的图片(小头像)放入叫做“Cachr”的缓存系统中,同时,对NFS文件句柄做缓存

第三阶段,新的图片体系:Haystack。Haystack将服务层和存储层合并为一个物理层,实现了一个基于HTTP的图片服务器,把图片存储在名为Haystack的通用对象存储中,目标是减少图片读取时不必要的元数据读取操作。Haystack图片体系在功能上可以分为:HTTP Server,Photo Store,Haystack Object Store,FileSystem,Storage几个部分。

Storage是普通的2U存储刀片服务器,有超过12个1TB的SATA硬盘,采用RAID6做冗余。FileSystem采用XFS文件系统。

Haystack Object Store采用日志模式,只支持追加操作。存储文件由连续的Needle组成,每个Needle代表一个对象。用于做图片存储时,包含了图片的实际数据以及header和footer。Needle可以通过<Offset, Key, Alternative Key, Cookie>唯一标示

image

image

Haystack Store 还包括一个索引文件,每个Needle都在索引文件中有对应的索引记录,且顺序一致。索引文件提供了查找Haystack store file中的needle所必须的最小的metedata。索引文件可以通过haystack store file重建。索引文件的大小一般小于store文件的1%。

image

image

Photo Store启动时会将索引文件加载到内存中重新组织,图片是通过一个64位的Key在内存中定位的。获取图片的Offset和size后就可以在Haystack Object Store中读取实际的图片数据了

image

HTTP框架是使用了libevent提供的evhttp server。使用多线程,同一时间内,每个线程能够处理一个HTTP请求。因为主要负载在I/O操作,因此HTTP服务器的性能并不是至关重要的。

Facebook通过Scribe收集了大量的数据日志,每天的增量超过了10T,这些数据日志可以帮助广告推送、NewsFeed生成,好友推荐,入侵检测等。如何在可控时间内完成这些海量数据的挖掘工作成为了一大难题。最初,Facebook采用传统的数据挖掘方案,但随着数据量的增大任务运行的时间越来越长,并不具备可扩展性。于是Facebook开始尝试使用Hadoop,并在使用过程中开发了自己的数据仓库系统Hive。如今Facebook的Hive-Hadoop 集群拥有超过2250台机器和23000个核心,数据容量超过36PB,大部分任务通过Hive完成,每天有超过25000个Hive Jobs在运行。整个系统体系如下图所示

image

整个系统通过Scribe收集日志,经过过滤后存储在Scribe-Hadoop集群上,成为Hive-Hadoop 生产集群的数据源之一。另外一个数据源则是系统存储数据的Mysql集群。Hive-Hadoop生产集群运算完成后,将运算结果写回到Mysql集群中,或者送到Orcale RAC中做进一步的挖掘。同时,还通过Hive复制将数据推送到一个Adhoc Hive-Hadoop 集群,用来为业务分析人员提供Adhoc查询。为了方便业务分析人员使用Hive,Facebook还开发了一个Web工具叫HiPal

在数据收集部分,Facebook在Scribe和HDFS的基础上开发了一个接近实时的数据收集系统,称之为DataFreeway系统。数据流如下所示

29191045[20101009-1800483]

从图片存储和Hive-Hadoop方案可以看出,面对海量数据,Facebook仍延续他们一贯的实用风格,积极使用开源工具,或是构建简单实用的方案。这里没有科学家,只有解决问题的开发工程师

Posted in Uncategorized | 1 Comment

搜狐博客五周年

突然看到了搜狐微博五周年的图片,才醒悟到,从05年10月份到现在已经超过5年了,时光匆匆,这5年中在博客做了三年,白社会做了两年。其中博客的三年是最充实、也是个人发展最快速的三年。从接手时每日的产品讨论,到后来的没日没夜的系统重构,再到步入正轨开始收获,再到寻求突破却总是未果,一点一滴,在心头流过。假使时光倒流,我们或许可以做的更好,假使我们选择坚守,也许做的更棒,但没有假使。衷心祝福搜狐博客越做越好,衷心祝福曾经一起奋斗的同学们越做越好。

相逢的人会再相逢

Posted in Uncategorized | Leave a comment

Facebook技术体系窥探之基础组件

Facebook,全球排名第一的SNS网站,活跃用户超到5亿,让我们来窥探一下他的技术体系

和许多创业网站一样,Facebook一开始就选择了LAMP(Linux/Apache/Mysql/PHP)结构。但随着网站访问规模的不断提高,在原有的基础上做了大量持续的改进,Facebook也一直采取开放的态度,将自己的技术实践通过各种方式分享出来。即使你不是采用LAMP结构(比如我们一直以Java为主),也能受益良多。

大家都知道PHP是一种脚本语言,无需编译,但效率较低。Facebook对几种常用编程语言的效率做了一个对比image

为了提高PHP的效率,Facebook做了很多优化,Op-code优化、APC缓存等。最后祭出一个大杀器:HipHop for PHP ,HipHop可以将PHP转换成优化后的C++。采用HipHop后,Web服务器的CPU占用减少了50%。Facebook已将HipHop开源

Facebook在架构上采用了SOA的思想,将独立、可复用的功能模块抽离成Service。为了高效的支持多语言调用,Facebook开发了Thrift框架,Thrift目前支持C++, PHP, Python, Java, Ruby, Erlang, Perl, Haskell等。对于异步消息的处理,Facebook则采用了同样是自己开发的日志消息系统:Scribe。Scribe采用client/server的结构,可以高效、健壮的收集各个子系统的消息日志,在中心服务器上集中处理。在服务治理方面,Facebook开发了服务管理平台以及服务监控系统。

image

image

Facebook提倡使用合适的语言做合适的事。目前Service的开发语言主要是C++,Java,Python和Erlang。

Facebook严重依赖于Memcached,大量的数据存放在Memcached中,Mysql大多数情况只作为简单的Key-Value持久化存储,这是因为Mysql的效率难以满足SNS网站数据计算的复杂性。目前Facebook有上千台Memcached服务器,存放着几十T的数据,支撑着每秒钟超过5000万次的操作请求。Facebook对Memcached的优化包括:针对64位的移植,改进序列化算法,使用UDP代替TCP,修改网卡驱动、优化网络协议栈、数据压缩等等。通过这些持续的优化,Memcached的单机吞吐能力从5万次提高到25万次

由于本人是Mysq的门外汉,就不在这班门弄斧了,感兴趣的同学可以参考一下MySQLatFacebook的Page

后续

Facebook技术体系窥探之P级数据

Facebook技术体系窥探之社会化运算模式

Posted in Uncategorized | Leave a comment

Eclipse中文件编辑时常用的几个快捷键和输入模板

最近比较关注如何提高自己的工作效率,比如Launchy的使用。Eclipse作为最常用的IDE,掌握一些常用的快捷键和输入模板,会很大的提高工作效率

常用快捷键

Shift+Enter:在当前行下插入新行,当光标正在一行的中间时才体现其价值

Ctrl+Shift+Enter:在当前行上插入新行

Ctrl+D:删除整行

Ctrl+Alt+J:合并行,相当于vi中的J

Ctrl+Alt+UP/DOWN:向上/下复制行

Alt+UP/DOWN:行向上/下移动

F2:显示Tip

Ctrl+Shift+F:Format,对文档进行格式整理

Ctrl+Alt+/:word自动完成

Ctrl+1:快速解决(quick fix)

Alt+/:内容帮助(Content Assist),用于激活输入模板等

输入模板(Java)

使用方式:输入模板的名字,然后使用Alt+/快捷键

cast:

${type} ${new_name} = (${type}) ${name};

catch:

catch (${Exception} ${exception_variable_name}) {
${cursor}// ${todo}: handle exception
}

do:

do {
${line_selection}${cursor}
} while (${condition:var(boolean)});

else:

else {
${cursor}
}

 

elseif:

else if (${condition:var(boolean)}) {
${cursor}
}

 

for:

for (int ${index} = 0; ${index} < ${array}.length; ${index}++) {
${line_selection}${cursor}
}

foreach:

for (${iterable_type} ${iterable_element} : ${iterable}) {
${cursor}
}

if:

if (${condition:var(boolean)}) {
${line_selection}${cursor}
}

 

instanceof:

if (${name:var} instanceof ${type}) {
${type} ${new_name} = (${type})${name};
${cursor}
}

 

main

public static void main(String[] args) {
${cursor}
}

 

new:

${type} ${name} = new ${type}(${arguments});

private_method:

private ${return_type} ${name}(${}) {
${cursor}
}

 

private_static_method:

private static ${return_type} ${name}(${}) {
${cursor}
}

 

protected_method:

protected ${return_type} ${name}(${}) {
${cursor}
}

 

public_method:

public ${return_type} ${name}(${}) {
${cursor}
}

 

runnable:

new Runnable() {
public void run() {
${line_selection}
}
}

 

static_final:

${visibility:link(public,protected,private)} static final ${type:link(String,int)} ${NAME};

switch:

switch (${key}) {
case ${value}:
${cursor}
break;

default:
break;
}

 

synchronized:

synchronized (${mutex:var}) {
${line_selection}
}

 

syserr

System.err.println(${word_selection}${});${cursor}

sysout

System.out.println(${word_selection}${});${cursor}

systrace

System.out.println(“${enclosing_type}.${enclosing_method}()”);

test

public void test${name}() throws Exception {
${cursor}
}

 

toarray

(${type:elemType(collection)}[]) ${collection}.toArray(new ${type}[${collection}.size()])

try:

try {
${line_selection}${cursor}
} catch (${Exception} ${exception_variable_name}) {
// ${todo}: handle exception
}

while:

while (${en:var(java.util.Enumeration)}.hasMoreElements()) {
${type:argType(en)} ${elem:newName(type)} = (${type}) ${en}.nextElement();
${cursor}
}

全部的快捷键和模板见Eclipse的帮助文件,当然你也可以根据自己的习惯定义自己的快捷键和模板

整理完了以后才发现以前浪费了多少时间啊,浪费可耻!

Posted in Uncategorized | Leave a comment