RickyDan
V2EX  ›  问与答

nodejs 调用 java 提供的 api

  •  
  •   RickyDan · Jul 1, 2016 · 4162 views
    This topic created in 3632 days ago, the information mentioned may be changed or developed.

    要使用 nodejs 重构前端,后端使用 java 提供的 api 。使用 nodejs 调用 java 的 API 是否可以通过 RabbitMQ 这个模块进行通讯,然后 node 拿到数据再渲染输出到浏览器端?具体实现细节可以重构时再踩坑。问问有相关经验的童鞋这种思路是否可行的

    1 replies    2016-07-01 21:55:38 +08:00
    jerray
        1
    jerray  
       Jul 1, 2016
    可以实现, RabbitMQ 官方也提供了 RPC 模型。
    那么,为什么不考虑直接用 RPC 或者 HTTP 而非得通过 RabbitMQ 呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5122 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 09:29 · PVG 17:29 · LAX 02:29 · JFK 05:29
    ♥ Do have faith in what you're doing.