Design Question. C/S Threads & AppDomains

Q

quortex

Hi all,

I am developing a client/server application which has to potentially
handle a very large number of concurrent users.

Each connection is associated with a session object much like ASP.NET.

My first wish is to be able to process the sessions in parallel.
Obviously I can run each session in a separate thread however I gather
that once there is a large number of users the number of threads will
be too much of a drain on system resources. So I am thinking I should
use a thread pool with a set number of threads and then each thread
would be assigned multiple sessions. Is this the correct way of
thinking?

My second wish is to be able to to somehow secure each session within
its own execution boundary. Basically so that if something causes a
session to crash it does not take all the other sessions down with it.
Is the solution to this to run each session in its own application
domain? If so how would this combine with the thread approach?

If say I had 50,000 users connected to a server that would potentially
be a hell of a lot of threads + application domains which I assume
isn't the right way to go about it.

Any ideas on this would be greatly appreciated.

Kind Regards,
Mark
 
J

Joerg Jooss

Hi all,

I am developing a client/server application which has to potentially
handle a very large number of concurrent users.

Each connection is associated with a session object much like ASP.NET.

My first wish is to be able to process the sessions in parallel.
Obviously I can run each session in a separate thread however I gather
that once there is a large number of users the number of threads will
be too much of a drain on system resources. So I am thinking I should
use a thread pool with a set number of threads and then each thread
would be assigned multiple sessions. Is this the correct way of
thinking?

My second wish is to be able to to somehow secure each session within
its own execution boundary. Basically so that if something causes a
session to crash it does not take all the other sessions down with it.
Is the solution to this to run each session in its own application
domain? If so how would this combine with the thread approach?

If say I had 50,000 users connected to a server that would potentially
be a hell of a lot of threads + application domains which I assume
isn't the right way to go about it.

Any ideas on this would be greatly appreciated.

Mark,

this sounds an awful lot like your trying to (re)build a complete
application server infrastructure, which surely isn't impossible, but a
*huge* task.

Applications of that size (50000 users) also have enormous requirements
regarding memory if they're stateful, and almost certainly require
clustering for scalability or fail-over.

I'd rather think again about this approach and evaluate possible
existing solution components from the .NET stack before delving into
implementation specifics like AppDomains.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top