摘要
随着计算机的普及与互联网技术的发展,人们的生活方式发生了巨大的变化。基于B/S(Browser/Server)结构的系统不需要用户安装客户端软件,它运行在客户端浏览器上,系统升级或维护是只需更新服务器端软件即可,这样就减轻了系统维护与升级的成本。在线游戏对战平台则借助计算机及互联网,采用B/S结构,方便的完成在线游戏对战。课题结合软件工程理论基础,在Node.js的技术基础上,研究了Web开发技术及网站架构,解决了对战平台的可靠性,安全性,高并发访问等问题。最终实现的平台采用了分层软件架构,使用的模式有MVVM,MVC和AOP,提供了优秀的用户体验,完成了游戏对战的业务逻辑功能需求,并将系统成功应用到实际生活中。系统还实现了基于角色的权限控制模块,在系统后台管理中,限制了管理员的访问权限,通过为管理员设置角色,使不同角色的管理员具有不同的管理权限。除此之外,系统实现了强大的日志记录模块,并且针对用户的所有输入都做了客户端和服务端验证,保证了系统的安全性。
关键词 Websocket; H5; 游戏对战; 平台; 分层架构
The H5 Online Game Platform Based on Websocket |
Abstract
Along with the popularity of computer and Internet technology, people's lifestyle has undergone tremendous changes. B/S (Browser/Server) structure-based system does not require users to install client software, which runs on the client browser, systems upgrades or maintenance can only update the server-side software, thus reducing the system maintenance and the cost of the upgrade. The online game platform with the help of computers and the Internet, using B/S structure, to facilitate the completion of the online games. The combination of the theoretical basis of software engineering topics, studied the use of technology and architecture of Node.js MVC, Web developers to solve the reliability of voting systems, security, malicious voting and high concurrent access and other issues. The ultimate realization of system uses alayered software architecture, use the pattern of the MVVM, MVC and AOP provides a good user experience, completion of the needs of the business logic functions, and successfully applied to real life. The system also implements a role based access control module for limiting administrator access. In addition, the system logging module, client and server authentication, and user's input to ensure the security of the system.
Keywords Game Platform; H5; Websocket; Layered Architecture