Giter Club home page Giter Club logo

quartzserver's Introduction

项目要求:

1、任务实时性要求比较高
2、同时执行任务的数量比较大。

问题:

1、基于数据库的持久化任务,当任务数量比较多时,任务的触发会有延时
2、同时执行的任务比较多的时候,由于执行的任务耗时较长时,执行任务的线程池线程不够时,会有阻塞,导致任务排队,有些任务超过指定的执行时间过长,错过了执行。

解决方法:

1、采用redis来保存任务,服务器启动时,刚从redis中获取任务,加载到内存中,基于内存来运行
2、任务触发时,将触发的任务通过netty通道,来将要执行的任务转发出去,避免在job中执行业务造成线程阻塞的问题。

修改后的测试结果:

3秒内能够执行的任务数能够达到28000左右。

quartzserver's People

Contributors

fanshaowei avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

magicgis

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.