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
100
PyCon2014China-Zhuhai-bpm.py
zoomquiet
0
80
PyCon2014China-Zhuhai-luna kv db
zoomquiet
0
84
PyCon2014China-Zhuhai-seed studio
zoomquiet
0
65
PyCon2014China-Zhuhai-Docker Registry Build By Python
zoomquiet
0
78
PyCon2014China-Zhuhai-jeff
zoomquiet
0
58
PyCon2014China-Zhuhai-pythonic front-end
zoomquiet
0
87
DevFest2014-Zhuhai-Polymer
zoomquiet
0
370
TEDxJLUZH MOMENT future
zoomquiet
0
330
Other Decks in Technology
See All in Technology
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
生成AIのガバナンスの全体像と現実解
fnifni
1
180
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
470
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
250
Wantedly での Datadog 活用事例
bgpat
1
430
podman_update_2024-12
orimanabu
1
260
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
ハイテク休憩
sat
PRO
2
140
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Building Applications with DynamoDB
mza
91
6.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Bash Introduction
62gerente
608
210k
Thoughts on Productivity
jonyablonski
67
4.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building an army of robots
kneath
302
44k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Practical Orchestrator
shlominoach
186
10k
Visualization
eitanlees
146
15k
Designing for humans not robots
tammielis
250
25k
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