Write runtime libtorrent plugins with Java using frostwire-jlibtorrent #FrostWireLabs

We’ve just pushed upgrades to the frostwire-jlibtorrent API that will allow developers to extend and interact the Bittorrent protocol at a lower level through the implementation of libtorrent plugins.

Before today, a libtorrent plugin developer had to code plugins in C++ and rebuild the libtorrent library binaries for the architectures on which the plugin was meant to be used.

We think that non-bittorrent higher level abstractions (e.g. Bitcoin+Bittorrent integration) that need to occur near the core of the bittorrent protocol can be more easily coded, tested and debugged in a language like Java, without having to touch nor recompile the libtorrent libraries.

Today we’ve made available a new portion of the frostwire-jlibtorrent API that allows you to do this without all the C++ development headaches, you just focus on your plugin logic, and your code will also be available in all platforms with the same .class files.

Here’s an example of a dummy libtorrent Plugin implemented in Java using frostwire-jlibtorrent

To create a Plugin all you need to do is extend the AbstractPlugin class, whose newTorrent method will ask you to provide a TorrentPlugin interface implementation, this is meant to be a plugin instance that takes care of what happens when a torrent is added to the libtorrent session.

We provide an AbstractTorrentPlugin class for you to extend and as you do this you may or may not need to provide your own implementation of the TorrentPlugin::newPeerConnection method, which is meant to return a PeerPlugin, a plugin instance that takes care of what happens for every Peer connection, where probably most of your plugin logic will occur. We also provide an AbstractPeerPlugin implementation that you can extend.

Once you have your plugin ready to go, you can add it to the session with session.addExtension(myPlugin) and all torrents added to the session will invoke hooks that could be handled by your plugin implementations.

PeerCommons.net is recovering from battle wounds

To our loyal chat community and FrostClick.com users.

We’re incredibly apologetic that our content and chat services have been inaccessible since last night due to some creative people attacking our servers all night.

We hope you can be a little patient while we bring the services back.

You can expect downtime for the next hours on:

  • chat.peercommons.net (IRC)
  • frostclick.com (Our legal download directory)
  • tracker.frostwire.com (Our legal torrent tracker)

Tiara Wiles “This is Tiara” (alt. torrent location)
If you wanted to get the Tiara Wiles album (our featured torrent of the week), here’s the torrent file with plenty of seeds.

We’ll be moving FrostClick.com and the tracker to machines far from the IRC server so that this won’t happen again.

We are working as fast as we can to get the issues solved.

PS: And to whoever hacked us, thanks for teaching us more about security, guess we were not paranoid enough and we’ve learned our lesson. And we extend a shaking hand to you, we could use the security knowledge in the team.

Update: FrostClick.com is back online. Still working on chat.peercommons.net

Update 7pm: Peercommons.net is back up. And all the services along with it. Thanks for your patience.

FrostWire Blog moved to WordPress.com

As you’ve noticed, we have moved our blog outside our official domain and out here to wordpress.com.
This is because we’ve been victims of a security exploit on an old version of wordpress.
We decided it’s better to leave the blog here where the wordpress gurus will take care of it better.

All posts and comments have been exported without any problems whatsoever.