How to IPC between PHP clients and a C Daemon Server?

后端 未结 7 906
春和景丽
春和景丽 2020-12-02 13:32

and thanks for taking a look at the question.

The background
I have several machines that continuously spawn multiple (up to 300) PHP console sc

7条回答
  •  有刺的猬
    2020-12-02 14:02

    The "problem" (maybe not?) is that there can certainly be many consumers/producers on the SysV MQs. Though perfectly possible for what you're doing if you don't necessarily have an m:n need on the producer:consumer to resources model, you have a request/response model here.

    You can get some strange hangups with SysV MQ as it is.

    First, are you sure that INET sockets aren't fast enough for you? A quick PHP example using unix domain sockets is at http://us.php.net/socket-create-pair (just as code example of course, use socket_create() for the PHP endpoint).

提交回复
热议问题