Code Monkey home page Code Monkey logo

djob's People

Contributors

hz89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

liufofu

djob's Issues

Jask concurrency control

Description

A job executing on a large number of nodes at the same time will cause excessive concurrency to other systems on which the job itself depends, requiring a way to control the concurrency of the job.

Design

  • Job object to add concurrency attributes
  • The server generates a token counter according to the value of concurrency when the job can be triggered
  • When an agent is ready to perform a job try to get the token, if successful do it, else to wait for a cycle of retry

Weird SQL statement

verison:0.2.3
log:

Nov 27 15:06:01 [27156]: (/home/harrison/Dropbox/project/go_path/src/github.com/HZ89/djob/store/store.go:746)
Nov 27 15:06:01 [27156]: [2017-11-27 15:06:01]  [10.45ms]  SELECT * FROM `executions`  WHERE `executions`.`name` = 'test1' AND `executions`.`region` = 'idc' AND `executions`.`group` = '0' AND `executions`.`run_node_name` = '' AND ((`name` = 'test1') AND (`region` = 'idc')) ORDER BY `executions`.`name` ASC LIMIT 1

When insert executions into databases, it will execution this sql, may be AND ((name = 'test1') AND (region = 'idc')) is superfluous

Lower CPU usage

When a job needs to be executed on 97 agents, the CPU utilization of the job scheduling node can reach more than 70% (2.40GHz intel core2 duo cpu). The CPU utilization needs to be reduced below 40%

Transfer files via BT

  • A API, upload file to the server node
  • Select the server that receives the file by tag matching
  • Transfer files via BT

More cache, less SQL query

As agnet will perform an RPC call each time to run the job to obtain the job information, which led to the database periodically concurrent spikes.

  • When query, query from cache first. if hit used it, if not query from database and set cache
  • When update, update cache then update database
  • When delete, delete cache and database

Node tags set by API

Tags can only be read from the configuration file is not flexible. Tags can set by APIs, and store the tag to somewhere

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.