Re: [PHP-DEV] msession tech note, 'feature' (buglet), call for

2002-02-13 Thread mlwmohawk

 At 10:16 PM 2/12/2002 -0500, [EMAIL PROTECTED] wrote:
There are a number of ways to deal with this, but creating a socket
pool of active sockets, and have a number of threads handle the sockets
in a classing queue fashion seems like the best way.

Anyone have a better idea?
 
 Either do a thread pool like you mention here or if you want to get
 maximum  performance you should consider non-blocking I/O. Check out 
 http://state-threads.sourceforge.net/

The msession daemson does no I/O. It is a ram only system. The only I/O 
it does do is to the network card. The network does not block unless I 
code it to do so.



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] msession tech note, feature (buglet), call for suggestions.

2002-02-12 Thread Andi Gutmans

At 10:16 PM 2/12/2002 -0500, [EMAIL PROTECTED] wrote:
There are a number of ways to deal with this, but creating a socket pool
of active sockets, and have a number of threads handle the sockets in a
classing queue fashion seems like the best way.

Anyone have a better idea?

Either do a thread pool like you mention here or if you want to get maximum 
performance you should consider non-blocking I/O. Check out 
http://state-threads.sourceforge.net/

Andi


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] msession tech note, feature (buglet), call for suggestions.

2002-02-12 Thread Sterling Hughes

 At 10:16 PM 2/12/2002 -0500, [EMAIL PROTECTED] wrote:
 There are a number of ways to deal with this, but creating a socket pool
 of active sockets, and have a number of threads handle the sockets in a
 classing queue fashion seems like the best way.
 
 Anyone have a better idea?
 
 Either do a thread pool like you mention here or if you want to get maximum 
 performance you should consider non-blocking I/O. Check out 
 http://state-threads.sourceforge.net/
 

Actually, you should do both :)  Have a pool of handlers which do
non-blocking I/O (you don't need to bother with async stuff, it seems
like your access count won't go that high)...

-Sterling

Tragedy is if I cut my finger.  Comedy is if you walk into an open
sewer and die.
 - Mel Brooks

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] msession tech note, feature (buglet), call for suggestions.

2002-02-12 Thread Andi Gutmans

At 06:23 AM 2/13/2002 +0100, Sterling Hughes wrote:
  At 10:16 PM 2/12/2002 -0500, [EMAIL PROTECTED] wrote:
  There are a number of ways to deal with this, but creating a socket pool
  of active sockets, and have a number of threads handle the sockets in a
  classing queue fashion seems like the best way.
  
  Anyone have a better idea?
 
  Either do a thread pool like you mention here or if you want to get 
 maximum
  performance you should consider non-blocking I/O. Check out
  http://state-threads.sourceforge.net/
 

Actually, you should do both :)  Have a pool of handlers which do
non-blocking I/O (you don't need to bother with async stuff, it seems
like your access count won't go that high)...

As far as I know with state threads you use one state thread per connection.
These are user threads which are extremely lightweight and are scheduled by 
non-blocking I/O. But anyway, who cares. I'm just giving the pointer.
Andi


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php