eclair icon indicating copy to clipboard operation
eclair copied to clipboard

Use actor paths + deadletters instead of `Register`

Open pm47 opened this issue 5 years ago • 1 comments

We're not using actor paths in the code base, instead we pass around actor references. Btw I'm not sure if that's really a best practice, given that in theory we should let them crash which would invalidate their reference.

Instead, we're using the Register which keeps a map of channeld/shortChannelId/nodeId -> ActorRef.

I believe we could instead optimistically use actor paths, and catch unhandled messages in order to send back the appropriate error to the sender. See https://stackoverflow.com/a/23911129.

Might be simpler? Needs prototyping...

pm47 avatar Apr 08 '20 14:04 pm47

As discussed in other threads, it looks like the best practice with Akka Typed is using the Receptionist model (https://doc.akka.io/docs/akka/current/typed/actor-discovery.html), we will probably move to that at some point?

t-bast avatar Oct 12 '20 16:10 t-bast