Gearman Architecture Requests

I am new to Gearman. I have the following questions about optimizing the use of Gearman:

1) I think the worker expects work as a "string". Can I send an Array or Hash as a Work to an employee? If not, is JSON the best work format for sending Array / Hash?

2) Can I connect rails application routes as working for Job Server?

3) How do you check if a worker is working or not? Is there any administration tool for Job Server and Worker statistics?

4) Can I create a ROR system so that every request goes through the Gearman job server? I have several applications using the same database (some of them are an iPhone application, an Android application, a website). My main goal is to access content using a common API for all of these applications. Or is Gearman more suitable for background processes?

Thanks.

+3
source share
3 answers

I can’t say that I know anything about mechanics, but I think I can answer the first question.

, ( ). "" , . JSON - , , , , . , , JSON .

+1

? , JSON Array/Hash?

; JSON , /.

rails Job Server?

/ . Ruby . Thor.

- Job Server Worker?

, : Gearman?

Gearman ?

, , Gearman , .

+2
-1

Source: https://habr.com/ru/post/1726129/


All Articles