Re: xinetd vs php socket server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Xinetd will definitely be faster way than coding your daemon in PHP.

You have to consider many other things as well:
- do your worker processes run under various UIDs (do they do
setuid/setgid)?
- do your workers die after processing each request/client or do they
process multiple connections?
- do you need inter-worker communication?
- resource locking issues, etc?

What is your goal, the function of your daemon/socket server?

You can find PHP socket server implementations around the net already:
- Nanoserv being one: http://nanoserv.si.kz/
- something of "mine": https://github.com/bostjan/PHP-application-server

Of course, it is always a good excercise to write your own. But that is not
for faint hearted :)

b.


On 28 March 2011 18:25, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:

> Hi,
>
> I'd like to bat around some pros / cons of selecting xinetd to implement a
> socket server.  From my perspective the list is something like this:
>
> xinetd pros
>  . no need to rewrite forking functionality, 'server' can be written as
> simple php script
>  . forking potentially faster than php-based implementation
>
> xinetd cons
>  . time tradeoff learning xinetd configuration vs coding in support
> directly
> in php implementation
>  . potentially less maintainable depending on staff, likely php dev team
> more capable of maintaining 100% php solution
>
> Interested in your thoughts!
>
> -nathan
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux