推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
SergioChan
V2EX  ›  Python

[开源]用 tornado 的 TCPServer 封的用于实现服务器之间通信的 tornado-TCP 服务器,求指点,求轻喷

  •  1
     
  •   SergioChan ·
    SergioChan · Jul 12, 2015 · 5306 views
    This topic created in 3965 days ago, the information mentioned may be changed or developed.
    https://github.com/SergioChan/tornado-TCP
    项目地址如上
    主要是服务器之间有些通信如果也和客户端一样用http的话对于连接显得很浪费,如果用TCP来连接服务器之间的通信,例如日志服务,短信服务,notification服务,还有一些纯内部调用的服务,都可以通过TCP长连接随时调用,随时获得结果,而不用每次去建立一个http请求.所以想基于tornado做一个简单的能扩展的TCP Server端,现在已经能运转了,求各位大神指点,本人学Python不过三个月,还有很多不足.如果有人也感兴趣想把它写成框架,也可以一起来写,那是再好不过的了~
    Supplement 1  ·  Jul 21, 2015
    http://chenyh-blog.com/tornado-tcp%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%97%B4%E5%86%85%E9%83%A8%E9%80%9A%E8%AE%AFtcp%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%80%A7%E8%83%BD%E9%AA%8C%E8%AF%81/
    这是完成之后进行的压力测试报告和介绍。
    结论是当基于Django的HTTP Server以单进程模式运行的时候,其处理速度大概是相同条件的tornado-TCP服务器的一半以上。
    语文学的不好。。一直觉得“一半以上”的描述有误。。求纠正
    详细的可以自己去看
    一个人写这种东西真的好寂寞啊!快来搅基啊!
    3 replies    2015-07-21 11:11:39 +08:00
    cheneyeah
        1
    cheneyeah  
       Jul 12, 2015   ❤️ 2
    个人认为如果做好连接复用,http协议并不会比其他基于tcp的自定义协议要差多少,起码不会成为瓶颈。同时又可以得到非常多的工具链。
    wolegequ
        2
    wolegequ  
       Jul 12, 2015
    1.1 spdy
    SergioChan
        3
    SergioChan  
    OP
       Jul 21, 2015
    @wolegequ 都已经死掉了= =
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3042 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 13:59 · PVG 21:59 · LAX 06:59 · JFK 09:59
    ♥ Do have faith in what you're doing.