duanbamo0127 2015-01-29 10:40
浏览 220

使用socket.io连接nodejs服务器和golang服务器的缺点是什么?

I am working on web application which includes visualization - pie, bar, grid etc.

Note:

Application includes

  1. Two technologies nodejs and golang.

  2. Nodejs is used for performing simple operations, routing, validation etc.

  3. Golang is used for db connection, processing data, etc.

Architecture/ Flow:

  1. Client(angularjs) will communicate to nodejs server.

  2. Nodejs will talk to golang server using socket.io to get processed data.

  3. Nodejs will respond to client after getting processed data from golang.

Here is my question

Is there any drawback of using socket.io in this case?

Any suggestion or idea will be grateful.

  • 写回答

2条回答 默认 最新

  • dou4381 2015-01-29 11:24
    关注

    This is mostly an opinion-based question, but I could see some drawbacks.

    Socket.io is a solution designed to unify communications between a browser and a server. It is useful to implement highly dynamic web sites, and hides the different underlying solutions/protocols which are more or less well supported by the browsers (websockets, long polling, etc ...).

    It is not really designed to communicate between two servers, even if it can probably be used for this as well. Since you can develop the node.js and Go servers, just choose an adequate protocol for that. You do not have to wrap it into a layer such as socket.io.

    Go supports socket.io through third-parties libraries such as: https://github.com/googollee/go-socket.io

    It is an extra dependency you have to handle for your application.

    评论

报告相同问题?

悬赏问题

  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块