bloonix has asked for the wisdom of the Perl Monks concerning the following question:
Hello people,
I'm searching for a solution to build a client-server
environment. My idea - or my vision :) - is the following:
I have a master process and 1-n defined slave processes.
The master listens on a single port and divert incoming
requests from clients to the slave processes. Now I don't
know the best way to do this. One of my considered
solutions is to deal a new port on that a slave is running.
Maybe each slave runs on a own port. Or maybe a slave could
inherit the new socket ($ns = $socket->accept()).
Does someone have links or snippets with examples that
containes parts of my idea?
Jonny
I'm searching for a solution to build a client-server
environment. My idea - or my vision :) - is the following:
I have a master process and 1-n defined slave processes.
The master listens on a single port and divert incoming
requests from clients to the slave processes. Now I don't
know the best way to do this. One of my considered
solutions is to deal a new port on that a slave is running.
Maybe each slave runs on a own port. Or maybe a slave could
inherit the new socket ($ns = $socket->accept()).
Does someone have links or snippets with examples that
containes parts of my idea?
Update: The background of my question is that I develope
a performance monitor and 1000s of servers deliver their
statistics like processor, memory and network workload to
a central data server.
Update: Sorry people for my bad description. :(
I try to describe it in example steps:
1. listener.pl runs on port 43600
2. 10 server.pl processes runs on ports 43601-43610
3. incoming client requests on port 43600 to listener.pl
4. listener.pl answer the next free port from a server.pl
5. the client reconnect to a server.pl to deliver his
statistics
I want to use this way to devide the workload.
Jonny
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Threading Client-Server (IO::Socket)
by Random_Walk (Prior) on May 30, 2006 at 13:25 UTC | |
by bloonix (Monk) on May 30, 2006 at 19:01 UTC | |
by Random_Walk (Prior) on May 31, 2006 at 21:18 UTC | |
Re: Threading Client-Server (IO::Socket)
by samizdat (Vicar) on May 30, 2006 at 13:38 UTC | |
Re: Threading Client-Server (IO::Socket)
by merlyn (Sage) on May 30, 2006 at 15:28 UTC | |
Re: Threading Client-Server (IO::Socket)
by zentara (Archbishop) on May 30, 2006 at 16:13 UTC | |
Re: Threading Client-Server (IO::Socket)
by bloonix (Monk) on May 30, 2006 at 19:02 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom