没有项目描述
bluemax的Python项目详细描述
bluemax
bluemax是一个使用websockets的python rpc服务器。
其概念是可以编写python函数和
在模块的__all__
属性中公开它们。
actor crud broadcast
| | |
|------>| |
| | |
|<------| |
| |-------->|
| | |
|<------|---------|
| | |
crud的错误对演员来说是局部的。演员 会在成功时得到认同 其他用户通过广播了解crud。
使用注释允许客户端 推断功能。请参见sample.add函数。
有关多个服务器的部署,请参见:
http://www.tornadoweb.org/en/stable/guide/running.html#running-behind-a-load-balancer
使用:
pip install bluemax
要安装:
python3.7 -m venv venv
. venv/bin/activate
pip install -e git+https://bitbucket.org/blueshed/bluemax.git#egg=bluemax
要运行,可以选择使用redis的workers或standalone。
独立运行:
bluemax run.server -m bluemax.tests.foo
与redis一起运行:
pip install bluemax[redis]
docker run -p 6379:6379 -d redis:2.8
然后创建一个conf.yml文件,其中包含:
---
procedures: tests.foo
services: tests.foo.services
REDIS_URL: redis://localhost
然后在一个终端上运行一个工人 另一个服务器。
bluemax run.worker -c conf.yml
以及
bluemax run.services -c conf.yml
以及
bluemax run.server -c conf.yml
现在转到http://localhost:8080并添加一些数字。
要创建自己的项目,请尝试:
bluemax sidney olive
您可以为模块使用任何名称。它将为日志创建扩展点, 设置、url和基本过程模块。Bluemax会找你的 过程。all在您传入的模块中。