Thursday, January 29, 2009

Upcoming Week

  1. Add saving to folder, when used as a content type handler (IE. When you click a .torrent file, you'll be given an option of a folder to save to). This will probably be an inefficient save, made when the torrent has completed downloading. That means, all the download is still in memory, and the storage used by JS will mean that's probably more than twice the size of the torrent itself.
  2. Separate log and reportError commands, and enable each to be turned off with a global const.
  3. Change the current protocol handler (x-http2p://) to x-bt:// (it's shorter)
  4. Make a map of file types to content types, to allow the x-bt protocol handler to return a content-type when streaming.
  5. Correctly inform the model of current uploaded bytes and downloaded bytes (these are pieces sent and received), and current sent bytes/received bytes (these are total bytes sent and received).
  6. Add to piece manager to make an easier calculation of bytes left (of the pieces left).
  7. Use uploaded/downloaded/left to update the tracker.
  8. Create a torrent health check event, firing on a fixed interval.
  9. For leeching/seeding behaviour: Will check if average bytes received in the last X seconds is less than Y% of the experienced max average in the last Z second period. If it is, try to resolve by dropping or choking selfish peers (that we are seeding to, and we're interested in, and we've sent more than received, but haven't unchoked us in B seconds), connecting to new peers, or even upping the allowed connections on the server port to encourage fresh connections.
  10. For seeding behaviour: Will check if we have reached our seeding limit, if not infinite. Check if we're maxed out on peers. If we are, see if there are any lazy peers: connected but not interested; connected, interested, unchoked, but not downloading. Drop them.
  11. Add a shutdown to the model, the piece manager, the peer manager, the peer, the server, and the event pump. For the moment, it should disconnect if required, then clear all references except those that would be needed to indicate shutdown state (IE. probably want a _shutdown attribute, if a public function is called and this is set to true, throw an exception). The event pump should refuse any new events - if it's found an event would be useful during shutdown, allow only shutdown events to be added.
  12. Fix so all torrents use the same server port. This will likely be very difficult.
  13. Send correct IP address to tracker. This will likely be very easy.

No comments:

Post a Comment