Commit graph

32 commits

Author SHA1 Message Date
Joakim Frostegård
4071d4d874 http: use idiomatic folder structure 2021-11-27 18:23:29 +01:00
Joakim Frostegård
b8073e4bd1 Replace HashMap and IndexMap with indexmap_amortized
This will hopefully get down latency.
2021-11-03 10:35:29 +01:00
Joakim Frostegård
9a1993d72e aquatic_http: use signals for reloading access list 2021-11-02 23:16:18 +01:00
Joakim Frostegård
afce23e321 aquatic_http: glommio: use futures-rustls 2021-11-01 17:18:27 +01:00
Joakim Frostegård
af0761418e aquatic_http: improve ConnectionMeta field names and types 2021-10-28 19:30:04 +02:00
Joakim Frostegård
f60631b29e Run cargo fmt 2021-10-28 01:49:37 +02:00
Joakim Frostegård
130377b8f4 aquatic_http: remove mio implementation 2021-10-28 01:48:32 +02:00
Joakim Frostegård
ad7e464788 aquatic_http: split into mio and glommio modules 2021-10-26 15:26:06 +02:00
Joakim Frostegård
38617c70f4 Refactor AccessList; update it periodically in aquatic_udp glommio 2021-10-19 22:52:31 +02:00
Joakim Frostegård
7ccd5fcbf7 access lists: filter requests in socket workers instead 2021-10-16 17:26:40 +02:00
Joakim Frostegård
ddb1f394a1 aquatic_http: move torrent cleaning code to TorrentMaps impl 2021-10-15 23:13:26 +02:00
Joakim Frostegård
7fec41099b aquatic_http: check access list in announce request handler 2021-10-15 22:49:07 +02:00
Joakim Frostegård
4fa199a1e0 aquatic_http access list: add config, state field, initial load 2021-10-15 22:38:58 +02:00
Joakim Frostegård
d0e716f80b Run rustfmt, clean up aquatic_http_protocol/Cargo.toml 2021-08-15 22:26:11 +02:00
Joakim Frostegård
6ee8ed4895 aquatic_common: extract response peers: don't return sender
Seems to fix or at least help with some issues with
real clients being slow to initiate transfers
2020-08-16 23:07:39 +02:00
Joakim Frostegård
2b4cd2dea1 aquatic_http: support multiple request workers 2020-08-13 01:50:18 +02:00
Joakim Frostegård
cce7bd7150 aquatic_http: send responses for each event, use mio poll waker
This means
* less fluctuation in number of responses send per second
* longer poll timeouts can be used since poll is woken when
  responses are available for sending
* drain-like method used to fetch responses from response
  channel, meaning responses added while iterating won't
  be processed
2020-08-10 02:53:15 +02:00
Joakim Frostegård
2893fffd20 aquatic_http: use const LISTENER_TOKEN for clarity 2020-08-09 00:44:39 +02:00
Joakim Frostegård
a3a1d1606b WIP: udp: add ipv6 support
Returning IPv6 peers doesn't really work with UDP. It is not supported by
https://libtorrent.org/udp_tracker_protocol.html. There is a suggestion in
https://web.archive.org/web/20170503181830/http://opentracker.blog.h3q.com/2007/12/28/the-ipv6-situation/
of using action number 4 and returning IPv6 octets just like for IPv4
addresses. Clients seem not to support it very well, but due to a lack of
alternative solutions, it is implemented here
2020-07-31 05:37:58 +02:00
Joakim Frostegård
228511b3aa aquatic_http: replace flume with crossbeam; clean connections less often 2020-07-24 20:36:46 +02:00
Joakim Frostegård
f1f708465a remove aquatic_common_tcp crate, move contents into aquatic_http
It doesn't make a lot of sense to make a separate crate for
the few things here. I don't really want tight coupling between
the crates anyway, since it impedes making changes in them
and makes understanding them more difficult.
2020-07-21 23:01:34 +02:00
Joakim Frostegård
4ac2012a2a aquatic_http: move protocol module to new crate aquatic_http_protocol 2020-07-19 21:59:31 +02:00
Joakim Frostegård
9df1f0ecc6 aquatic_http: rewrite request parsing, use smartstring
Use smartstring in PeerMapKey too.

Improves benchmark speed.

request-from-path:

time:   [2.1484 us 2.1530 us 2.1586 us]
change: [-24.246% -23.908% -23.570%] (p = 0.00 < 0.01)
Performance has improved.
2020-07-19 15:38:26 +02:00
Joakim Frostegård
8ddccb20aa aquatic_http: use new trait Ip for ip generic parameters 2020-07-08 14:22:30 +02:00
Joakim Frostegård
2386dd0e8b aquatic_http: parameterise many data structures over peer IP protocol 2020-07-08 14:13:10 +02:00
Joakim Frostegård
43a33d80c4 aquatic_http: add ipv6 compact responses; fix ipv4/ipv6 issue 2020-07-08 12:26:41 +02:00
Joakim Frostegård
ccafdc5cd3 aquatic_http: clean up clode 2020-07-04 13:51:43 +02:00
Joakim Frostegård
c50dec3496 aquatic_http: add PeerMapKey with PeerID and Either<Ip, announce key> 2020-07-04 12:00:36 +02:00
Joakim Frostegård
7419c51434 aquatic_http protocol: refactor into more submodules, other fixes 2020-07-03 17:25:31 +02:00
Joakim Frostegård
1dc2f44d9c restructure aquatic_common_tcp, move more into it from aquatic_http 2020-07-03 00:23:19 +02:00
Joakim Frostegård
2e53a2adc1 add aquatic_common_tcp crate, move common functionality there 2020-07-02 16:34:36 +02:00
Joakim Frostegård
404e528616 WIP: start work on http tracker 2020-07-01 18:56:19 +02:00