dongqiao5573 2018-01-03 08:32
浏览 23

ajax是否可靠地开发用户到用户聊天系统? [关闭]

I am new to web technology and i want to know if ajax is good for build a user chat system (Where users can chat with each other just like an messenger).

will this slow down the server, and if so, what would be a better technology for implementing it.

If not, how would you suggest to implement that.

I am working in Laravel. Thank you all of you in advance

  • 写回答

2条回答 默认 最新

  • douding_1073 2018-01-03 08:37
    关注

    You basically have two options.

    1. Using a pull setup where the client requests updates from the chat server, using ajax. Then each client will be updated every 1.sec or similar.

    2. Using a push setup where the client maintains a connection to the server and sends new chats when they get available. This can be done using websockets.

    I would go for setup 2 because it reduces the load on the server as amount of client grows. But try to research into the two options.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥15 帮我写一个c++工程