实时更新技术能够应用在很多场景中,比如在浏览器中聊天、股票报价、状态更新、现场直播。这些需求对时间的延迟性都很敏感,但是我们可以发现他们存在这共有的共性。

标准的HTTP请求,是一次请求对应一次相应。这就意味着服务器不能发送一个新消息给某一个浏览器。为了解决这些问题,有下面四种解决策略、traditional polling,long polling、HTTP streaming和websocket protocol 
 
具体细节可以查看https://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/
 
下面是Spring 的WebSocket文档

官方文档:https://docs.spring.io/spring/docs/4.0.0.RELEASE/spring-framework-reference/html/websocket.html

网友翻译的:http://blog.geekidentity.com/spring/spring_websocket_translation/

相关文章:

  • 2021-08-30
  • 2021-08-03
  • 2021-06-24
  • 2021-12-24
  • 2022-03-01
  • 2022-02-16
  • 2021-11-17
猜你喜欢
  • 2021-08-17
  • 2021-07-29
  • 2021-07-18
  • 2022-12-23
  • 2021-09-10
  • 2021-10-28
  • 2021-10-23
相关资源
相似解决方案