WIP: Extract DbConn, Searcher & Worker into Riker Actors #813

Draft
igalic wants to merge 18 commits from igalic/Plume:refactor/extract-actors into main

18 commits

Author SHA1 Message Date
8aa4ae4302
Make tests compile again 2020-10-08 20:46:38 +02:00
56091c0d49
add UpdateDocument to list of SearcherActor messages
how did this even work?!
I've only been using UpdateDocument so far, and it wasn't listed!
2020-10-08 20:46:37 +02:00
d7e380f83e
remove Searcher from Post::update()
thereby decoupling the two systems (for updates, anyway)
That means, consumers of Post need to update_document themselves!
Post (in update) now only talks to the database)

Tests for this will now be failing, as they haven't been touched yet
2020-10-08 20:46:37 +02:00
06e20299e0
use searcher_actor for posts update route (instead of post.update()) 2020-10-08 20:46:36 +02:00
94cf4dab98
add ActorSystem member to PlumeRocket 2020-10-08 20:46:35 +02:00
1dfad6469b
initialize Actor system in main, as well as SearcherActor 2020-10-08 20:46:34 +02:00
ee6a562404
Wrap Searcher in an Arc only in main 2020-10-08 20:46:34 +02:00
54496c1527
Implement an actor around Searcher
this compiles, but isn't used yet.
2020-10-08 20:46:33 +02:00
4b0b03b848
plume-models: fix test compilation 2020-10-08 20:46:32 +02:00
f6d169567c
Introduce Searcher::new
This function does what was previously done in main:
create a search index, and try to recover for errors
if possible.

This commit also fixes plume-cli to use the new Searcher
API (that depends on a DbPool, not on a single Connection).
2020-10-08 20:46:31 +02:00
eaad38ad2c
Avoid unwrapping, return an Error instead 2020-10-08 20:46:30 +02:00
962fbcc503
plume-model: refactor Searcher to have its own DbPool
this way, we don't need to pass along a conn into the function.
This should make splitting PlumeRocket up into its components a little
easier. This PR is another attempt at fixing #799.
2020-10-08 20:46:30 +02:00
f945e18bf1
Revert "Add an SearcherActor, wrapping Searcher & DbPool"
This reverts commit 0757f84397fc4d4ecba8a904e9d25f1b243b4292.
We'll attempt to use a strategy in #807
2020-10-08 20:46:29 +02:00
b92a877420
finish off the strategy document 2020-10-08 20:46:28 +02:00
046b5d0214
Add past attempts at solutions. 2020-10-08 20:46:27 +02:00
6935565efd
add design document describing current issues 2020-10-08 20:46:27 +02:00
5e17636b9d
Add an SearcherActor, wrapping Searcher & DbPool
and implement AddDocument message!
This code compiles, but hasn't been put to use yet.
2020-10-08 20:46:26 +02:00
d344e06efd
add riker as dependency, we will use it to replace searcher 2020-10-08 20:46:21 +02:00