V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
andyhu
V2EX  ›  Node.js

有人基于socket.io开发过类似于多人聊天室的应用吗?

  •  
  •   andyhu · 2013-07-20 13:55:38 +08:00 · 7101 次点击
    这是一个创建于 3925 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近想用socket.io开发一个类似QQ群这种在线的多人聊天室,支持pub/sub模式以及私聊,支持用户登录验证,以及划分不同的room。不知有什么现成的基于socket.io的库可以用吗?
    12 条回复    1970-01-01 08:00:00 +08:00
    inconsole
        1
    inconsole  
       2013-07-20 14:18:34 +08:00   ❤️ 1
    leofml
        2
    leofml  
       2013-07-20 14:32:33 +08:00   ❤️ 1
    dtynn
        3
    dtynn  
       2013-07-20 19:33:27 +08:00
    python的话后端有一个tornadio2可以用一用
    https://github.com/mrjoes/tornadio2
    jiyinyiyong
        4
    jiyinyiyong  
       2013-07-21 00:33:02 +08:00
    https://github.com/DanielBaulig/chat.io
    未必有用, 可以看下
    notedit
        5
    notedit  
       2013-07-21 00:51:52 +08:00   ❤️ 2
    可以看一下 pusher.com
    andyhu
        6
    andyhu  
    OP
       2013-07-21 06:47:45 +08:00
    @notedit 这个pusher好像被墙了吧,以前看到过这,travis-ci.org应该用的就是它
    wity_lv
        7
    wity_lv  
       2013-07-21 07:53:15 +08:00
    我年初做了一个server,功能很简单,以room的方式划分, 支持pub/sub。
    客户端:
    js, java, cocoas(未整理)
    登陆控制暂时为支持, 有兴趣可以贡献代码:
    https://github.com/lvjian700/node-pusher
    mgplus
        8
    mgplus  
       2013-07-21 11:14:44 +08:00
    我觉得没必要用socket.io, 用WebSocket就够了, 配合Redis可以很简单的实现Pub/Sub, 我自己写了一个Demo: http://untitled.us
    notedit
        9
    notedit  
       2013-07-21 13:29:11 +08:00
    @andyhu 官网被墙了 但api什么的可以用
    andyhu
        10
    andyhu  
    OP
       2013-07-21 21:18:50 +08:00
    @mgplus 主要是考虑到socket.io的兼容性,flash/long pulling/jsonp fallback等等,可以兼容几乎所有设备,websocket很多浏览器不兼容啊
    mgplus
        11
    mgplus  
       2013-07-21 22:53:56 +08:00
    @andyhu 现在WebSocket还很不稳定, 这会造成服务器的一些开销, 如果用Long Polling来解决兼容性, 那服务器的开销会非常大, 而且聊天及时性也不足. 另外如果socket.io基于Java或是.NET, 我没什么偏见, 但是Node.js的目的就是为了提高效率.
    paloalto
        12
    paloalto  
       2014-01-02 03:08:07 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3227 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:25 · PVG 21:25 · LAX 06:25 · JFK 09:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.