科技: 人物 企业 技术 IT业 TMT
科普: 自然 科学 科幻 宇宙 科学家
通信: 历史 技术 手机 词典 3G馆
索引: 分类 推荐 专题 热点 排行榜
互联网: 广告 营销 政务 游戏 google
新媒体: 社交 博客 学者 人物 传播学
新思想: 网站 新书 新知 新词 思想家
图书馆: 文化 商业 管理 经济 期刊
网络文化: 社会 红人 黑客 治理 亚文化
创业百科: VC 词典 指南 案例 创业史
前沿科技: 清洁 绿色 纳米 生物 环保
知识产权: 盗版 共享 学人 法规 著作
用户名: 密码: 注册 忘记密码?
    创建新词条

最新历史版本 :卢克·拉吉里奇 返回词条

  • 编辑时间: 历史版本编辑者:高兴
  • 内容长度:图片数:目录数:
  • 修改原因:
卢克·拉吉里奇(Luke Rajlich),Zynga公司FarmVille游戏首席技术官
目录

人物专访:zynga旗下farmville的创作者Luke Rajlich回目录

farmville的玩家遍及全球,堪称日活跃用户最多的休闲游戏。对于这样的游戏巨作,很多人对farmville和开发团队充满了好奇。日前farmville的创作者Luke Rajlich接受专访,畅谈关于farmville的相关事宜。

farmville luke

farmville luke

在farmville创作中的最大挑战问题上,Luke Rajlich认为怎么去维持这样一个高水准的游戏持续保持用户活跃度是他们遇到的最大挑战。众所周知farmville在短短的属于已经流失了将近2000万的活跃用户。

farmville的创作技术部分来自Luke Rajlich自己创建的公司MyMiniLife,在这个问题上Luke Rajlich表示farmville是MyMiniLife和zynga完美融合的一项结晶。

myminilife

myminilife

In preparation for next week’s Social Developer Summit, we had a chance to do a Q&A session with one of our featured speakers, Luke Rajlich, Architect Engineer with Zynga’s FarmVille team.  He discusses how his previous company, MyMiniLife, was acquired and integrated into FarmVille, how to deal with the massive scaling necessary on a game like FarmVille, and the biggest surprise he encountered over the last year.  Read the interview below.

If you haven’t signed up for the Social Developer Summit yet, please click the link below and head over to sign up today.

Now, on to the Q&A with Luke Rajlich from Zynga.

1) Farmville has the most traffic load of any game available on Facebook (and ostensibly is one of the biggest on the web).  What has been the biggest challenge as an architect engineer on such a big project?

The biggest challenge has been to keep up with the growth of the game. With the size of the game now, there are few if any canned solutions for problems we face. Thus, we have to understand deeply the nature of the problem we are facing in order to build a solution that fixes it.

2) Farmville uses technology from MyMiniLife, which you founded.  Can you tell us about the difficulty of integrating the old technology into this new game?

FarmVille, from the start, was a collection of several technologies, including MyMiniLife. We were unique in our development in that we combined technology from MyMiniLife and existing Zynga games.

We initially had to piece everything together nicely, which required we be specific about how the various pieces would fit together. Since the tech pulled from each source was rather non-overlapping, so this was mainly a bit of integration work.

3) What were some of the biggest surprises you encountered as FarmVille began to explode in popularity?

The biggest surprise was how we passed some of the most iconic games (PacMan, Tetris, Sims) in terms of players in such a short time. We are now the most played game ever, which is crazy to think about.

4) What is one thing you would have done differently if you could go back in time and scale again?

Scaling a large game like FarmVille is a continuous learning experience. As such, I’ve learned a ton through the process and I can’t say there is anything I would rather not have done. We’ve overcome major scaling hurdles and we have built a massive franchise. It has been a truly amazing experience.

Luke Rajlich首次对外详尽解析farmville的成功之路回目录

这是很多人共同的疑问,为什么farmville能成为facebook第一大游戏应用?farmville以什么优势能迅速聚拢将近1亿的活跃用户?未来有哪项游戏能撼动farmville的龙头地位?

luke rajlich

luke rajlich

尽管,farmville最近遭遇了前所未有的下滑,但是即便是这样,在facebook的游戏应用榜单上仍然没有游戏能够撼动farmville榜首的位置,从纯游戏的角度上,排名第二位的Birthday Cards也仅为3000万级别,而farmville还高踞在7000万的级别。

farmville堪称有史以来最成功的社交网络游戏,all facebook就此采访了farmville的主创工程师Luke Rajlich 。Luke Rajlich是MyMiniLife公司(为zynga公司收购)的主创者,farmville设计一般由MyMiniLife公司完成。

FarmVille(美版开心农场)谈架构回目录

在2009年Facebook Developer Garage Shanghai活动上,Five Minutes程延辉 介绍开心农场架构,让大家了解了SNS game的一些挑战和设计模式。

由于农场游戏风靡全球,最近highscalability.com网站采访了美版开心农场FarmVille的Luke Rajlich,他介绍了FarmVille的部分架构资料(1)。

所有模块都是一个可降级的服务

For any web application, high latency kills your app and highly variable latency eventually kills your app.

由于大型的网络应用需要依赖各种底层及内部服务,但是服务调用的高延迟是各种应用的最大问题,在竞争激烈的SNS app领域更是如此。解决此问题的方法是将所有的模块设计成一种可降级的服务,包括Memcache, Database, REST API等。将所有可能会发生大延迟的服务进行隔离。这可以通过控制调用超时时间来控制,另外还可以通过应用中的一些开关来关闭某些某些功能避免服务降级造成的影响。

上面这点我也有一些教训,曾碰到过由于依赖的一些模块阻塞造成服务不稳定的现象。

1. 某Socket Server使用了ThreadPool来处理所有核心业务。
2. 不少业务需要访问内网的一个远程的User Service(RPC)来获取用户信息。
3. User Service需要访问数据库。
4. 数据库有时候会变慢,一些大查询需要10秒以上才能完成。

结果4造成3很多调用很久才能执行完,3造成2的RPC调用阻塞,2造成1的ThreadPool堵塞,ThreadPool不断有新任务加入,但是老的任务迟迟不能完成。因此对于最终用户的表现是很多请求没有响应。部分用户认为是网络原因会手工重复提交请求,这样会造成状况并进一步恶化。上面的问题根本是没有意识到远程服务可能会超时或失败,把远程服务RPC调用当成一个本地调用来执行。

解决思路一:RPC增加Timeout
解决思路二:将RPC改成异步调用。

另一分布式大牛James Hamilton谈到(2)上面这种做法就是他论文Designing and Deploying Internet-Scale Services中的graceful degradation mode(优雅降级)。

FarmVille其他数据

  • FarmVille基于LAMP架构,运行在EC2上。
  • 读写比例是3:1。
  • 使用开源工具来做运维监控,如nagios报警,munin监控,puppet配置。另外还开发了很多内部的程序来监控Facebook DB, Memcache等。
  • 到Facebook接口的流量峰值达到3Gb/s,同时内部的cache还承担了1.5Gb/s。
  • 另外可动态调整到Facebook与Cache之间的流量,Facebook接口变慢时,可以利用cache数据直接返回,终极目的是不管发生了那个环节的故障,能够让用户继续游戏。

小结

尽管FarmVille公布了上面一些技术资料,凭借上面这些资料无法全部了解FarmVille的架构。但是所有模块都是一个可降级服务的概念值得设计大规模应用的同行参考。

Resource

  1. How FarmVille Scales to Harvest 75 Million Players a Month
  2. Scaling FarmVille

参考文献回目录

http://gamerboom.com/archives/674
http://timyang.net/architecture/farmville/
http://gamerboom.com/archives/1666


→如果您认为本词条还有待完善,请 编辑词条

标签: Luke Rajlich 卢克·拉吉里奇