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
160
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
130
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
110
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
93
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
100
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
120
PyCon2014China-Zhuhai-jeff
zoomquiet
0
89
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
120
DevFest2014-Zhuhai-Polymer
zoomquiet
0
420
TEDxJLUZH MOMENT future
zoomquiet
0
380
Other Decks in Technology
See All in Technology
SRE × マネジメントレイヤーが挑戦した組織・会社のオブザーバビリティ改革 ― ビジネス価値と信頼性を両立するリアルな挑戦
coconala_engineer
0
250
オブザーバビリティと育てた ID管理・認証認可基盤の歩み / The Journey of an ID Management, Authentication, and Authorization Platform Nurtured with Observability
kaminashi
1
700
Observability — Extending Into Incident Response
nari_ex
1
350
20251027_マルチエージェントとは
almondo_event
1
430
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
4
3.4k
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
190
OpenTelemetry が拡げる Gemini CLI の可観測性
phaya72
2
2.3k
AI時代の開発を加速する組織づくり - ブログでは書けなかったリアル
hiro8ma
1
310
頭部ふわふわ浄酔器
uyupun
0
110
CREが作る自己解決サイクルSlackワークフローに組み込んだAIによる社内ヘルプデスク改革 #cre_meetup
bengo4com
0
340
AWS DMS で SQL Server を移行してみた/aws-dms-sql-server-migration
emiki
0
240
現場の壁を乗り越えて、 「計装注入」が拓く オブザーバビリティ / Beyond the Field Barriers: Instrumentation Injection and the Future of Observability
aoto
PRO
1
600
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
930
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
130k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Into the Great Unknown - MozCon
thekraken
40
2.1k
We Have a Design System, Now What?
morganepeng
53
7.8k
Balancing Empowerment & Direction
lara
5
700
Making the Leap to Tech Lead
cromwellryan
135
9.6k
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