Nice! :-)<br><br><div class="gmail_quote">On Tue, Apr 8, 2008 at 6:52 PM, Brian Aker <<a href="mailto:brian@tangent.org">brian@tangent.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi!<br>
<br>
So I have rolled out the first prototype for a C client version of the Client side work for Gearman:<br>
<a href="http://hg.tangent.org/gearmandc/" target="_blank">http://hg.tangent.org/gearmandc/</a><br>
<br>
I won't be rolling out releases for a little while, I will just be updating the mercurial repository.<br>
<br>
Here is an example:<br>
gearman_return rc;<br>
gearman_st *param= (gearman_st *)object;<br>
gearman_result_st *result;<br>
gearman_job_st *job;<br>
char *value= "submit_job_test";<br>
size_t value_length= strlen("submit_job_test");<br>
<br>
result= gearman_result_create(param, NULL);<br>
job= gearman_job_create(param, NULL);<br>
<br>
assert(result);<br>
assert(job);<br>
<br>
<br>
gearman_job_set_function(job, "echo");<br>
gearman_job_set_value(job, value, value_length);<br>
<br>
rc= gearman_job_submit(job);<br>
<br>
assert(rc == GEARMAN_SUCCESS);<br>
<br>
rc= gearman_job_result(job, result);<br>
<br>
assert(rc == GEARMAN_SUCCESS);<br>
assert(result->action == GEARMAN_WORK_COMPLETE);<br>
assert(gearman_result_length(result) == value_length);<br>
assert(memcmp(gearman_result_value(result), value, value_length) == 0);<br>
<br>
In this case I had a worker called "echo" running. There should be enough of an API to build a fully functional client currently.<br>
<br>
There is also support for clustering based on function built into the library (the library pulls heavily off of libmemcached).<br>
<br>
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.<br>
<br>
Cheers,<br>
-Brian<br>
<br>
--<br>
_______________________________________________________<br>
Brian "Krow" Aker, brian at <a href="http://tangent.org" target="_blank">tangent.org</a><br>
Seattle, Washington<br>
<a href="http://krow.net/" target="_blank">http://krow.net/</a> <-- Me<br>
<a href="http://tangent.org/" target="_blank">http://tangent.org/</a> <-- Software<br>
_______________________________________________________<br>
You can't grep a dead tree.<br>
<br>
<br>
<br>
_______________________________________________<br>
Gearman mailing list<br>
<a href="mailto:Gearman@lists.danga.com" target="_blank">Gearman@lists.danga.com</a><br>
<a href="http://lists.danga.com/mailman/listinfo/gearman" target="_blank">http://lists.danga.com/mailman/listinfo/gearman</a><br>
</blockquote></div><br>