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
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PyCon2014China-Zhuhai-high performance
141115 in Zhuhai
http://zoomq.qiniudn.com/CPyUG/PyCon2014China/141115zh-pm6-pyhq.MP3
Zoom.Quiet
November 17, 2014
More Decks by Zoom.Quiet
See All by Zoom.Quiet
PyCon2014China-Zhuhai-meta programming
zoomquiet
1
180
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
160
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
150
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
150
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
170
PyCon2014China-Zhuhai-jeff
zoomquiet
0
160
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
190
DevFest2014-Zhuhai-Polymer
zoomquiet
0
490
TEDxJLUZH MOMENT future
zoomquiet
0
450
Other Decks in Technology
See All in Technology
2027年のMetricKit
kantacky
0
170
Rust×eBPFでEDRっぽいものをつくる
sunlife3
2
940
DDDのエッセンスを取り入れたAIでの開発
ak2ie
1
220
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
460
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
130
安全性・開発速度・ユーザー体験の あいだで考える 事業会社のプロダクトセキュリティ
mixi_engineers
PRO
0
110
同じWAFが、攻撃の“形”は弾く── 正当な“形”の不正は通す
kuroneko13
0
270
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
350
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
巨大気象データと戦う ― サロゲートモデル学習を高速化する圧縮技術
gpuunite_official
0
260
Kiro WebとCloud Sessions
nagisa53
2
190
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Claude Code のすすめ
schroneko
67
230k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
A Tale of Four Properties
chriscoyier
163
24k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Making Projects Easy
brettharned
120
6.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
520
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