March Meeting 2008

From DojoWiki

Jump to: navigation, search

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"
  1. Client Interactions:
    1. Client connects
    2. Client sends name\n
    3. Client sends recipientName|message\n
  1. Server Interactions:
    1. When an unknown client sends a name, it associates the name sent with the socket.
    2. When the server receives a recipientName|message it should attempt to send the message to the recipientName
      1. If the server knows about recipientName, it should sent the following to the client: "senderName: message\n"
      2. 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
        1. 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.
Personal tools