drewww/unhangout — pull request #225 by yourcelf (2013-11-13 06:22:40+00:00)
Title: Room manager

This pull request merges and fixes merge conflicts for pull request #224 (split unhangout-server into 7 files), in addition to implementing the room manager socket strategy. The biggest changes are the removal of all socket-oriented code from server-models, in favor of the separate RoomManager object handling socket routing and broadcasts. For the few cases where it is necessary for a ServerEvent model to initiate a broadcast (for example when a non-socket HTTP method changes an event, and the change needs to propagate to connected sockets) the ServerEvent model will trigger a "broadcast" event, which the RoomManager handles.

User models no longer have a single socket or single event they are part of -- this should make it possible for users to have multiple sockets (e.g. multiple tabs) and to simultaneously be in multiple events with no
problems. As a result, all event-oriented socket messages now require a ``roomId`` parameter which indicates which event they are addressing (previously, the "current event" was assumed to be the single one set on
the ServerUser model when the user joined an event).

As with the split-unhangout-server pull request, this one is BIG changes (double-big, since it merges that one), and will require thorough manual testing before merging. The test suite passes.