J
James Edward Gray II
I need to code up a server. It could have as many as fifty
simultaneous users all sending in commands. Those commands need to be
processed in the order received, and many logged-in users may see
changes based on the processing of those commands.
I can code all this myself, I'm sure, but I thought I would have a look
at GServer. It looks to simplify server setup and incoming reads, but
it doesn't seem to offer any help for output. Am I reading this right?
My plan for handling input is to push all commands onto a thread safe
queue and have the main event thread pull them off the other end one at
a time. But let's say that an event affects users A, B, and C. How do
I notify them all?
Do I cache their sockets when they log in, by name, and then write to
each of those when the time comes? Those writes would need to be
threaded I suppose, to avoid blocking the event thread.
I guess mainly what I'm asking is, I need to roll all this output
handling on top of GServer, if I want to use it, right?
Thanks.
James Edward Gray II
simultaneous users all sending in commands. Those commands need to be
processed in the order received, and many logged-in users may see
changes based on the processing of those commands.
I can code all this myself, I'm sure, but I thought I would have a look
at GServer. It looks to simplify server setup and incoming reads, but
it doesn't seem to offer any help for output. Am I reading this right?
My plan for handling input is to push all commands onto a thread safe
queue and have the main event thread pull them off the other end one at
a time. But let's say that an event affects users A, B, and C. How do
I notify them all?
Do I cache their sockets when they log in, by name, and then write to
each of those when the time comes? Those writes would need to be
threaded I suppose, to avoid blocking the event thread.
I guess mainly what I'm asking is, I need to roll all this output
handling on top of GServer, if I want to use it, right?
Thanks.
James Edward Gray II