On Fri, Dec 07, 2001 at 01:27:00AM -0500, Mark Mielke wrote: > This is not actually true. 16 ntserv processes can be performing > write() operations while the daemon is updating, or the robot is > determining its next move. Move to a single threaded single process > event driven model, and this is no longer true. A write() is cheap. It just passes data down to the TCP/IP stack. We'd never write() if it would block, the socket would be set to non-blocking mode. So I don't agree with the performance penalty. > A wait *can* be active. Consider read()/write(). Waiting for a write() to > complete doesn't mean that nothing is happening. In an event driven model, > waiting for select() *is* waiting. No, I think we're talking cross-purposes here. In an event driven model, the select() is where the waiting for the write() to complete is happening. If anything else happens then we stop waiting immediately. > In some ways the win32 environment is significantly better, in others it > is quite worse. In any case, CYGWIN is an emulation layer, and you can > therefore expect worse performance. I can believe that! > I don't mean blocked as in a write() blocking. I mean blocked, as in > no data can be transferred between any of the clients and the > server. For "less than a tenth of a second", "10 times a second", the > server will be unable to exchange data. Just think about it for a bit. I did. It didn't worry me at all. It never worried Netrek players before. > 1) The system is currently written to access shared memory. This is > practically already a threaded model. An event driven model, by > comparison, is far different. That, I admit, is the best reason for threading. Dave pointed that out to me on IRC. However his mail to the list makes a much more important point out of stability by separation of process spaces. > > - Netrek does not need to restrict the developer base by choosing a > > difficult technology. We need to do the reverse. > > Most people should have pthreads by now. Yes, they have it. They don't code in it though. I'm thinking of people wanting to help out. I don't want a large clue barrier. > Tell you what... I'm leaving for Australia for my Christmas > vacation. At least some of those days (Dec. 19th -> Jan 4th) I'll > probably be pretty bored. You do your event driven model, and I'll do > the thread model. We'll see which patch is smaller... :-) Why not drop in? I'm in Australia. We could go down to the pub and draw diagrams on the wall. ;-) I'm six hours drive from Sydney, in what the Sydney people would call the outback. Other interesting things in this area include an emu farm, a national park, a historic hamlet, and a few professional telescope installations. -- James Cameron mailto:quozl at us.netrek.org http://quozl.netrek.org/