Giter Club home page Giter Club logo

scheduler's Introduction

调度器demo

详细的设计,包括数据结构,api的设计 详细

操作命令

  • docker
make run-docker
  • test
make test
  • build
make build

也可以增加-race检查冲突

make build-check-race
  • 运行
bin/schedule

现状及限制

  • 只是实现了函数级别的api,后续可以自由对接cmd活着http api
  • 数据存储层是简单实现的文件(json)记录的数据
  • 一些任务插件还没有做数据同步到状态,需要根据业务找一个合适的方式,在此demo就没有先实现
  • 自动执行的任务没有被记录在history中,因为觉得放进去不久就会占满。应该有一个更好的管理方式。

扩展及优化

  • 分离store和schedule(对应代码中的package)层,扩展的时候可以在中间加上cache,定时同步到store中。
  • 这个cache可以映射为schedule中的对象,在cache中做全局锁,之后可以横向扩张无状态的schedule,提高任务的并发量
  • 对于schedule中的关键函数需要做benchmark测试
  • 使用trace分析gc占用,内存分配情况

scheduler's People

Watchers

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