Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PyCon2014China-Zhuhai-high performance
Search
Zoom.Quiet
November 17, 2014
Technology
0
130
PyCon2014China-Zhuhai-high performance
141115 in Zhuhai
http://zoomq.qiniudn.com/CPyUG/PyCon2014China/141115zh-pm6-pyhq.MP3
Zoom.Quiet
November 17, 2014
Tweet
Share
More Decks by Zoom.Quiet
See All by Zoom.Quiet
PyCon2014China-Zhuhai-meta programming
zoomquiet
1
96
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
75
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
80
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
55
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
70
PyCon2014China-Zhuhai-jeff
zoomquiet
0
52
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
81
DevFest2014-Zhuhai-Polymer
zoomquiet
0
340
TEDxJLUZH MOMENT future
zoomquiet
0
310
Other Decks in Technology
See All in Technology
サーバレスでモバイルアプリ開発! NTTコム「ビジネスdアプリ」のアーキテクチャ / The architecture of business d app
nttcom
12
240
Tricentisにおけるテスト自動化へのAI活用ご紹介/20240910Shunsuke Katakura
shift_evolve
0
200
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
190
突撃! 隣のAmazon Bedrockユーザー 〜YouはどうしてAWSで?〜
minorun365
PRO
3
390
Jetpack Compose Modifier 徹底解説 / Jetpack Compose Modifier
wiroha
0
200
テスト”ケース”駆動開発 で手戻りをなくそう
ryohma0510
0
320
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
130
『GRANBLUE FANTASY: Relink』最高の「没入感」を実現するカットシーン制作手法とそれを支える技術
cygames
1
140
Oracle Autonomous Database:サービス概要のご紹介
oracle4engineer
PRO
1
7.1k
フルカイテン株式会社 採用資料
fullkaiten
0
32k
PdMはどのように全てのスピードを上げられるか ~ 非連続進化のための具体的な取り組み ~
sansantech
PRO
4
1.3k
DevRelの始め方
moongift
PRO
1
390
Featured
See All Featured
Designing for humans not robots
tammielis
248
25k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
We Have a Design System, Now What?
morganepeng
48
7.1k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
Being A Developer After 40
akosma
84
590k
Writing Fast Ruby
sferik
623
60k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
What the flash - Photography Introduction
edds
67
11k
The World Runs on Bad Software
bkeepers
PRO
64
11k
Transcript
Python是否适合高性能web开发 温铭
高性能服务端的要素 • 多:高并发,支撑用户多 • 快:单个请求处理速度快 • 易:易开发,易维护,方便调岗和招人
技术实现 • 高并发:异步 • 处理快:缓存,减少IO • 易开发:库,只用关心逻辑
通用的架构 • Nginx -> py -> memcached(redis) -> mysql •
同步 • 跨服务器请求
理想的架构 • 异步、同步语法 • 多级缓存:进程、本机kv、跨服务器kv、 DB • 没有网络IO
现实:异步 • Tornado:第三方库齐全,回调 • Gevent:不改代码 • Asyncio New in python
3.4
现实:缓存 • functools.lru_cache New in version 3.2
Python的优势 • 丰富的库 • 开发快 • 易上手
嫁接 • Python + ?
嫁接 • Openresty:替换nginx,提供异步和共享缓 存 • Nginx -> py -> memcached(redis)
-> mysql • openresty-> py -> cache(openresty ) -> kv(openresty ) -> mysql(openresty )
自己写服务端? • 用户注册、登录 • 短信通知 • 消息推动 • 聊天 •
存储 • 支付 • …
不用写服务端 • Parse • LeanCloud(AVOS)
Q&A