This can be moved to off-topic if found to not be related enough.
As I have an extended time that I can code all day, been looking harder at NSPR and UOX3. Clearly some of the recent changes in uox3 I personally disagree with, but that of course is my issue, not the projects.
One thing that may be interesting, is the concetp of threads versus processes.
At the moment, there are three logical entities in the UOX3 design that can be asynchronise: Login, Console, and the Server. These don't get created and destroyed, but are rather static, created at the beginning, and destroyed on shutdown. Currently UOX3 uses threads for these. As I convert to NSPR, I am internally wondering why threads, versus process (or sub-processes). Or perhaps a combination (there is a tighter coupling with the login perhaps, then the console). By haveing the console as a seperate process, and commuintcating via IPC/shared memory, it decouples the access to a looser coupled entity, allowing easier custimazation, without impacting the server.
NSPR of course supports both, so it isn't an NSPR issue. But was just thinking outloud, and wondering what others thoughts may be.
Threads and processes
How is NSPR working for you? I’ve been looking into it… any grievances with it (other than it’s non-OO nature)?
Does it do a good job of handling threads/processes in an efficient manner?
I was considering setting up a system where each socket gets its own thread which does nothing but notify the central process of events (such as read or accept) in a similar way to the Win32 message pump’s method for working with asynchronous sockets.
I think there might be a lot of mutex fighting then, though?
Does it do a good job of handling threads/processes in an efficient manner?
I was considering setting up a system where each socket gets its own thread which does nothing but notify the central process of events (such as read or accept) in a similar way to the Win32 message pump’s method for working with asynchronous sockets.
I think there might be a lot of mutex fighting then, though?