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 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏