CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Chennai, India
    Posts
    76

    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

  2. #2
    Join Date
    Feb 2004
    Location
    Bangalore..
    Posts
    8
    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
  •  





Click Here to Expand Forum to Full Width

Featured