Coder Social home page Coder Social logo

gearmand's Introduction

gearmand

golang gearman-job-server clone

Build Status Coverage Status

Why create a clone?

i like gearmand, but it lacks of 
monitor 
maintainability
rest api

benchmark

some benchmark results(GOMAXPROCS=2):
...
[Total:   4186 jobs/s]

some benchmark results(GOMAXPROCS=1):
...
[4656 jobs/s]


original c version:
...
[5002 jobs/s]


benchmark tools:
gearmand-1.1.12/benchmark$ ./blobslap_client -c 1000 -n 10000
gearmand-1.1.12/benchmark$ ./blobslap_worker

tutorial

how to start gearmand?

./gearmand --addr="0.0.0.0:4730"

how to using redis as storage?

./gearmand --storage=redis --addr="0.0.0.0:4730" --redis="localhost:6379"

how to using mysql as storage?

1. create database
	mysql> create database gogearmand;
	Query OK, 1 row affected (0.00 sec)
	
	mysql> use gogearmand;

2. create table
	mysql> CREATE TABLE job(Handle varchar(128),Id varchar(128),Priority INT, CreateAt TIMESTAMP,FuncName varchar(128),Data varchar(16384)) ENGINE=InnoDB;

./gearmand --storage=mysql --addr="0.0.0.0:4730" --mysql=user:password@tcp(localhost:3306)/gogearmand?parseTime=true

then choose client librarys form

http://gearman.org/download/

how to track stats:

http://localhost:3000/debug/stats

how to list workers by "cando" ?

http://localhost:3000/worker/function

how to list all workers ?

http://localhost:3000/worker

how to query job status ?

http://localhost:3000/job/jobhandle

how to list all jobs ?

http://localhost:3000/job

how to change monitor address ?

export GEARMAND_MONITOR_ADDR=:4567

TODO:

refactor storage and tests

worker timeout (maybe job timeout is a better idea, such as big job)
queue max length limit
more tests
rest api
web monitor
priority
write design documents, data structs

LICENSE

gearmand is distributed under the terms of the MIT License. See LICENSE for details.

gearmand's People

Contributors

mattn avatar ngaut avatar zimulala avatar

Stargazers

 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.