Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlowDeathPact #74

Open
ktoso opened this issue Oct 17, 2016 · 6 comments
Open

FlowDeathPact #74

ktoso opened this issue Oct 17, 2016 · 6 comments

Comments

@ktoso
Copy link
Member

ktoso commented Oct 17, 2016

Allow terminating a stage on actor termination or the other way around, might be useful in Akka HTTP when we want to have an actor as long as the request/response flow is alive etc.

I implemented an initial version here: akka/akka#21076

@viktorklang
Copy link
Member

This assumes a specific Materializer, doesn't it? Seems like a concern
violation.

On Mon, Oct 17, 2016 at 10:43 AM, Konrad Malawski [email protected]
wrote:

Allow terminating a stage on actor termination or the other way around,
might be useful in Akka HTTP when we want to have an actor as long as the
request/response flow is alive etc.

I implemented an initial version here: akka/akka#21076
akka/akka#21076


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#74, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAqd96fiL4uxbyFdvdZaBsKXl910TNOks5q0zU8gaJpZM4KYXhL
.

Cheers,

@ktoso
Copy link
Member Author

ktoso commented Oct 17, 2016

I don't see how it assumes any materializer. It makes most sense when used with the Actor one, sure. As does entire Akka HTTP 😉

We have a bad user experience in binding lifecycles of Flows and Actors, it's like two worlds that are hard to connect properly (yes, it's a common complaint)

@viktorklang
Copy link
Member

@ktoso What does DeathPact mean in a non ActorMaterializer context?

@ktoso
Copy link
Member Author

ktoso commented Oct 17, 2016

How does that have anything to do with ActorMaterializer? Check the impl. https://github.com/akka/akka/pull/21076/files

Flow dies if "watched" Actor dies.
Actor dies if "watched" Flow dies.

Any materializer can implement this. Which doesn't mean that will be the common use case, the common use case is when in Akka HTTP we currently tell people "oh yeah you have to write this much code to bind these lifecycles" – we're being very unhelpful in face of a real typical pattern right now, and this operation helps there.

Note also that this is akka-stream-contrib, where more liberal operations are accepted.

@viktorklang
Copy link
Member

Doh! I understood it as being able to DeathWatching the Actor running the GraphInterpreter…

Sorry for the noise!

@ktoso
Copy link
Member Author

ktoso commented Oct 17, 2016

No problem, cheers! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants