Coder Social home page Coder Social logo

secondkill's Introduction

秒杀系统整合

简介

  该项目起源于慕课网秒杀系列课程(共四套),由于课程是2015年的,某些框架和技术都逐渐被替代,我在实现这套课程的时候选用了springboot + spring data jpa + freemarker模板引擎 , 并且对系统做了优化(比如通过websocket在秒杀结束后服务端对客户端的实时消息推送),以及使用redis分布式锁解决了多线程高并发情况下的线程安全问题。

适合人群

  1. 学习慕课网秒杀系列课程的同学

  2. 如果你想快速搭建一个秒杀系统来进行压力测试或进行优化

  3. 想快速构建一个秒杀的场景

说明

  该项目主要侧重点在于秒杀的几个接口,以及围绕这些接口作出的性能优化(redis缓存,redis分布式锁)以应对高并发的场景,而前端方面较为简单。

使用说明

  1. 修改yml文件中的mysql用户名密码,以及redis用户名密码即可

  2. 页面入口 127.0.0.1/seckill/list

  3. 秒杀压测接口 127.0.0.1/kill/1000/execution

  4. 核心类 SecPressureTestService(压测类), RedisLock(redis分布式锁),WebSocketService(websocket服务端核心类)

特别鸣谢

  感谢慕课讲师yijun zhang, 同时感谢在完成过程中一些有帮助的博客。

secondkill's People

Contributors

wangzns avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.