Commits

Fred T-H  committed d61c022

otp app and disconnect details added

  • Participants
  • Parent commits 94f6d5b

Comments (0)

Files changed (1)

 * Adding logging to messages sent and received
 * Notifying the user when someone he's talking to disconnects
 * Specifying functions to deal with netsplits and user registration
+* Turn Chut into an OTP application
 * Add more unit tests
 * Benchmark the performances
 * And much more!
 
 A similar concept can be applied for the logger. A simple event handler listening to every message sent and logging them on disk somewhere (or in a database) is also trivial to add.
 
-More unit tests should be one of the top priority also. So far, only a general common test suite exists, testing the general behavior of the chat users and client modules. A finer grained testing approach could help optimize some potential bottlenecks and increase confidence in the code.
+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.
+
+Turning Chut into an OTP application might be a little complex in terms of refactoring. The current plan is to add a top-level supervisor per node where all users will be registered. The addition and removal of users to a system will thus need to be routed through that supervisor with supervisor:start_child/2 and supervisor:terminate_child/2 (followed by supervisor:delete_child/2). This represents a little gain in complexity opposed to a good gain in simplicity when it comes to deploying and managing Chut. The web server implementation will be separate from this application. The web server will likely need to be turned to its own OTP application with a dependency on Chut, if they're to run on the same nodes.
+
+More unit tests should be one of the top priority also. So far, only a general common test suite exists, testing the general behavior of the chat users and client modules. A finer grained testing approach could help optimize some potential bottlenecks and increase confidence in the code. Load and performance testing is also needed, in order to know what load the prototype can support and if using global the way it is used might become a bottleneck when under heavy load.