Ruslan,

Yes, I know that. I was just giving a naive example. I never saw this ACE framework book, hope it is on safari bookshelf, this way I can read it online! :-)

I don't know much on how to make servers that can scale to thousand connections, nor I know much about semaphores and mutex and things that are used to coordinate threads and process forking. I know simple math and that making a new thread for each connection in a thousand connections scenario will nor scale. I think there some smart way to do this by probably multiplexing the threads making some maths and spawning a new thread when needed.

My little example is just a case where one can code a solution that will work nice, for a some kind of servers, for example a simple podcast broadcaster for your company intranet. It will be easier to code with threads then code it without it. I've been reading Python Networking Foundations and it has some keen solutions using threads and forks, I wish I could build stuff like that in Rev. I know that serving thousands concurrent connections is a task for a professional, someday I might be able to code such solutions!

 Thanks for the book references, I am looking for them now.

Andre
PS: I've read people complaining about the costs of switching contexts in a thread about parallel programming...

On Oct 4, 2006, at 7:36 PM, Ruslan Zasukhin wrote:

Andre, this is not best model.

If you going developer servers of any kind, I recommend you take a look on ACE framework. Just read its docs. May be you will find useful buy 2 books
of ACE main developer Douglas.

In short: if you want have 1000 connections, it is NOT good idea to have 1000 threads. BECAUSE your computer have one or e.g. 4 CPUs. And your 1000
threads start slow down a lots only on switch of context.

Exists other more effective models.

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to