登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

秒杀系统的设计与实现毕业论文

 2021-11-07 09:11  

摘 要

本文的主要工作是设计并实现一个完整的秒杀系统。系统主要分为秒杀服务和中后台管理服务,秒杀服务由消费者使用,主要进行商品的抢购;中后台管理服务提供给管理员使用,主要提供商品管理、用户管理等功能。

与此同时,高并发带来的服务器高负载是秒杀系统必须面对的难题,本文采用分库分表、限流和数据缓存等措施尽量降低高并发带来的负面影响,从而保证秒杀服务在高并发情景下的正常运行。

文章按照“分析-设计-实现”的软件生命周期,呈现了秒杀系统开发的完整流程。其中在设计阶段针对高并发场景对系统进行了优化,其优化思想对其他高并发场景下的应用的设计与实现也具有借鉴意义。

秒杀系统的后端开发使用Java语言,配合Springboot中的Spring进行容器管理,使用Mybatis作为数据持久化工具,Redis作为缓存工具,为用户提供接口服务;前端开发使用Vue组件技术,配合ElementUI组件库实现前端页面的搭建。

关键词:秒杀系统;高并发;限流;数据分片

Abstract

The main work of this thesis is to design and implement a complete flash sale system. The system is mainly divided into flash sale service and management service. The flash sale service is used by consumers and mainly carries out the flash sale of goods.

In addition, the high server load caused by high concurrency is a vital problem that the flash sale system should face to. In this thesis, measures such as data sharding, rate limite and data caching are used to minimize the negative impact of high concurrency to ensure that the service is running normally under high concurrency.

According to the software life cycle of "analysis-design-implementation", the thesis presents the complete process of flash sale system development. Among them, the system is optimized for high concurrency scenarios during the design stage, and its optimization solutions have enlightening significance for applications and design and implementation in other high concurrency scenarios.

The system is developed by Java language, cooperates with Spring in Springboot for container management, Mybatis acts as a data persistence tool, and Redis as a caching tool, which provids interface services for users; front-end development uses Vue component technology, with ElementUI component library to achieve front-end The construction of the page.

Key Words:flash sale;highly concurrent;rate limite;data sharding

目录

第1章 绪论 1

1.1 研究背景 1

1.2 研究现状 1

1.3 研究目标 2

1.4 主要工作 2

1.5 论文组织结构 3

第2章 秒杀系统的需求分析与设计 4

2.1 需求分析 4

2.1.1 功能性需求分析 4

2.1.2 非功能需求分析 6

2.2 系统设计 6

2.2.1 总体设计 7

2.2.2 数据库设计 8

2.2.3 详细设计 11

第3章 针对高并发场景的系统优化 16

3.1 数据分片 16

3.1.1 背景 16

3.1.2 常见分片策略 17

3.1.3 数据分片设计 17

3.2 请求限流 19

3.2.1 背景 19

3.2.2 常用限流算法 19

3.2.3 限流设计 22

3.3 数据缓存 23

3.3.1 背景 23

3.3.2 NOSQL以及NOSQL数据库 23

3.3.3 数据缓存设计 24

第4章 秒杀系统的实现 25

4.1 业务实现 25

4.1.1 秒杀服务模块的实现 25

4.1.2 商品管理模块的实现 26

4.1.3 处理失效记录的实现 27

4.2 系统优化实现 28

4.2.1 IP限流实现 28

4.2.2 数据缓存实现 29

4.3 其它实现 29

第5章 秒杀系统的测试与分析 31

5.1 测试环境部署 31

5.1.1 硬件环境 31

5.1.2 软件环境 31

5.2 功能性测试 31

5.2.1 购物车管理模块测试用例 33

5.2.2 个人信息管理模块测试用例 34

5.2.3 商品管理模块测试用例 36

5.3 并发性能测试 37

5.3.1 Jmeter简介 37

5.3.2 测试与分析 38

5.4 测试总结 40

第6章 总结与展望 41

6.1 总结 41

6.2 工作展望 41

6.2.1 业务层面 41

6.2.2 技术层面 41

参考文献 42

致谢 43

绪论

研究背景

秒杀活动作为一种能够快速吸引顾客、增加品牌影响力的销售手段,以低廉的价格,极大地刺激了消费者的购买欲望[1]。我国的双十一、双十二、六一八,国外的黑色星期五等购物节的秒杀抢购活动每年都会吸引上千万的用户参加,交易额高达千亿。鉴于秒杀抢购活动的常见性和商业规模,对其进行学习研究是必要的。

参与秒杀抢购的商品通常价格低廉,对消费者有很大的吸引力,往往在活动刚开始的几秒钟内就售罄,例如2019年双十一购物节中,仅仅14秒钟成交额就突破了10亿。所以,秒杀业务相对于传统业务需要具有更强的并发能力(并发性将在下段落详细讨论)。作为一种商业赢利手段,秒杀系统需要满足7*24小时高可用,即对稳定性有较高要求。随着网站的业务发展,对秒杀抢购系统所支持的业务与并发数量的需求也会增加,这就要求系统有一定的可扩展性。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图