V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 3111 views
    This topic created in 3671 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   ·   Solana   ·   1176 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:45 · PVG 01:45 · LAX 10:45 · JFK 13:45
    ♥ Do have faith in what you're doing.