V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
iammutex
V2EX  ›  Python

请教:python+thrift的结构做service,如何实现部署的自动化

  •  
  •   iammutex · 2012-10-16 15:08:37 +08:00 · 4412 次点击
    这是一个创建于 4218 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用python进行底层模块开发,thrift方式提供外部接口。由于是web应用,变化会比较频繁。用thrift自带的server的话,每次有功能变更都需要重启server,期间会导致服务暂时中断。请问有没有什么集成部署的方式,可以实现平滑的reload。
    PS:看过douban的策略,使用pastescript,不过对其原理和使用方法都不甚了解,希望有了解的朋友给指点一二。
    多谢!
    4 条回复    1970-01-01 08:00:00 +08:00
    superisaac
        1
    superisaac  
       2012-10-16 17:27:57 +08:00   ❤️ 1
    还在迅猛开发的过程中不要用thrift
    iammutex
        2
    iammutex  
    OP
       2012-10-18 16:28:03 +08:00
    @superisaac 等api稳定后再用thrift重新封装?
    Livid
        3
    Livid  
    MOD
       2012-10-18 17:55:08 +08:00   ❤️ 1
    将代码放入 git 中,部署过程写成 Ansible 的 playbook,每次需要部署的时候,运行一下这个 playbook 即可。

    http://ansible.cc/
    phuslu
        4
    phuslu  
       2012-10-19 11:25:04 +08:00
    看到有人做了这个, 思路倒是蛮好的, 但是性能不晓得哎.
    https://github.com/blackwithwhite666/socket_zmq
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2443 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:03 · PVG 20:03 · LAX 05:03 · JFK 08:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.