Coder Social home page Coder Social logo

delayq's Introduction

delayq

延迟队列,基于redis的zset,list数据结构开发的。写的一个小应用。

项目依赖库

参考

https://tech.youzan.com/queuing_delay/ 有赞的延迟队列

参考有赞这篇文章来编写程序。

需求背景:

1. 用户下单发送短信服务
2. 订单多少分钟未支付需要通知客户支付
3. 订单未支付需要关闭订单,并退还库存
4. 店铺信息快要到期时候发送通知
5. 订单完成后通知用户评价
6. 红包 24 小时未被查收,需要延迟执退还业务

等等需求

解决的方法有:

1. 扫表

业务少的时候,可以扫表来解决,数据量大了,扫表肯定会出现时间的误差,效率会很低。 每个业务也需要维护自己的一套扫表逻辑。业务越来越多,扫表的业务也会越来越多。但是这部分逻辑又是重复的

2. 延迟队列

延迟队列功能解决上面的需求

delayq's People

Contributors

jiujuan 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.