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
140
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
110
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
87
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
86
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
71
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
84
PyCon2014China-Zhuhai-jeff
zoomquiet
0
65
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
95
DevFest2014-Zhuhai-Polymer
zoomquiet
0
380
TEDxJLUZH MOMENT future
zoomquiet
0
340
Other Decks in Technology
See All in Technology
君も受託系GISエンジニアにならないか
sudataka
2
430
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.6k
Classmethod AI Talks(CATs) #17 司会進行スライド(2025.02.19) / classmethod-ai-talks-aka-cats_moderator-slides_vol17_2025-02-19
shinyaa31
0
120
Helm , Kustomize に代わる !? 次世代 k8s パッケージマネージャー Glasskube 入門 / glasskube-entry
parupappa2929
0
250
関東Kaggler会LT: 人狼コンペとLLM量子化について
nejumi
3
580
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
18
7.5k
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.3k
7日間でハッキングをはじめる本をはじめてみませんか?_ITエンジニア本大賞2025
nomizone
2
1.8k
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
340
目の前の仕事と向き合うことで成長できる - 仕事とスキルを広げる / Every little bit counts
soudai
24
7.1k
自動テストの世界に、この5年間で起きたこと
autifyhq
10
8.5k
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
13
3.4k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
What's in a price? How to price your products and services
michaelherold
244
12k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Building Your Own Lightsaber
phodgson
104
6.2k
Site-Speed That Sticks
csswizardry
4
380
Facilitating Awesome Meetings
lara
52
6.2k
How to train your dragon (web standard)
notwaldorf
91
5.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
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