首页|基于WebSocket协议的消息安全推送系统设计与实现

基于WebSocket协议的消息安全推送系统设计与实现

扫码查看
为节约应用系统的带宽资源,提高客户端接收消息的可靠性和安全性,设计了一个独立的消息安全推送系统,提供开放的接口供应用系统调用.客户端向应用系统请求有时延风险的业务时,首先触发与推送系统的WebSocket连接,获取客户标识和密钥,然后携带标识再次与应用系统发起HTTP连接办理业务.在耗时业务处理过程中,客户端无需与应用系统保持长连接.应用系统完成业务后,将响应消息连同客户标识通过HTTP连接转发给推送系统缓存.推送系统将多位客户的响应消息打包加密成一条密文推送到客户端,客户端解密得到请求的业务结果.推送系统基于Golang语言和MySQL数据库实现,对外提供符合表述性状态转移(REST)架构的通用接口.功能测试结果表明,客户端能准确接收来自推送系统的消息,实现了预期功能.
Design and implementation of a secure message feeding system based on WebSocket protocol
To save the bandwidth resources of the application system and improve the reliability and security of messages received by clients,an independent message security feed system was designed to provide an open interface for the application system to call on.When a client requests a time-delayed risky business from the application system,the system first triggers a WebSocket connection with the feed system to obtain the client identification and key,and then carries the identification to initiate an hyper text transfer protocol connection with the application system again to handle the business.During the time-consuming business processing,the client does not need to maintain a long connection with the application system.Once the application system completes its business,it sends the response message,along with the client identification,to the feed system via an hyper text transfer protocol connection.The feed system packages and encrypts the response messages of multiple clients into a cipher text and feeds it to the clients,who decrypts it to get the requested business results.The feed system was implemented using the Golang language and MySQL database,and provides a generic interface that conforms to the representational state transfer(REST)architecture for external access.Functional tests results show that the client can accurately receive messages from the feed system and achieve the expected functions.

message feedingconfidentialitytime delayingWebSocket protocol

徐智勇、戴祖旭

展开 >

武汉工程大学光电信息与能源工程学院、数理学院,湖北 武汉 430205

消息推送 机密性 时延 WebSocket协议

国家自然科学基金

61771353

2024

武汉工程大学学报
武汉工程大学

武汉工程大学学报

影响因子:0.463
ISSN:1674-2869
年,卷(期):2024.46(3)