Re: [Plib-devel] Re: KobayashiMaru & plib
Brought to you by:
sjbaker
From: Sam S. <sa...@sp...> - 2000-08-21 17:44:27
|
----- Original Message ----- From: "Ben Woodhead" <be...@bg...> To: <pli...@li...> Sent: Monday, August 21, 2000 6:29 PM Subject: RE: [Plib-devel] Re: KobayashiMaru & plib > Hello > > I am also working on some networking code for plib, a tcp and a udp section, > perhaps we can work together on it. It's not portable to mac yet and there > are definately some places that have to be worked on but hey if your > interested let me know. Yes, that would be good. I'm using ACE (http://www.cs.wustl.edu/~schmidt/ACE.html) at the moment to make my socket and thread code portable, but ACE is a very heavy weight library (it's the foundation for TAO - a complete COBRA implementation). ACE supposedly has some very powerful network functions that I've never fully had time to look at. Take the following example: Do you create a new thread for each client that connects to the server? This would be great if you never expect to have more than about 20 clients connected, but what about 3000? You can easily become swamped in task switching overhead here. But by the same token you might not want to be single threaded. There's an optimal balance for clients per thread, and it can vary on different hardware and is of course effected by the number of CPUs. Now I'm told ACE can take a single re-enterant function and a socket that clients will try to connect on and handle all this for you. If will run tests on the hardware at runtime and automatically balance the clients per thread ratio for you. But I fear that ACE might have to much of the ivory tower approach in it for my purposes. I only ever stumbled across it when I was looking for a cross-platform socket and thread library :) Sam |