Commit graph

230 commits

Author SHA1 Message Date
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 8faa9dc016 fix test by providing a MockService 2020-08-01 18:58:49 +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 6349e05033 enable HIE only in the shell environment, but not by default 2020-07-26 16:38:56 +02:00
Trolli Schmittlauch 473ccb631d add hie as language server to dev environment 2020-07-26 16:26:26 +02:00
Trolli Schmittlauch 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
Trolli Schmittlauch 1dfa7a5b8e Merge commit 'd55c2f1f1b' into mainline 2020-07-26 00:02:36 +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 da1b8f4b9d define typeclasses for interfacing between PostService and DHT 2020-07-25 23:54:27 +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 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
Trolli Schmittlauch 7fa6db81de make sure send sockets are bound to the correct local IP 2020-07-11 19:51:03 +02:00
Trolli Schmittlauch 384be969b7 Merge branch 'dhtNetworking' into mainline
closes #1 #3
2020-07-08 01:19:54 +02:00
Trolli Schmittlauch 61ea6ed3ff Periodically contact bootstrap nodes for convergence sampling or joining
closes #56
2020-07-08 01:18:53 +02:00