Adrien Béraud
d1aca77809
securedht: move crypto ops to Value
2018-12-17 16:41:00 -05:00
Adrien Béraud
306d573223
proxy client: fix race condition
2018-12-17 16:41:00 -05:00
Andreas Traczyk
5cd53f3624
replace _write with send when building for windows
2018-12-11 14:37:14 -05:00
Andreas Traczyk
dcab32ef4f
replace write with _write when building with msvc
2018-12-06 12:16:59 -05:00
Adrien Béraud
4948bd7ad3
node cache: remove expired weak pointers from cache
...
Remove expired Node weak pointers regularly,
in a way that ensures that:
* every expired pointer gets eventually cleaned up
* expired pointer ratio remains reasonably low
* no cleanup pass blocks the node for too long,
* impact on performance is negligible
Impact on performance:
Every N insertions, at most N nodes are tested by iterating the map
-> performance impact in O(1) (constant).
2018-11-29 19:27:32 -05:00
Yanfei Han
dc4a790a38
A obviouse bug on network engine
2018-11-29 00:47:00 +08:00
Sébastien Blin
07dd8f5648
Merge pull request #350 from savoirfairelinux/feature/cache
...
Feature/cache
2018-11-28 09:22:06 -05:00
Adrien Béraud
092f5cfef0
network_engine: fix warning
2018-11-26 16:34:19 -05:00
Adrien Béraud
18d359a7d2
dht: refresh value if already exists
2018-11-26 01:57:57 -05:00
Adrien Béraud
c6bb67d1ac
dht: add storageRefresh
2018-11-26 01:57:57 -05:00
Adrien Béraud
f4cd7636ce
securedht: use signature cache in storePolicy, editPolicy
2018-11-26 01:57:57 -05:00
Adrien Béraud
b2542a57df
securedht: cache value signature check/decryption results
2018-11-22 15:43:55 -05:00
Adrien Béraud
00c1be9cdc
logger: use DBG for DEBUG to avoid name conflicts
2018-11-22 15:43:55 -05:00
Adrien Béraud
e414ca89c7
dht: don't send probe query for non permanent puts
2018-11-22 15:43:55 -05:00
Sébastien Blin
00a9333de7
dht_proxy_client: fix finished behavior
...
callback_.emplace_back() returns immediately, so, in some case,
finished can be set to true even before we execute one callback.
Finished should not be used into callback. This patch adds a
finished variable only used by the callbacks to avoid this
case.
This improve the reactivity of the proxy client.
2018-11-11 15:27:57 -05:00
Adrien Béraud
c05a93ae54
proxy server: cleanup
2018-10-29 12:45:52 -04:00
Adrien Béraud
ff83a6daab
proxy: support value expiration
2018-10-29 12:45:52 -04:00
Adrien Béraud
94926cea22
proxy server: avoid early session close
2018-10-27 13:21:26 -04:00
Adrien Béraud
3e148599c5
proxy server: stop get if session is closed
2018-10-27 12:20:00 -04:00
Adrien Béraud
522a89b6f8
dht: use search cache for get ops
2018-10-27 11:49:55 -04:00
Adrien Béraud
ba3a42697c
Merge pull request #331 from Dale-M/master
...
Some additions to automake infrastructure to get clean default build.
2018-09-20 14:24:34 -04:00
Adrien Béraud
5112a322de
dht: reschedule permanent put refresh after request
2018-09-19 01:54:54 -04:00
Adrien Béraud
85961c6a62
storage: properly refresh expiration
2018-09-19 01:54:54 -04:00
Adrien Béraud
1eb1f3d5ac
storageStore: add permanent mode
2018-09-19 01:54:54 -04:00
Adrien Béraud
726c138d90
dht: move storageStore to put
2018-09-19 01:54:54 -04:00
Adrien Béraud
1b6b1ca072
comments: fix typos
2018-09-19 01:54:54 -04:00
Dale Mellor
77da72c603
Some additions to automake infrastructure to get clean default build.
...
Be sure to pull in paths to headers for json and MsgPack dependencies.
Be sure to always build the base64 encoder and decoder, as they are
needed.
2018-09-17 09:40:07 +01:00
Adrien Béraud
7fb2da7c54
dhtrunner: avoid polling, use pipe to stop select
2018-09-15 17:22:12 -04:00
Adrien Béraud
246af2f065
value_cache: expire value if expiration is now
2018-08-11 21:27:18 -04:00
Sébastien Blin
f54fcd768f
proxyserver: add stats endpoint for monitoring
2018-08-10 15:03:09 -04:00
Sébastien Blin
6069fba18f
dhtproxyclient: fix ok when a permanent PUT operations fails
2018-07-31 09:42:23 -04:00
Sébastien Blin
751e79a250
dhtrunner: don't use listeners structure without proxy client enabled
...
The token used to cancel a listener was wrong. Indeed, tokenBGlobal
was used to get the linked listener, not to identify the listener
inside dhtrunner.
2018-07-25 11:28:46 -04:00
Adrien Béraud
cd5dc38a57
dhtrunner: decrease max packet handling delay to 500ms
...
Allows for faster recovery in case of CPU contention
2018-07-13 14:29:59 -04:00
Adrien Béraud
ffbb9e23ef
dht: show usage at the end, print max store size
2018-06-27 11:54:15 -04:00
Adrien Béraud
af0a30c9c5
dhtrunner: drop oldest packet if queue is full
2018-06-26 20:41:04 -04:00
Adrien Béraud
2509e8bc5c
Revert "search: use pointer to SearchNode"
...
This reverts commit 3a41f2ce56 .
2018-06-20 14:50:40 -04:00
Adrien Béraud
e349912c07
search: improve canGet performance
2018-06-20 14:50:40 -04:00
Adrien Béraud
a1fc266eac
dhtrunner: add max rx queue size
2018-06-19 14:10:57 -04:00
Adrien Béraud
3e3679bebf
dhtrunner: drop packet if processing took too long
2018-06-18 15:52:20 -04:00
Adrien Béraud
3dca4db408
dhtrunner: don't setProxyServer in headers
...
Don't define setProxyServer in headers since it depends on a configuration option
2018-06-15 12:18:56 -04:00
Sébastien Blin
fb6d290692
Merge pull request #309 from savoirfairelinux/searchnode
...
SearchNode: refresh token
2018-06-13 10:35:51 -04:00
Adrien Béraud
96c60d39ed
proxy server: reschedule after using function
2018-06-12 18:19:12 -04:00
Adrien Béraud
3a41f2ce56
search: use pointer to SearchNode
2018-06-12 16:54:12 -04:00
Adrien Béraud
5bd88533fe
SearchNode: refresh token in Query, Listen answers
2018-06-12 16:50:15 -04:00
Sébastien Blin
3cf2c092f2
proxy: remove useless convertion from InfoHash to InfoHash
2018-06-06 12:16:10 -04:00
Sébastien Blin
aef8aa545b
proxy: reschedule printStatsJob
2018-06-06 12:08:31 -04:00
Sébastien Blin
0c61a605ad
proxy: refresh puts and subscriptions when connectivity changes
2018-06-06 11:29:40 -04:00
Adrien Béraud
07bed77714
proxy server: schedule task from outside thread
2018-06-05 19:43:56 -04:00
Adrien Béraud
aa202b2cd8
dhtrunner: add getNodeInfo()
...
Allow to retrieve all dht stats in a single API call using
the new method getNodeInfo() and the JSON-serializable
new structure NodeInfo.
2018-06-05 19:43:56 -04:00
Sébastien Blin
709a2c7b7c
dht_proxy_server: avoid mutex when getting /
...
The dht_proxy_server should be always up, so getNodesStats will
be pretty always up-to-date. We can add it into a job and avoid
to wait for this method to finish (and this method use an
internal lock) to have a quick answer about the status of the proxy.
Note: the update is forced during the initialization of the proxy
2018-05-30 14:25:46 -04:00