This is just my opinion, and you haven't really said much about the
architecture, but it seems odd to me to have a hybrid
polling/event-based engine. Why can't you update the state incrementally
as you receive events and get rid of the incremental sweeping updates
altogether?
To answer your question, I'm imagining you'd want to inherit
EventEmitter and emit an event, perhaps in a setInterval callback?
On 09/18/2012 12:11 PM, Nicola Lepetit wrote:
Hi,
I'd like to create a multi room gaming system that must be able to:
1. gather all the input from all users in all rooms
2. Once every ## seconds, analyze all the input gathered and update
the game situation, room by room.
I already have a room system and the game logic is simple (i.e. not
important now).
Question is: How do I setup a recurring event on the server that
manage all the input gathered in the last ## seconds ? Should I use a
mongo DB or similar to store data or keep everything in memory ?
Thanks,
Nicola.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en