jimc has asked for the wisdom of the Perl Monks concerning the following question:
The client is a java program that I expect to be quite bursty in its traffic profile - long stretches of boredom (no requests), punctuated by sheer panic (a flood of them). The client may use many threads to send the reqs.
Id prefer that they wait synchronously on the replies; acks and delayed callbacks seem like protocol complexity and overkill, but this is subject to system-wide performance estimates.
Im thinking that this will be the light-weight approach.
$daemon = SOAP::Transport::HTTP::Daemon -> new ( LocalAddr => $gwcf->{soap_host}, LocalPort => $gwcf->{soap_port}, Listen => $gwcf->{soap_listen_queue} || 5, ReuseAddr => 1 ) -> dispatch_to ('GwApi', 'TryMe');FWIW (and this is pretty cool), the code after this forks a bunch of times, (after the Listener socket is bound), and each slave-server process accepts requests as available. So this is really a IO::Socket::INET question, despite the SOAP::Lite layer Im using (thx & kudos to Pavel Kulchenko, Kieth Brown, DevelopMentor)
The work-load is basically self-balancing, and appears to be as light as it can get :-) This is the case on LINUX AND ON SUNOS 5.8.
The only downside is that its hard to tell what the work-load is, and whether (for instance) new slave-servers should be spawned to help out.
Im aware of NET::Server::PreFork, but it doesnt appear to do anything more fancy than restart slaves that have exited. I dont want to use timestamps in the SOAP requests, that would expose the server to stupid time-of-day tricks.
So I seek sufficient Network/Sockets Fu to be able to win the perl vs java arguments that may be in my future. tia
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to find out whats in a LISTEN queue
by traveler (Parson) on Jan 02, 2003 at 23:32 UTC | |
by waswas-fng (Curate) on Jan 03, 2003 at 00:17 UTC | |
by jimc (Sexton) on Jan 03, 2003 at 00:33 UTC | |
by jimc (Sexton) on Jan 03, 2003 at 00:21 UTC |