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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gearmand's Issues

EOF from worker does not notify client

If a job is dispatched to a worker and the process running that job is killed, or in my case the machine is rebooted, the client is not notified and thus stuck waiting.

I think it should return a WORK_FAIL to the client

Project status

Hi,
We are interested in using this server in production. There has been no update to the code for a while. We wonder if this project is abandoned. Also, do you mind adding a LICENSE file directly to this repo?

Thanks.

How to detect gearman's benchmark ?

Hello , is there anyone have compute the gearmand's benchmark?
once i use command below to test gearmand's benchmark

./blobslap_client -c 10000 -b -v -h 127.0.0.1 -n 5 -m 1024*1024*1024 -M 1024*1024*1024 -p 8913
./blobslap_worker --chunk -s -v 3

How ever the result are belows:

[Current: 319 jobs/s, Total: 399 jobs/s]
[Current: 9781 jobs/s, Total: 401 jobs/s]
[Current: 693 jobs/s, Total: 415 jobs/s]
[Current: 10428 jobs/s, Total: 436 jobs/s]
[Current: 259 jobs/s, Total: 428 jobs/s]
[Current: 10836 jobs/s, Total: 440 jobs/s]
[Current: 456 jobs/s, Total: 441 jobs/s]
[Current: 10181 jobs/s, Total: 463 jobs/s]
[Current: 218 jobs/s, Total: 453 jobs/s]
[Current: 9881 jobs/s, Total: 456 jobs/s]
[Current: 687 jobs/s, Total: 465 jobs/s]
[Current: 10041 jobs/s, Total: 483 jobs/s]
[Current: 247 jobs/s, Total: 474 jobs/s]
[Current: 11301 jobs/s, Total: 495 jobs/s]
[Current: 173 jobs/s, Total: 484 jobs/s]
[Current: 10922 jobs/s, Total: 494 jobs/s]
[Current: 460 jobs/s, Total: 493 jobs/s]
[Current: 10124 jobs/s, Total: 511 jobs/s]
[Current: 201 jobs/s, Total: 501 jobs/s]
[Current: 10512 jobs/s, Total: 507 jobs/s]
[Current: 572 jobs/s, Total: 509 jobs/s]
[Current: 10895 jobs/s, Total: 531 jobs/s]
[Current: 48 jobs/s, Total: 516 jobs/s]

I think it unbelieveable ?
is there somethin wrong?

invalid magic sessionId 1

2014/07/10 22:14:03 util.go:215: �[debug] magic not match 0x30343937
2014/07/10 22:14:03 session.go:58: [debug] invalid magic sessionId 1

I'm trying gearmand on windows7, but when start example/worker/worker, gearman always show an error above.

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.