Commit graph

203 commits

Author SHA1 Message Date
988144e9e7 further relax constrains on RingMap
key now needs to be explicitly given at insert, instead of
deriving it from the value. This makes it possible to store values where
a key cannot be extracted from (HasKeyID)

contributes to #62, #32, #41
2020-07-26 18:55:55 +02:00
6349e05033 enable HIE only in the shell environment, but not by default 2020-07-26 16:38:56 +02:00
473ccb631d add hie as language server to dev environment 2020-07-26 16:26:26 +02:00
91ac4ca7e1 Merge pull request 'refactorRingMap' (#63) from refactorRingMap into mainline
This PR likely enables too many LanguageExtensions and could possibly be simplified, see 63.

Merging this for now though as tests run through fine.
2020-07-26 00:07:53 +02:00
1dfa7a5b8e Merge commit 'd55c2f1f1b' into mainline 2020-07-26 00:02:36 +02:00
0d1551261b adjust code to refactored and parameterisable RingMap
is a bit ugly due to FlexibleContexts being neede at several places
2020-07-25 23:59:48 +02:00
9a20a60222 fix type constraints after RingMap refactor 2020-07-25 23:59:48 +02:00
1ff540fd68 refactor RingMap into own module 2020-07-25 23:59:48 +02:00
d55c2f1f1b define typeclasses for interfacing between PostService and DHT 2020-07-25 23:59:40 +02:00
da1b8f4b9d define typeclasses for interfacing between PostService and DHT 2020-07-25 23:54:27 +02:00
1a085f2fe0 define typeclasses for interfacing between PostService and DHT 2020-07-25 01:53:59 +02:00
c05544aa5b able to start a web server and run the mock API handlers
contributes to #41, #32
2020-07-23 18:29:52 +02:00
f1697e5fd7 re-structure post API, placeholder handlers
contributes to #41, #32
2020-07-23 16:25:14 +02:00
5fedd9f87c specify post relay API endpoints
contributes to #41, #32
2020-07-23 00:09:45 +02:00
e2ecf0739d maybeEmpty can be replaced by Data.List.listToMaybe 2020-07-22 02:56:30 +02:00
ebc0d54ddc periodically purge lookup cache of expired entries
closes #24
2020-07-16 00:24:44 +02:00
0ea5402231 improve documentation exports 2020-07-15 01:48:27 +02:00
c37fe88b35 store and initialise lookup cache
contributes to #24
2020-07-15 01:44:47 +02:00
42af6afb86 generalise CacheEntry type
contributes to #24
2020-07-15 01:32:37 +02:00
8ade04e48d disable online package fetching, only starts to work with cabal 3.4 and needs to be renamed then 2020-07-14 13:40:13 +02:00
7fa6db81de make sure send sockets are bound to the correct local IP 2020-07-11 19:51:03 +02:00
384be969b7 Merge branch 'dhtNetworking' into mainline
closes #1 #3
2020-07-08 01:19:54 +02:00
61ea6ed3ff Periodically contact bootstrap nodes for convergence sampling or joining
closes #56
2020-07-08 01:18:53 +02:00
56ca2b53cc refactor trying to join on any bootstrap node into own function
contributes to #56
2020-07-07 18:07:25 +02:00
d293cc05d1 data structure for RealNode holds common config and management data
contributes to #56, #34, #2
2020-07-07 17:36:12 +02:00
df7423ce2e fixup! iteration limit for QueryID lookups 2020-07-05 18:18:51 +02:00
e91f317a8e decrease logging verbosity 2020-07-05 16:52:09 +02:00
7c17e3a44d implement join-retry on new cache entries
closes #42
2020-07-05 16:48:57 +02:00
bdb92411c6 iteration limit for QueryID lookups
- closes #52
2020-07-02 03:34:40 +02:00
e06c53ff7c stylish fixes 2020-07-02 01:38:51 +02:00
edf66e1b51 add som debug prints 2020-07-02 01:36:31 +02:00
f6481996d7 Change default response to QueryID for unjoined nodes
reason: allow unjoined nodes to find bootstrap node in local cache,
while always advertising itself to incoming requests for bootstrapping.
2020-07-02 00:54:14 +02:00
8d349212b4 prevent cache invariant querying when not joined 2020-07-01 18:24:33 +02:00
abbe664ca1 fixup! make sure that own node isn't added as neighbour 2020-06-30 00:26:26 +02:00
eab5a73ead make sure that own node isn't added as neighbour 2020-06-29 13:42:39 +02:00
6313a06a83 fix time conversion for threadDelay 2020-06-29 13:41:11 +02:00
f7ed0ee8d8 check cache slice invariant for predecessor slices as well
closes #30 \0/
2020-06-27 16:23:16 +02:00
2c3ef44064 check cache invariant for successors and lookup missing IDs
first half of #30
2020-06-27 16:06:43 +02:00
280d928ad7 Refactor requestQueryID to be able to send a single request
in preparation for #30
2020-06-27 16:06:15 +02:00
7f5dac55ea close #29: periodic cache maintenance
periodically delete expired cache entries, check unverified ones and
potentially use them as neighbour
2020-06-25 01:24:38 +02:00
5e8cfb0ccd mark successfully Pinged nodes as verified
for #29
2020-06-24 22:27:46 +02:00
c9783a10cf launch stabilise thread
closes #44

although stabilise functionality is still untested
2020-06-24 02:51:39 +02:00
81e346db4e update responding neighbours and delete unresponding ones from cache
contributes to #44
2020-06-24 02:48:41 +02:00
16b46a8b0b add some comments on stabilise 2020-06-24 02:12:21 +02:00
25f44f3a45 look up additional neighbours if necessary
for #44
2020-06-24 01:19:53 +02:00
111c1a299d refactored stabilise: use first responding neighbour
contributes to #44
2020-06-23 19:34:15 +02:00
d5f502c05c ping potential neighbours before adding to list
for #44
2020-06-20 22:28:11 +02:00
0494ddd696 stabilise periodically
contributes to #44
2020-06-20 21:24:31 +02:00
3482876d9b send and parse Ping requests
contributes to #29 #44
2020-06-19 23:03:27 +02:00
00ff2bf071 refactor adding neighbours 2020-06-19 19:15:05 +02:00