Commit graph

35 commits

Author SHA1 Message Date
Joakim Frostegård
1b8d74e26d rename aquatic to aquatic_udp, same for bench and load test crates 2020-05-11 16:55:46 +02:00
Joakim Frostegård
f2ae494902 aquatic: make extract_response_peers generic (for aquatic_ws) 2020-05-08 21:05:17 +02:00
Joakim Frostegård
e0526ac828 aquatic handle_announce_requests: reorder code, remove branch 2020-05-06 00:44:23 +02:00
Joakim Frostegård
f9428801bf aquatic: don't use atomic usizes in torrent state
Doesn't make sense any more, since now a Mutex is used, not
dashmap with RwLock-like functionality
2020-05-06 00:27:16 +02:00
Joakim Frostegård
4127cbc7c9 aquatic: handlers: minor syntax and comment improvements 2020-04-14 20:13:12 +02:00
Joakim Frostegård
c44c5b017f aquatic: announce: fix bug in calculation of number of peers to take 2020-04-13 12:52:58 +02:00
Joakim Frostegård
8f68b3a9a2 aquatic: config: change default settings 2020-04-13 12:50:53 +02:00
Joakim Frostegård
ca52b44389 split connection and torrent mutexes again 2020-04-13 12:01:17 +02:00
Joakim Frostegård
06ff4ad9d0 aquatic: save valid_until Instant in connections and requests
Hopefully prevents strange subtraction overflow error, but
we'll see.
2020-04-12 22:04:42 +02:00
Joakim Frostegård
140aa4b75d aquatic: improve naming of socket workers, request workers 2020-04-12 21:40:38 +02:00
Joakim Frostegård
f8713c09c1 aquatic: handler: put responses in vector, send after releasing lock 2020-04-12 14:54:38 +02:00
Joakim Frostegård
2779b6ec3a aquatic: lock connections and torrents together; optimize handler
Handler: don't stop collecting requests early unless mutex can
be unlocked.
2020-04-12 14:44:34 +02:00
Joakim Frostegård
5430e561f5 aquatic: Config: add fields for max handler request, channel timeout 2020-04-12 13:26:44 +02:00
Joakim Frostegård
e61c961126 Use hashbrown hashmap directly for faster hash (ahash) 2020-04-12 13:19:07 +02:00
Joakim Frostegård
558ddadf28 Remove DashMap, use parking_lot::Mutex<HashMap> instead 2020-04-11 22:07:09 +02:00
Joakim Frostegård
70cc193522 Use crossbeam channel insteaf of SegQueue
Reduces overutilization of CPU greatly
2020-04-11 21:11:25 +02:00
Joakim Frostegård
f37ba1e52e Use (unbounded) SegQueue instead of ArrayQueue 2020-04-11 20:00:51 +02:00
Joakim Frostegård
3527952242 start work on using seperate threads for sockets and handlers 2020-04-11 19:35:15 +02:00
Joakim Frostegård
688372bdf2 aquatic: announce and scrape handlers: send back error on invalid conn 2020-04-11 14:17:03 +02:00
Joakim Frostegård
b457df26e3 aquatic annonunce handler: downgrade TorrentMap ref instead of new .get 2020-04-09 11:46:06 +02:00
Joakim Frostegård
32edee9bbb aquatic: add #[inline] to handle_readable_socket and handlers
Also update aquatic_bench comment with new bench results
2020-04-09 10:14:53 +02:00
Joakim Frostegård
2fd732efc6 aquatic: handlers: pass rng's as function arguments 2020-04-09 09:53:18 +02:00
Joakim Frostegård
ad68dda9f5 aquatic: remove unnecessary fields from Peer; general clean up 2020-04-08 21:40:36 +02:00
Joakim Frostegård
31c8864658 aquatic: put max_scrape_torrents, max_response_peers in NetworkConfig 2020-04-08 21:32:05 +02:00
Joakim Frostegård
7239e9c047 aquatic: add and use NetworkConfig.peer_announce_interval 2020-04-08 21:30:57 +02:00
Joakim Frostegård
766606cc08 aquatic: announce handler: improve safety by small margin 2020-04-08 20:26:39 +02:00
Joakim Frostegård
789783cfe4 aquatic scrape handler: preallocate stats vec better 2020-04-08 20:23:31 +02:00
Joakim Frostegård
910accad31 announce handler: keep mutable access to torrent map less time 2020-04-08 13:32:18 +02:00
Joakim Frostegård
a865f4a1ae Add inline markers; simplify ip address conversion in request_from_bytes 2020-04-08 11:21:00 +02:00
Joakim Frostegård
3ca22c9f3f aquatic: take into account how many peers announcing peer wants back 2020-04-07 14:50:33 +02:00
Joakim Frostegård
e4dfe2852c aquatic: add Config struct, use in code 2020-04-06 20:14:24 +02:00
Joakim Frostegård
81cb03403d extract_response_peers: use faster method, improve testing 2020-04-05 18:29:08 +02:00
Joakim Frostegård
3c411bdbf4 announce handler: extract_response_peers: optimize 2020-04-05 16:37:35 +02:00
Joakim Frostegård
aa771f6a68 announce handler: init SmallRng outside of extract_response_peers 2020-04-05 16:31:02 +02:00
Joakim Frostegård
09cb31a4c9 rename handler.rs to handlers.rs 2020-04-05 16:23:51 +02:00
Renamed from aquatic/src/lib/handler.rs (Browse further)