0

I have a worker that can currently only accept jobs/tasks over HTTP. That is, instead of running a daemon listening to TCP ports and just getting raw messages, it only listens to HTTP messages. (I know HTTP is just an additional layer over TCP). So jobs have to be constructed and wrapped around HTTP messages.

I want to use a job manager to queue tasks and send these tasks over HTTP to a pool of the workers as described above.

Is there any job managers that relays tasks over HTTP? I don't mean accepting tasks over HTTP, that doesn't matter, but they must be able to send tasks to workers over HTTP.

There are other functionalities a job manager possesses, such as fault tolerance. And even though the HTTP connection is not persistent, is it possible to replicate all the TCP signals a worker will return to the job manager over HTTP?

One solution I was thinking of having a proxy in between that translates the TCP messages into HTTP messages. But this seemed difficult to do.

4

1 回答 1

0

我相信更好的架构将是成熟的工作队列 + 为您的工作人员 API 包装。

  1. 您可以根据自己的要求选择作业调度程序/队列(芹菜或任何您喜欢的)
  2. 编写一个包装脚本,它能够向您的工作人员提交作业、报告工作人员的状态等。
于 2013-10-02T21:06:53.980 回答