Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Bittorrent Component Proposal

Proposed Component Name Zend_Bittorrent
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Bittorrent
Proposers Christer Edvartsen
Darby Felton, Zend liaison
Revision 0.1 - 11 October 2007: Initial proposal made (wiki revision: 12)

Table of Contents

1. Overview

Zend_Bittorrent is a component that can be used to encode and decode data in the bittorrent format. Zend_Bittorrent will contain convenient methods for accessing methods in the Zend_Bittorrent_Encoder and Zend_Bittorrent_Decoder classes.

The most common usage of a component such as this one would be to decode .torrent files. The information found in torrent files are the name of the file(s) included in the torrent along with file sizes and more info used by bittorrent clients when downloading torrents.

The Zend_Bittorrent_Torrent class contain ways to generate .torrent files. It can generate files based on other torrent files, or a path to a file or a directory.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will encode any encodable PHP variable (int, string, array).
  • This component will decode a bittorrent encoded string back to the original PHP counterpart.
  • This component will decode entire bittorrent files (typically .torrent)
  • This component will generate .torrent files based on a path to a file or a directory
  • This component will mimic the official btmakemetafile script when generating .torrent files.

4. Dependencies on Other Framework Components

  • Zend_Exception
  • Zend_Loader

5. Theory of Operation

When decoding it will first figure out what kind of variable the bittorrent encoded string represents and then iterate through the string decoding all nested parts (if any). When encoding it will follow the simple rules of the bittorrent specification.

6. Milestones / Tasks

  • Milestone 1: [DONE] Initial design of the classes
  • Milestone 2: [DONE] Working prototype
  • Milestone 3: [DONE] Unit tests exist and work
  • Milestone 4: Prototype and tests are checked into SVN
  • Milestone 5: Initial documentation exists.

7. Class Index

  • Zend_Bittorrent
  • Zend_Bittorrent_Encoder
  • Zend_Bittorrent_Encoder_Exception
  • Zend_Bittorrent_Decoder
  • Zend_Bittorrent_Decoder_Exception
  • Zend_Bittorrent_Torrent
  • Zend_Bittorrent_Torrent_Exception

8. Use Cases

UC-01

Encode a string using the Zend_Bittorrent class:

UC-02

Encode a string using the Zend_Bittorrent_Encoder class:

UC-03

Decode a bittorrent file using the Zend_Bittorrent class:

UC-04

Decode a bittorrent file using the Zend_Bittorrent_Decoder class:

UC-05

Use the factory to generate a new .torrent file

UC-06

Use the factory to generate a .torrent file from a path

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.