摘要
针对大型秒杀系统存在的高并发问题,本文采用SSM框架对其秒杀业务系统进行优化设计,研究提高秒杀系统的性能体验方法。该系统的前端采用Bootstrap框架进行页面设计,后端采用SSM框架进行业务逻辑的开发,并采用MySQL数据库,用Redis进行缓存。同时,对秒杀业务进行优化分析,把客户端逻辑放到MySQL客户端,避免网络延迟和垃圾回收(garbage collection,GC)的影响,并对系统的稳定性进行测试。测试结果表明,用存储过程事务的行级锁持有时间大约为0.002s,而Java客户端托管的事务行级锁持有时间大约为0.063s,相差0.061s。如果一个热点商品在同一时刻内竞争的人数为1 000,这样事务排队时间要多出0.061s×1 000=61s,这会造成不好的用户体验。本系统实现了多业务并行操作,优化了用户体验,提高了系统性能。该研究对开发者学习优化技巧以及提升系统优化的意识有一定作用。
Aiming at the high concurrency problem of the large second killing system, this paper uses the SSM framework to optimize its second killing business system, and studies the method to improve its performance experience. The system front page design with the bootstrap framework, and the back-end using SSM frame-work for the development of the business logic, database using the Mysql database, using redis cache. By ana-lyzing the optimization of seconds kill business, we need put the logic in client to Mysql to avoid network laten-cy and GC effects. Test results show that the use of the stored procedure affairs row-level locks hold time is a-bout 0. 002 s, while the Java client managed affairs row-level locks hold time is about 0. 063 s, differ 0. 061 s. If a hot commodity in the same time competition in 1 000 people, the number of such transaction queue times more 0. 061 sXl 000 = 61 s, which can cause a bad user experience. The system stability test results also can show the system is available and can realize many parallel operation of the business, meanwhile, have the abili-ty to optimize the user experience and improve the system performance. The research have certain effect for de-velopers learning skills and the improving of optimization system?s consciousness.
出处
《青岛大学学报(工程技术版)》
CAS
2017年第4期114-119,共6页
Journal of Qingdao University(Engineering & Technology Edition)