#Todium, the Torrent Toolbelt

As I’ve grown into more of a front end development role here at BitTorrent, I’ve been spoiled by great analytics services for web apps, and json endpoints for almost anything. I’ve encountered a few cases where I felt that torrent files were unnecessarily difficult to work with, and Todium is an attempt to bring some of those nice web dev elements to working with torrents.

Todium is an open analytics service for torrents, allowing you to make different copies of the same torrent and compare download statistics. The service is build on top of a few generic bits of functionality, so those are being made available as distinct services as well, so that anyone can use them.

##todium.com

The same way you can use bit.ly to create custom urls you can see visitor stats for, todium takes a torrent/magnet link and gives you back one that you can distribute and see stats for.

http://www.clearbits.net/get/98-story-of-stuff.torrent

converts to:

http://torrent.todium.com/-In6q0PhK6UYc_ypkVz7.torrent
Started: 3
Stopped: 1
Completed: 1 / 57.9 MB Downloaded

Hint: You can use todium numerous times on the same torrent, and share them in different locations (twitter, facebook, clearbits, etc) to track different campaigns.

Privacy: Under the hood, todium just uses a tracker to collect and serve torrent scrape information. This is no different than the data collected by opentracker or publicbt, or any other public tracker. If you’d like to view the source for the project, check below for links to all the related GitHub projects.

Code:
https://github.com/pwmckenna/todium
https://github.com/pwmckenna/todium-api
https://github.com/pwmckenna/todium-tracker

##hasher.todium.com

I kept finding myself needing to know the info hash for a torrent file hosted elsewhere. hasher.todium.com takes a torrent url parameter and returns the info hash. JSON/JSONP + CORS, so hit this from anywhere and get a lovely json string back.

Example: Tim Ferriss torrent info hash

Code:
https://github.com/pwmckenna/torrent-file-hasher

##torrent.todium.com

Sometimes its helpful to be able to edit torrents on the fly. In the case of todium, I wanted to splice our custom todium tracker into torrent files hosted elsewhere. Its important that you don’t change the info dict, otherwise you’ll change the info hash for the entire torrent. However, for properties outside of the info dict such as the list of trackers, you can freely edit without creating a seperate swarm.

I’d like this to be a generalized tool, rather than just a way to inject trackers into existing torrents. If you have any parts of a torrent you’d like to edit on the fly, post a comment and I’ll try to add support for it.

Example: Tim Ferriss torrent with an extra tracker

Note: You may have noticed that this service shares the same subdomain as the todium.com generated links. This is because Todium never actually stores the .torrent file. Instead, the “shortened” url pulls from the original torrent file source and parses the torrent file on the fly. This is heavily cached behind Amazon’s Cloudfront CDN, as it turns out the editing is quite slow and computationally pricy.

Code:
https://github.com/pwmckenna/todium-torrent

##Additional features?

Have ideas for additional Todium functionality? Suggest via the comments or twitter and it might just happen!