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
99
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
78
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
84
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
60
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
75
PyCon2014China-Zhuhai-jeff
zoomquiet
0
56
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
84
DevFest2014-Zhuhai-Polymer
zoomquiet
0
360
TEDxJLUZH MOMENT future
zoomquiet
0
330
Other Decks in Technology
See All in Technology
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
いざ、BSC討伐の旅
nikinusu
2
780
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
The Rise of LLMOps
asei
7
1.7k
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.1k
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
160
日経電子版のStoreKit2フルリニューアル
shimastripe
1
140
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Gamification - CAS2011
davidbonilla
80
5k
Embracing the Ebb and Flow
colly
84
4.5k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Applications with DynamoDB
mza
90
6.1k
Done Done
chrislema
181
16k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
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