Trolli Schmittlauch
6c5e40f8ad
fix wrong passing of arguments in receive-loop part checking
2020-08-24 15:28:06 +02:00
Trolli Schmittlauch
3bd4cb667d
explicitly pass socket in send-receive-loop
2020-08-24 10:02:45 +02:00
Trolli Schmittlauch
4ba592d8a2
bugfix: DHT request timeout unit is milliseconds
2020-08-23 15:21:24 +02:00
Trolli Schmittlauch
cd8ea07600
bugfix: make unjoined nodes consider all IDs to be their responsibility
2020-08-23 13:04:58 +02:00
Trolli Schmittlauch
2b418189a6
use hard-coded defaults for DHT request timeout and retries
2020-08-23 12:06:26 +02:00
Trolli Schmittlauch
c3b1aad1c7
abstract away the hashtag -> NodeID conversion
2020-08-21 23:55:20 +02:00
Trolli Schmittlauch
75c1932ef6
send fetchable post URIs as ID
2020-08-21 23:47:42 +02:00
Trolli Schmittlauch
5511026c8d
reduce logging verbosity
2020-08-21 14:40:29 +02:00
Trolli Schmittlauch
32734102cd
improve documentation of clientPublishPost
2020-08-20 18:13:50 +02:00
Trolli Schmittlauch
2548b6a507
automatically subscribe when publishing to a tag
2020-08-20 11:49:23 +02:00
Trolli Schmittlauch
fce5ff9153
implement service data migration for stabilise
2020-08-18 00:19:21 +02:00
Trolli Schmittlauch
6982a0b245
indicate in LeaveRequest whether to expect a migration
...
this information is used to decide whether to await an incoming
migration in `respondLeave`
2020-08-17 12:36:02 +02:00
Trolli Schmittlauch
b8cedada48
prevent threads not awaiting migration from blocking their response
2020-08-17 11:37:04 +02:00
Trolli Schmittlauch
c49c1a89c9
wait for migration to complete on join
...
also clean up migration entry after success
2020-08-17 00:22:48 +02:00
Trolli Schmittlauch
414564705a
possibility to wait for a migration to complete
2020-08-16 23:26:31 +02:00
Trolli Schmittlauch
581757965a
trigger service data migration at join
2020-08-16 17:53:56 +02:00
Trolli Schmittlauch
470ce6f39a
correct the slice of transfered tags at leave
2020-08-15 23:58:47 +02:00
Trolli Schmittlauch
4302452d18
implement vserver leave and trigger data transfer initiation
...
still unused though
contributes to #36
2020-08-15 22:56:16 +02:00
Trolli Schmittlauch
d2e4359a21
rename join function to clarify it just joining a single vserver
2020-08-15 17:37:14 +02:00
Trolli Schmittlauch
8db8907163
filter out spoofed requests for important operations like Join, Leave, Stabilise
2020-08-15 17:19:53 +02:00
Trolli Schmittlauch
5f7ca23f71
add missing leave request sending function
2020-08-14 22:59:28 +02:00
Trolli Schmittlauch
4339cace20
function for initially publishing a post
2020-08-14 11:06:58 +02:00
Trolli Schmittlauch
bf277c5a73
unsubsribe from tag
2020-08-13 23:50:33 +02:00
Trolli Schmittlauch
402378a78b
signal and handle non-responsibility to subscriptions
2020-08-13 23:44:24 +02:00
Trolli Schmittlauch
e646045ab2
include port in Origin header
2020-08-13 21:57:28 +02:00
Trolli Schmittlauch
e9ae258dde
subscribe to tag
2020-08-13 21:12:39 +02:00
Trolli Schmittlauch
375014812a
use a shared HTTP manager for requests
2020-08-13 19:05:38 +02:00
Trolli Schmittlauch
580410e0b4
simple post fetch worker thread
2020-08-13 13:07:50 +02:00
Trolli Schmittlauch
c1ce386b65
send prepared subscriptions and clean up on success
2020-08-12 15:23:10 +02:00
Trolli Schmittlauch
2e88a4079b
extract and build subscriber payload for sending
2020-08-12 14:07:19 +02:00
Trolli Schmittlauch
1d808b6776
fix typo
2020-08-12 12:16:20 +02:00
Trolli Schmittlauch
1258f673da
flush responsibility cache and retry in post queue delivery
2020-08-12 12:07:41 +02:00
Trolli Schmittlauch
96c1963a4f
actually check own responsibility for tags before accepting posts
2020-08-11 00:16:10 +02:00
Trolli Schmittlauch
7036867ae0
implemented first Servant client query
2020-08-03 22:50:48 +02:00
Trolli Schmittlauch
20e51ecca4
define API client functions
2020-08-02 14:59:03 +02:00
Trolli Schmittlauch
89706f688a
server endpoint for tag unsubscription
2020-08-01 11:18:16 +02:00
Trolli Schmittlauch
7280f251b5
server endpoint for tag subscription
2020-08-01 11:00:38 +02:00
Trolli Schmittlauch
7d7fa3b52a
fix haddock parsing
2020-07-31 17:49:52 +02:00
Trolli Schmittlauch
50044673a6
server endpoint for tag-post delivery
2020-07-31 17:46:33 +02:00
Trolli Schmittlauch
e3c7faa80b
properly initialise RealNode with service and vserver data, set up reference
2020-07-31 16:54:19 +02:00
Trolli Schmittlauch
5ffe1b074e
add reference from RealNode to Service
...
This required to make both RealNode(STM) and LocalNodeState(STM) parameterisable
polymorphic types
2020-07-30 02:19:52 +02:00
Trolli Schmittlauch
4bf8091143
fix type signature of fediChordInit
2020-07-30 01:30:42 +02:00
Trolli Schmittlauch
98ca0ff13e
service config, integrate service launch into DHT launch
...
TODO: hold a reference from DHT to service
2020-07-30 01:23:03 +02:00
Trolli Schmittlauch
da47f8062f
add lease time to subscription entries
2020-07-29 23:06:07 +02:00
Trolli Schmittlauch
ad52a017aa
add relay inbox endpoint
2020-07-29 22:15:14 +02:00
Trolli Schmittlauch
bd70e2dff0
implement multiple post fetch (with placeholder content)
2020-07-29 00:06:27 +02:00
Trolli Schmittlauch
63bc06a88e
implement post fetch (with placeholder content)
2020-07-28 23:45:21 +02:00
Trolli Schmittlauch
970c94ff0d
set up subscription data structures and transfer subscription endpoint
2020-07-28 23:17:26 +02:00
Trolli Schmittlauch
3b65757406
worker thread for processing incoming posts in background, started together with web server
2020-07-28 02:12:15 +02:00
Trolli Schmittlauch
736815ea83
normalise hastag unicode representation of incoming posts
2020-07-27 21:49:49 +02:00
Trolli Schmittlauch
daae9d0b38
process and enqueue incoming posts
2020-07-27 21:39:49 +02:00
Trolli Schmittlauch
04423171fd
define data types for post and subscription storage
2020-07-27 13:20:15 +02:00
Trolli Schmittlauch
7878c67635
adjust rest of code to refactored RingMap
2020-07-27 00:37:31 +02:00
Trolli Schmittlauch
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
Trolli Schmittlauch
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
Trolli Schmittlauch
9a20a60222
fix type constraints after RingMap refactor
2020-07-25 23:59:48 +02:00
Trolli Schmittlauch
1ff540fd68
refactor RingMap into own module
2020-07-25 23:59:48 +02:00
Trolli Schmittlauch
d55c2f1f1b
define typeclasses for interfacing between PostService and DHT
2020-07-25 23:59:40 +02:00
Trolli Schmittlauch
1a085f2fe0
define typeclasses for interfacing between PostService and DHT
2020-07-25 01:53:59 +02:00
Trolli Schmittlauch
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
Trolli Schmittlauch
f1697e5fd7
re-structure post API, placeholder handlers
...
contributes to #41 , #32
2020-07-23 16:25:14 +02:00
Trolli Schmittlauch
5fedd9f87c
specify post relay API endpoints
...
contributes to #41 , #32
2020-07-23 00:09:45 +02:00
Trolli Schmittlauch
e2ecf0739d
maybeEmpty can be replaced by Data.List.listToMaybe
2020-07-22 02:56:30 +02:00
Trolli Schmittlauch
ebc0d54ddc
periodically purge lookup cache of expired entries
...
closes #24
2020-07-16 00:24:44 +02:00
Trolli Schmittlauch
0ea5402231
improve documentation exports
2020-07-15 01:48:27 +02:00
Trolli Schmittlauch
c37fe88b35
store and initialise lookup cache
...
contributes to #24
2020-07-15 01:44:47 +02:00
Trolli Schmittlauch
42af6afb86
generalise CacheEntry type
...
contributes to #24
2020-07-15 01:32:37 +02:00
Trolli Schmittlauch
7fa6db81de
make sure send sockets are bound to the correct local IP
2020-07-11 19:51:03 +02:00
Trolli Schmittlauch
61ea6ed3ff
Periodically contact bootstrap nodes for convergence sampling or joining
...
closes #56
2020-07-08 01:18:53 +02:00
Trolli Schmittlauch
56ca2b53cc
refactor trying to join on any bootstrap node into own function
...
contributes to #56
2020-07-07 18:07:25 +02:00
Trolli Schmittlauch
d293cc05d1
data structure for RealNode holds common config and management data
...
contributes to #56 , #34 , #2
2020-07-07 17:36:12 +02:00
Trolli Schmittlauch
df7423ce2e
fixup! iteration limit for QueryID lookups
2020-07-05 18:18:51 +02:00
Trolli Schmittlauch
e91f317a8e
decrease logging verbosity
2020-07-05 16:52:09 +02:00
Trolli Schmittlauch
7c17e3a44d
implement join-retry on new cache entries
...
closes #42
2020-07-05 16:48:57 +02:00
Trolli Schmittlauch
bdb92411c6
iteration limit for QueryID lookups
...
- closes #52
2020-07-02 03:34:40 +02:00
Trolli Schmittlauch
e06c53ff7c
stylish fixes
2020-07-02 01:38:51 +02:00
Trolli Schmittlauch
edf66e1b51
add som debug prints
2020-07-02 01:36:31 +02:00
Trolli Schmittlauch
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
Trolli Schmittlauch
8d349212b4
prevent cache invariant querying when not joined
2020-07-01 18:24:33 +02:00
Trolli Schmittlauch
abbe664ca1
fixup! make sure that own node isn't added as neighbour
2020-06-30 00:26:26 +02:00
Trolli Schmittlauch
eab5a73ead
make sure that own node isn't added as neighbour
2020-06-29 13:42:39 +02:00
Trolli Schmittlauch
6313a06a83
fix time conversion for threadDelay
2020-06-29 13:41:11 +02:00
Trolli Schmittlauch
f7ed0ee8d8
check cache slice invariant for predecessor slices as well
...
closes #30 \0/
2020-06-27 16:23:16 +02:00
Trolli Schmittlauch
2c3ef44064
check cache invariant for successors and lookup missing IDs
...
first half of #30
2020-06-27 16:06:43 +02:00
Trolli Schmittlauch
280d928ad7
Refactor requestQueryID to be able to send a single request
...
in preparation for #30
2020-06-27 16:06:15 +02:00
Trolli Schmittlauch
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
Trolli Schmittlauch
5e8cfb0ccd
mark successfully Pinged nodes as verified
...
for #29
2020-06-24 22:27:46 +02:00
Trolli Schmittlauch
c9783a10cf
launch stabilise thread
...
closes #44
although stabilise functionality is still untested
2020-06-24 02:51:39 +02:00
Trolli Schmittlauch
81e346db4e
update responding neighbours and delete unresponding ones from cache
...
contributes to #44
2020-06-24 02:48:41 +02:00
Trolli Schmittlauch
16b46a8b0b
add some comments on stabilise
2020-06-24 02:12:21 +02:00
Trolli Schmittlauch
25f44f3a45
look up additional neighbours if necessary
...
for #44
2020-06-24 01:19:53 +02:00
Trolli Schmittlauch
111c1a299d
refactored stabilise: use first responding neighbour
...
contributes to #44
2020-06-23 19:34:15 +02:00
Trolli Schmittlauch
d5f502c05c
ping potential neighbours before adding to list
...
for #44
2020-06-20 22:28:11 +02:00
Trolli Schmittlauch
0494ddd696
stabilise periodically
...
contributes to #44
2020-06-20 21:24:31 +02:00
Trolli Schmittlauch
3482876d9b
send and parse Ping requests
...
contributes to #29 #44
2020-06-19 23:03:27 +02:00
Trolli Schmittlauch
00ff2bf071
refactor adding neighbours
2020-06-19 19:15:05 +02:00
Trolli Schmittlauch
e898b80762
Merge branch 'refactorSuccessorsPredecessors' into dhtNetworking
2020-06-19 18:31:39 +02:00
Trolli Schmittlauch
3f42f98443
adjust lookup to RingMap, fix #48
...
- change default lookup result when not joined to FOUND
- fix determining own responsibility #48
- adjust tests
2020-06-18 23:08:20 +02:00
Trolli Schmittlauch
da0b8626cb
critical bug fix: use target ID for predecessor query lookup
2020-06-18 23:06:43 +02:00
Trolli Schmittlauch
f27812bcf3
give up on providing type signature for takeEntriesUntil
2020-06-17 15:13:49 +02:00