https://github.com/nameko/nameko
A microservices framework for Python that lets service developers concentrate on application logic and encourages testability.
除了 nameko
还有其他选择吗?为什么 python
的微服务框架这么少?
# helloworld.py
from nameko.rpc import rpc
class GreetingService:
name = "greeting_service"
@rpc
def hello(self, name):
return "Hello, {}!".format(name)
我的猜想,感觉当真实业务需要使用微服务来支持的时候,Python就不适合来支撑这种规模的业务了。瑞士军刀的优点无法在大规模工程化中体现了。