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

Rascunho
igalic quer aplicar o merge de 18 commits de igalic/Plume:refactor/extract-actors em main

18 Commits (main)

Autor SHA1 Mensagem Data
Ana Gelez 8aa4ae4302
Make tests compile again 4 anos atrás
Mina Galić 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!
4 anos atrás
Mina Galić 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
4 anos atrás
Mina Galić 06e20299e0
use searcher_actor for posts update route (instead of post.update()) 4 anos atrás
Mina Galić 94cf4dab98
add ActorSystem member to PlumeRocket 4 anos atrás
Mina Galić 1dfad6469b
initialize Actor system in main, as well as SearcherActor 4 anos atrás
Ana Gelez ee6a562404
Wrap Searcher in an Arc only in main 4 anos atrás
Mina Galić 54496c1527
Implement an actor around Searcher
this compiles, but isn't used yet.
4 anos atrás
Mina Galić 4b0b03b848
plume-models: fix test compilation 4 anos atrás
Ana Gelez 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).
4 anos atrás
Ana Gelez eaad38ad2c
Avoid unwrapping, return an Error instead 4 anos atrás
Mina Galić 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.
4 anos atrás
Mina Galić f945e18bf1
Revert "Add an SearcherActor, wrapping Searcher & DbPool"
This reverts commit 0757f84397fc4d4ecba8a904e9d25f1b243b4292.
We'll attempt to use a strategy in #807
4 anos atrás
Mina Galić b92a877420
finish off the strategy document 4 anos atrás
Mina Galić 046b5d0214
Add past attempts at solutions. 4 anos atrás
Mina Galić 6935565efd
add design document describing current issues 4 anos atrás
Mina Galić 5e17636b9d
Add an SearcherActor, wrapping Searcher & DbPool
and implement AddDocument message!
This code compiles, but hasn't been put to use yet.
4 anos atrás
Mina Galić d344e06efd
add riker as dependency, we will use it to replace searcher 4 anos atrás