libgearman

Chris Goffinet goffinet at yahoo-inc.com
Wed Apr 9 02:00:16 UTC 2008


Great stuff Brian! Me and Joe pushed the PHP library Net_Gearman to  
Google code:

http://code.google.com/p/netgearman/



-- 
Chris Goffinet
MyBlogLog Senior Performance Engineer

Yahoo!
San Francisco, CA
United States

On Apr 8, 2008, at 6:52 PM, Brian Aker wrote:
> Hi!
>
> So I have rolled out the first prototype for a C client version of  
> the Client side work for Gearman:
> http://hg.tangent.org/gearmandc/
>
> I won't be rolling out releases for a little while, I will just be  
> updating the mercurial repository.
>
> Here is an example:
>  gearman_return rc;
>  gearman_st *param= (gearman_st *)object;
>  gearman_result_st *result;
>  gearman_job_st *job;
>  char *value= "submit_job_test";
>  size_t value_length= strlen("submit_job_test");
>
>  result= gearman_result_create(param, NULL);
>  job= gearman_job_create(param, NULL);
>
>  assert(result);
>  assert(job);
>
>
>  gearman_job_set_function(job, "echo");
>  gearman_job_set_value(job, value, value_length);
>
>  rc= gearman_job_submit(job);
>
>  assert(rc == GEARMAN_SUCCESS);
>
>  rc= gearman_job_result(job, result);
>
>  assert(rc == GEARMAN_SUCCESS);
>  assert(result->action == GEARMAN_WORK_COMPLETE);
>  assert(gearman_result_length(result) == value_length);
>  assert(memcmp(gearman_result_value(result), value, value_length) ==  
> 0);
>
> In this case I had a worker called "echo" running. There should be  
> enough of an API to build a fully functional client currently.
>
> There is also support for clustering based on function built into  
> the library (the library pulls heavily off of libmemcached).
>
> Getting the worker protocol finished is next on the list. I welcome  
> feedback! I've got a couple of users ready to start using it, so I  
> am hoping that this will evolve quickly.
>
> Cheers,
> 	-Brian
>
> --
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> _______________________________________________________
> You can't grep a dead tree.
>
>
>
> _______________________________________________
> Gearman mailing list
> Gearman at lists.danga.com
> http://lists.danga.com/mailman/listinfo/gearman



More information about the Gearman mailing list