March Meeting 2008
From DojoWiki
March 27th Meeting
The purpose of this meeting was to get started on a IM, chat, P2P application
The simple work we did is specified as:
- Should support all newline formats: "\n" "\r\n" "\r"
- Client Interactions:
- Client connects
- Client sends name\n
- Client sends recipientName|message\n
- Server Interactions:
- When an unknown client sends a name, it associates the name sent with the socket.
- When the server receives a recipientName|message it should attempt to send the message to the recipientName
- If the server knows about recipientName, it should sent the following to the client: "senderName: message\n"
- If the server doesn't know about recipientName, it should queue the message and send a message back to the sending client saying "Don't know about user `recipientName`, queueing message
- When the server gets a chance later, it should continue to attempt to deliver the queued messages to recipientName
Improved Specification
- Proposed modification to the wire protocol
- Instead of sending data as pipe-separated strings, send strings of JSON.
- There should be JSON serialization libraries for most languages, andeven without it, it is very simple.
- Would make the wire protocol easier to extend and debug.
- Example: The format of the post-authentication commands could besomething like:
{"session_key": "dfshfiwuhfewf87*&8723hrjkhdsf", "recipient":
"Faisal", "message": "Hello World"}
- This would be very easy for languages with JSON libraries, and pretty easy to parse for languages without JSON libraries.
