英文:
What are the best tools for websocket?
问题
我在我的项目中使用Node.js进行通知。我使用socket.io和redis pub/sub。我喜欢socket.io,因为它为我提供了一种统一的接口,适用于各种传输方式(websocket、长轮询等),并且它还提供了跨浏览器的客户端库。但是,我在调试Node.js代码时遇到了很多问题。我经常遇到CPU问题,很难找出原因。这就是为什么我想使用其他工具代替Node.js,比如Go或Erlang,但我找不到这些语言上的类似socket.io的工具。
英文:
I have node.js for notifications in my project. I use socket.io and redis pub/sub. I like socket.io because it gives me one interface for all kind of transports (websocket, long polling and etc.) and it gives me crossbrowser client library. But I have a lot of problems with debuging code on nodejs. I have problems with cpu very often and its hard to figure out reason of it. That why I want to use tool instead of node.js maybe go or erlang but I can't find tools such as socket.io on these languages
答案1
得分: 3
我在几年前的一两年里参与了几个Node.js项目,我发现使用Go和调试Go项目要容易得多。但这更多是个人口味的问题。
Go有一个socket.io包。
如果你只需要从服务器向浏览器传输数据,我建议你尝试一下Server Sent Events;也有几个很好的Go包可以用。例如esource或eventsource。
英文:
I worked on several node.js projects over a year or two several years ago and I find working with Go and debugging Go projects much easier. But that's as much personal taste as anything else.
There is a socket.io package for Go.
If you only need data from the server to the browser I'd recommend you give Server Sent Events a try; there are several nice Go packages for that, too. For example esource or eventsource.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论