tracker/README.md

31 lines
2.2 KiB
Markdown
Raw Normal View History

2013-06-23 12:21:59 +02:00
#chihaya [![Build Status](https://travis-ci.org/pushrax/chihaya.png?branch=master)](https://travis-ci.org/pushrax/chihaya)
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
chihaya is a high-performance [BitTorrent tracker](http://en.wikipedia.org/wiki/BitTorrent_tracker) written in the Go programming language. It isn't quite ready for prime-time just yet, but these are the features that it targets:
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
- Asynchronous and concurrent (multiplexes requests over all available threads)
2013-06-22 01:31:32 +02:00
- Low processing and memory footprint
- IPv6 support
2013-06-23 12:21:59 +02:00
- Storage interface that can be easily adapted to use any data store
- Scaling properties that directly correlate with the chosen data store's scaling properties
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
##installing
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
```sh
$ go install github.com/pushrax/chihaya
```
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
##configuring
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
Configuration is done in a JSON formatted file specified with the `-config` flag. One can start with [`example/config.json`](https://github.com/pushrax/chihaya/blob/master/example/config.json) as a base.
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
##implementing a new storage backend
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
The [`storage`](http://godoc.org/github.com/pushrax/chihaya/storage) package works similar to the standard library's [`database/sql`](http://godoc.org/database/sql) package. To write a new storage backend, create a new Go package that has an implementation of both the [`Storage`](http://godoc.org/github.com/pushrax/chihaya/storage#Storage) and the [`StorageDriver`](http://godoc.org/github.com/pushrax/chihaya/storage#StorageDriver) interfaces. Within your package define an [`init()`](http://golang.org/ref/spec#Program_execution) function that calls [`storage.Register(driverName, yourStorageDriver)`](http://godoc.org/github.com/pushrax/chihaya/storage#Register). After that, all you have to do is remember to add `import _ path/to/your/library` to the top of `main.go` and now config files will recognize your driver by name.
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
##contributing
2013-06-22 01:31:32 +02:00
2013-06-23 12:21:59 +02:00
If you're interested in contributing, please contact us in **#chihaya on [freenode](http://freenode.net/)**([webchat](http://webchat.freenode.net?channels=chihaya)) or post to the issue tracker. Please don't offer a pull request with no prior communication attempts (unless it's small), as it will most likely lead to confusion and time wasted for everyone. And remember: good gophers always use gofmt!asted for everyone. And remember: good gophers always use gofmt!