This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link href="/otn/resources/css/validation.css" rel="stylesheet" /> | |
<link href="/otn/resources/merged/common_css.css?cssVersion=1.8967" rel="stylesheet" /> | |
<link rel="icon" href="/otn/resources/images/ots/favicon.ico" type="image/x-icon" /> | |
<link rel="shortcut icon" href="/otn/resources/images/ots/favicon.ico" type="image/x-icon" /> | |
<script> | |
/*<![CDATA[*/ | |
var ctx='/otn/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
本文曾在“架构师之路”上发布过,近期支援Qcon-AS大会,在微信群里分享了该话题,故对原文进行重新整理与发布。 | |
一、秒杀业务为什么难做 | |
1)im系统,例如qq或者微博,每个人都读自己的数据(好友列表、群列表、个人信息); | |
2)微博系统,每个人读你关注的人的数据,一个人读多个人的数据; | |
3)秒杀系统,库存只有一份,所有人会在集中的时间读和写这些数据,多个人读一个数据。 | |
例如:小米手机每周二的秒杀,可能手机只有1万部,但瞬时进入的流量可能是几百几千万。 | |
又例如:12306抢票,票是有限的,库存一份,瞬时流量非常多,都读相同的库存。读写冲突,锁非常严重,这是秒杀业务难的地方。那我们怎么优化秒杀业务的架构呢? | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link href="/otn/resources/css/validation.css" rel="stylesheet" /> | |
<link href="/otn/resources/merged/common_css.css?cssVersion=1.8967" rel="stylesheet" /> | |
<link rel="icon" href="/otn/resources/images/ots/favicon.ico" type="image/x-icon" /> | |
<link rel="shortcut icon" href="/otn/resources/images/ots/favicon.ico" type="image/x-icon" /> | |
<script> | |
/*<![CDATA[*/ | |
var ctx='/otn/'; |