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

现在有没有方案可以在函数计算中部署 Python RPC 调用?

  •  
  •   einverne · Jun 25, 2021 · 2351 views
    This topic created in 1921 days ago, the information mentioned may be changed or developed.

    比如阿里云的函数计算,或者 lambda 函数中部署的服务可不可以实现相互之间的 RPC 调用?

    因为函数计算大部分只能支持 HTTP 触发,所以想到可不可以使用 JSON-RPC 实现,不知道还有没有更好的办法。

    2 replies  •  2021-07-02 14:59:38 +08:00
    abersheeran
        1
    abersheeran  
       Jun 25, 2021
    可以啊。https://github.com/abersheeran/rpc.py 用 WSGI 模式,直接在阿里云函数计算里指定 app 作为入口就行,那玩意用的就是 WSGI 协议。

    配合 https://github.com/abersheeran/aligi 你甚至可以不修改代码套一个 API 网关在前面,同时使用 API 网关和 HTTP 触发器。
    song135711
        2
    song135711  
       Jul 2, 2021
    把函数计算的服务通过网关映射到公网地址, 通过公网节点互相调用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4442 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:52 · PVG 17:52 · LAX 02:52 · JFK 05:52
    ♥ Do have faith in what you're doing.