ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> squeak
squeak
Re: fork, select & socket performance ?
by Ned Konz other posts by this author
Feb 18 2003 5:25PM messages near this date
fork, select & socket performance ? | Re: Squeak on Compaq TC1000 tablet
On Tuesday 18 February 2003 07:32 am, Ragnar Hojland Espinosa wrote:
>  Another basic question I'd love some orientation with:
> 
>  I have a little question on fork permormance.  In my little TCP/IP
>  program I plan to have, roughly:
> 
>       - listener process
>         put new client socket in a shared queue
> 
>       - other process
>         read-block on listener shared queue
>         fork a reader and a writer for each client
> 
>  Given I can have over 500 clients at a time, with bursts of about
>  60 new clients / second , will all this forking be ok?  Or should I
>  build a, say, 100 process pool and reuse them?  Or is there a
>  better way to do it?

Creating them on the fly should be fine. Processes are very 
lightweight.

>  Another thing, what class should I look at if I want to do
>  something like select, either C or even perlish?
> 
>  	$read_fds = IO::Select->new();
>  	$read_fds->add ($socket);
> 
>  	my @read_set = $read_fds->can_read;
>  	foreach my $read_socket (@read_set) {
>  		# ...
>  	}

It's a better match for the architecture and Squeak socket API to have 
a single Process per socket.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
Thread:
Ragnar Hojland Espinosa
Ned Konz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved