Files changed (1)
The global module was used instead of solutions like mnesia for reasons such as automatic monitoring of registered processes, the possibility to define procedures in case of netsplits when the network comes back up, a local lookup for names, etc. This system allows to have instant distribution over many nodes.
+The current implementation works with a basic mochiweb server implementation. It supports three basic operations: listen, message and history and responds to JSONP requests only.
+This is of course meant to be re-skinned in CSS by any site to fit in with its design. All that's provided here is basic style.
+JSONP has the downside of appearing as if the page wasn't done loading in many browsers. The two ways there are to go around this issue are to either use iframes or use fake subdomains that increment in every client (facebook does it this way). basic JSONP was chosen for now given there are many issues to solve before that one. The facebook approach is something Chut is unlikely to implement because of the comparatively complex setup requirements.
+More testing needs to be done with different browser (IE6 and IE7 still need to be tested). So far the client seems to work fine with FF3.0.x, FF3.5+, Opera 10.x, Chrome, Safari 4.0.x and IE8.
-As for the logging system, a simple event handler listening to every message sent and logging them on disk somewhere (or in a database) is trivial to add.
+For the logging system, a simple event handler listening to every message sent and logging them on disk somewhere (or in a database) is trivial to add. That's all that needs to be done, given we have a database table already open.
To notify a user someone he's talking to has disconnected, two options are possible. The first one is to add a lookup on each message sent (from the dispatch handler), which would then report that event to all connected clients. The second option is that when a discussion starts between two users, the FSM starts monitoring the other user. Whenever the FSM receives a message mentioning the death of a monitored user, the clients are made aware of it. This last option would require the potential addition of new functions to usr.erl, but would reduce the amount of lookups made within the global module and would let the status of the other user be known in real time rather than the sending of a message.