推荐学习书目
› 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
exer
V2EX  ›  Python

python 分布式实现求解疑惑?

  •  
  •   exer · Apr 17, 2016 · 3407 views
    This topic created in 3816 days ago, the information mentioned may be changed or developed.

    有没有那种分布式可以实现如下功能

    在多个主机上运行 slave 后等待master任务分发,slave不存执行代码,只需连接 master 的端口或者网站来取 主服务器的 代码来执行

    marshal 从 web 接口取代码到本地通过 urlopen 链接,使用 exec 执行,这种方法试过 但是 主文件无法 import 自己的模块,难道只能使用 exec 把代码引用过来执行吗?

    h4x3rotab
        1
    h4x3rotab  
       Apr 17, 2016 via iPhone
    一般还是弄成 par 再把 binary 分发给 worker 比较好吧
    exer
        2
    exer  
    OP
       Apr 18, 2016
    @h4x3rotab 但是如果项目比较大的话。那代码架构也不好维护啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5030 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 08:26 · PVG 16:26 · LAX 01:26 · JFK 04:26
    ♥ Do have faith in what you're doing.