Mina Galić igalic
  • Dortmund
  • https://igalic.co/
  • Infrastructure & Open Source

    (Homoiconic Ops Witch)

  • Joined on 2020-06-26
igalic commented on issue plume/documentation#76 2020-07-25 13:19:29 +00:00
Move the arrows in the menu to the right

Was this fixed?

igalic pushed to refactor/extract-searcher-with-dbpool at igalic/Plume 2020-07-25 08:05:44 +00:00
8f0fe5aaf9 remove Searcher from PlumeRocket and add a FromRequest to retrieve it
igalic pushed to refactor/extract-searcher-with-dbpool at igalic/Plume 2020-07-24 20:12:17 +00:00
a5c81498b2 plume-models: fix test compilation
fefd7ef9b6 Wrap Searcher in an Arc only in main
a52b8393a2 Introduce Searcher::new
b9514d5711 Avoid unwrapping, return an Error instead
56689af1ba plume-model: refactor Searcher to have its own DbPool
Compare 12 commits »
igalic pushed to refactor/extract-searcher-with-dbpool at igalic/Plume 2020-07-24 19:19:41 +00:00
9309ed279f plume-models: fix test compilation
igalic commented on pull request plume/documentation#89 2020-07-24 16:13:05 +00:00
Bump rack from 2.0.8 to 2.2.3

is dependabot, or something like it, going to work here?

igalic commented on pull request Plume/Plume#809 2020-07-24 15:46:38 +00:00
plume-model: refactor Searcher to have its own DbPool

🙋🏻‍♀️

igalic commented on pull request Plume/Plume#809 2020-07-24 15:46:38 +00:00
plume-model: refactor Searcher to have its own DbPool

why are we returning Arc<Self>?

igalic commented on pull request Plume/Plume#809 2020-07-24 15:37:17 +00:00
plume-model: refactor Searcher to have its own DbPool

gonna have to ask somebody how the heck this is happening

igalic commented on pull request Plume/Plume#809 2020-07-24 14:49:47 +00:00
plume-model: refactor Searcher to have its own DbPool

👀

igalic commented on pull request Plume/Plume#809 2020-07-24 14:49:47 +00:00
plume-model: refactor Searcher to have its own DbPool

that means we won't know exactly why the pool didn't give us a connection

igalic commented on pull request Plume/Plume#809 2020-07-24 14:49:47 +00:00
plume-model: refactor Searcher to have its own DbPool

you're not trying to convert the original diesel::r2d2::Error?

igalic commented on pull request Plume/Plume#809 2020-07-23 19:35:57 +00:00
plume-model: refactor Searcher to have its own DbPool

can you briefly explain why?

we use .unwrap() in all other lines.

igalic created pull request Plume/Plume#809 2020-07-23 18:32:19 +00:00
plume-model: refactor Searcher to have its own DbPool
igalic pushed to refactor/extract-searcher-with-dbpool at igalic/Plume 2020-07-23 18:31:55 +00:00
3b21eb766d plume-model: refactor Searcher to have its own DbPool
igalic commented on issue Plume/Plume#799 2020-07-22 21:29:37 +00:00
[Refactoring] send messages to dedicated actor instead of directly accessing objects

Some observations, which lead to the confidence with which we've started on #807:

DbPool is an Arc, it can be easily shared via .clone(). This would allow us to create a wrapper object around Searcher which can then have its own DbConn instead of passing one from a — hopefully — short-lived Request, potentially infinitely blocking on it.

The general framework lends itself nicely to be solved with an actor framework, but if that doesn't pan out, we can use any old object, and send it any old message! We've already done good work there in extracting the essence.

It bears repeating why the refactoring to break up PlumeRocket is so important:

We pass PlumeRocket around as ref. It's a giant struct with lots of maybe-related data, giving access to different parts of the system. Passing it, by ref thru Rocket will become an issue as soon as we try to go async, because then we have a borrowed object sitting somewhere, waiting to be .awaited. This is all a big mess, and best of all avoided, but it's also a good opportunity to see which parts of the system we can tear apart from there tight coupling so they will work better.

igalic created pull request Plume/Plume#807 2020-07-22 21:15:04 +00:00
WIP: Experiment: extract Searcher into an Actor
igalic pushed to refactor/extract-searcher at igalic/Plume 2020-07-22 21:06:39 +00:00
ae4ec4f9bd Add an SearcherActor, wrapping Searcher & DbPool
b59af45802 add riker as dependency, we will use it to replace searcher
igalic opened issue Plume/Plume#806 2020-07-22 09:59:02 +00:00
Compile with stable rust
igalic commented on issue Plume/Plume#799 2020-07-21 08:52:15 +00:00
[Refactoring] send messages to dedicated actor instead of directly accessing objects

here's what I've found out in an experiment attempting to extract Searcher into an actor:

  • Searcher is intimately bundled with Post
  • despite that, Searcher is also intimately bundled with DbConn, because Post doesn't actually have all the info Searcher needs

given this asymmetry, i thought it's best to only pass Post.id

but we still have to give it access to a DbConn

perhaps on creation of a Searcher Actor, we could give it its own DbConn?

igalic pushed to refactor/extract-dbconn at igalic/Plume 2020-07-20 14:12:50 +00:00
e19069f750 remove DbConn from PlumeRocket