Sunday, January 18, 2009

Upcoming Week

Sunday Jan 18th - Wednesday Jan 21st : Actual, real holiday.
Thursday Jan 22nd - Saturday 24th: Maybe holiday. If it isn't:

  1. Analysis of code produced to achieve these goals, in mind to get feedback and to ease maintenance: Logical order; Structure; Commenting (just want to remove anything too embarrassing, there's been too many late nights recently).
  2. Release code to here.

  1. Add functions relying on timed event, specifically:- updating the tracker; keep-alive with peer.
  2. Buffer on write fails: a write fail should result in a new rewrite attempt in the event queue.
  3. Update peers with HAVE messages on successful download of a piece. (Fire an event, let the event handler deal with the distribution of HAVE to peers)
  4. Start responding to INTERESTED. Fire an event, the handler should check how many are currently unchoked, and if a threshold is not reached, unchoke. Maintain list of INTERESTED & unchoked, and INTERESTED & choked.
  5. If a REQUEST msg is fired on an unchoked peer, write the request back. After writing it back, examine history. If this is a peer we are actively exchanging with, keep unchoked. If this is a peer we are not actively exchanging with, increment _sent. If _sent is greater than threshold, write choke back, remove from INTERESTED & unchoked, add to end of INTERESTED & choked. Fire event that will allow INTERESTED & choked to be re-examined, and a new peer to become unchoked. Fire this event on peer disconnected too, after cleanup (ie. after peer is removed from INTERESTED & unchoked or INTERESTED & choked, if they're in either)
  6. If a NOT INTERESTED msg is fired on an unchoked peer, remove from any INTERESTED list it is part of, and then choke.
  7. Open the Mozilla server socket.
  8. Accept connections. Add timeout to drop connections that have timedout.
  9. Listen for handshakes. On Handshake, send Handshake. Send BITFIELD. Then act as normal.
  10. Set up tracker on test server.
  11. Resolve x-htp2p URLs to multiple .torrents. Treat file in torrent as the data from that URL.
  12. Resolve x-htp2p URLs to single .torrent, then try to resolve URL to file in that torrent. Treat that file as the data from that URL.
  13. Make limit on PieceManager so that only pieces related to target URLs are downloaded.
  14. Make PieceManager talk to return channel, so that as Pieces are verified, they are written out.
  1. Do what wasn't achieved Friday. If it all was, have a beer. Maybe even have a TSD. Congratulations, you're ready for the next supervision meeting.

No comments:

Post a Comment