|
-
February 10th, 2004, 12:59 AM
#1
Spawning Multiple Instance Each Listening to individual Port
HI,
My application is a Middleware application. It Listens in a particular port. Now there is Just one instance of the application running in my machine. I would like to have multiple instance of the Application running with each listening to a separate port. I would like to have a scheduler which starts all these instances and balances the load across all these instances. So effectively the scheduler will be listening to a particular port and it diverts to the request to the various instances using a load sharing technique (Possibily Round robin Method). Could u give idea to me on how to proceed with the design.
Thanks in Advance,
Varadha
-
February 11th, 2004, 01:20 AM
#2
Hi
I Think.. u dont want to impli with multi process...
it will make things complicate...
in u r program.. start a seperate thread for listening... set that thread to use high time slice..... then after process the socket functions... then start seperate thread for each connection request....
that means u should have a thread to listen... and other thread for connected sockets.. to read and write... but the listening thread must have high preio than other threads...
All the best
Jais T Mathew
Believe in God..
if u have Faith, Hope and Love... u will get everything
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|