Re: xinetd vs php socket server
| From: | Nathan Nobbe | Date: | Mon, 28 Mar 2011 19:27:55 +0000 |
| Subject: | Re: xinetd vs php socket server | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312103@lists.php.net to get a copy of this message | ||
On Mon, Mar 28, 2011 at 12:38 PM, Bostjan Skufca <bostjan@a2o.si> wrote:
> Xinetd will definitely be faster way than coding your daemon in PHP.
>
In this case:
> You have to consider many other things as well:
> - do your worker processes run under various UIDs (do they do
> setuid/setgid)?
>
no
> - do your workers die after processing each request/client or do they
> process multiple connections?
>
die after each request
> - do you need inter-worker communication?
>
no
> - resource locking issues, etc?
>
perhaps some, but i think this could be handled via a select to the database
prior to a write
> What is your goal, the function of your daemon/socket server?
>
basically to process an incoming payload from a client, parse and store the
results. not sure why the requirements are to accept the payload over
non-http, but that is out of my control.
i guess you can see where im going with this, basically, why reinvent the
wheel w/ the daemon code when xinetd is available. i suppose those php
libraries you mentioned are an argument against that, but then there is the
speed benefit of xinetd. i guess it just comes down to a battle of
tradeoffs.
-nathan