RE: [code-review] Module Bt::Tracker
belld96 <[email protected]> Tue, 10 Feb 2004 18:05:12 -0600
| Newsgroups | gmane.comp.lang.perl.code-review-ladder |
|---|---|
| Message-ID | <[email protected]> |
Thanks for taking the time to look at and think about this module.
To respond to your suggestions:
>However, I am wondering why a connection to a DBI object is required. It
>seems to me that you are mixing two different bits of functionality in
>one module.
>
>Why not modularize further and have all the network stuff in one module
>and all the database stuff in another?
Good idea, I began thinking about this as soon as I read it. I'll continue to
work on the Backend part and when I have something close to completion I'll
post again (either here, or more likely to comp.lang.perl.modules now that I
have a news server and a PAUSE account).
Here's an updated tree, with some changes from your suggestion:
bin/tracker.cgi (one of a couple programs I'm giving to
CPAN)
lib/Bittorrent/Tracker.pm
lib/Bittorrent/Tracker/Backend.pm (This seems to be almost an empty module,
will most likely just contain docs on how
to make your own backend)
lib/Bittorrent/Tracker/Backend/None.pm (Default backend, memory only)
lib/Bittorrent/Tracker/Backend/DBI.pm (Almost already made)
lib/Bittorrent/Tracker/Protocol.pm (Calling it Protocol instead of Network)
>Also, you should make it very clear that your module can actually be
>used for a bittorrent tracker, not a client. At first I thought it was a
>module that could be used to query bittorrent trackers.
I was thinking that the Bittorrent:: namespace could also be used for clients.
So the Bittorrent::Client namespace could be used to query trackers. Perhaps
later some changes to the Protocol.pm could allow some extentions to the
Bittorrent protocol.
But I did make some changes to the docs so that it's more clear this actually
IS a tracker, not a way to communicate with one.
>If it was all on CPAN it'd be real nice as well :)
My sentiments exactly :)
I got my PAUSE ID, I'm making those changes and will submit 0.01 as soon as I
get my test program working.
Thanks again
Doug Bell
[email protected]
>===== Original Message From Jean-Michel Hiver <[email protected]> =====
> Deleted to save sanity