Closed fqzhao-win closed 1 year ago
这块具体的逻辑在jina内部,clip-as-service是对jina内部逻辑的封装,想要了解细节的话你可以具体看一下jina flow的文档:https://docs.jina.ai/concepts/flow/
谢谢您,我刚刚看了flow的文档,想问一下您flow支持添加http协议的外部程序嘛
from jina import Flow,Document
def main(): f = Flow().add(host=[' http://192.168.0.243:8036', ' http://192.168.0.243:8038'], external=True) print(f.is_flow_ready())
if name == 'main': main()
这里不知道为什么打印出的是Flase
ERROR GRPCClient@3104 RpcError: failed to connect to all [01/04/23 15:29:23] addresses
basically, we only support grpc-based external service. Thus, the right approach is to start external service ahead:
# the flow uses default `grpc` protocol
with Flow(port='12345').add(....) as external_flow:
# specify the external service host and port
with Flow().add(host='0.0.0.0', port=external_flow.port, external=True) as f:
f.post(...)
The communication among gateway, and (external-)executors are all grpc-based protocol.
ok,thank you very much
不好意思再麻烦一下大家,如果我现在有一个flask服务,我在gpu上面复制了多个相同程序,分别占用不同的端口,想用ven-work-sink通信架构来解决并发问题,我可以用flow来实现嘛,把flask的内部程序做成Executor
是的,完全可以用executor来解决并发扩展问题。
今天看了一天文档,但是还是没有思路,再麻烦一下你们,就是我有一个服务,这个服务的参数是一个字符串列表,想用flow实现负载均衡,jina可以实现自动对列表切分,然后把结果拼接起再返回吗,我只需要给一个切分的值,不需要做其他设计可以实现吗,头都要炸了
ven-worker-sink的通信架构在clip-as-service中仍然保留嘛,在哪个部分的代码,想要具体学习一下这个部分