Conveniently, I've been toying with a dual-reactor-based network design.
In NIO, a reactor pattern is used to make the network threads aware that it wants to perform an action, like connecting or reading. My reactor design basically separates reading from everything else. In current netty or MINA-based implementations, there is a large overhead in the network, as the system parses packets as they arrive, then decodes based on the INTEREST_OPS, then Queues it to be decoded, then is sent to the event manager to be processed.
My first reactor pattern solves this overhead by having all incoming read requests on a ticked thread pool. This reactor ticks with the game server so that all requests are decoded and processed, then the reply is encoded and sent immediately. This removes the need for a task queue for packets
The second reactor is what I call the demand reactor. This is where all the spontaneous action happens: Cache verification. Cache part requests, new connections, as well as requests from the Web server. This second reactor ticks every tenth of a second and does everything else in a swall thread pool.
On the note of Web server requests, I have the idea that the web server cannot access the game database at all for several reasons:
1. It would allow another possibility of injection or manipulation
2. More connections and queries to the database (I.e More stress)
3. The game server doesn't auto save, so player data will be potentially very old
4. High scores are a nightmare for the database. The server can keep track of it automatically via a cron job and a bubble sort.
Just a few things I'm working on. I've got like 0 in game content done so far. I'm wanting it to all be script driven, so I'm making a template that can be natively run via GSON
It's 3 am and I'm tired, so I'll revise this after I've had my coffee