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

The process supervised and the process owning the socket may be different #119

Closed
essen opened this issue Aug 12, 2015 · 8 comments
Closed
Milestone

Comments

@essen
Copy link
Member

essen commented Aug 12, 2015

RabbitMQ for example starts a number of processes when a connection gets accepted. The top level process (that we need to supervise) is itself a supervisor (which we can already accept fine). But it's not the process that will read from the socket, one of its children is. So it could be very nice if we allowed returning two pids, one for the process to be supervised, and one for the process that will do the reading.

Should be done in Ranch 2 in #111.

Also related to rabbitmq/rabbitmq-server#260.

@essen essen added this to the 1.2.0 milestone Aug 13, 2015
@essen
Copy link
Member Author

essen commented Aug 13, 2015

Will do that in 1.2.0, it's a new feature and doesn't break anything.

@essen
Copy link
Member Author

essen commented Aug 18, 2015

Straightforward enough except on what to do when the controlling_process call fails.

@essen
Copy link
Member Author

essen commented Aug 18, 2015

Solution: kill.

Docs should make clear that the process gets killed brutally, and if that's not what the user wants they should synchronize sensitive processes after accept_ack returns.

@essen
Copy link
Member Author

essen commented Aug 18, 2015

Should only be enabled when the connection_type value is set to supervisor. This makes no sense to supervisor a worker but have a separate process handle the socket.

@essen
Copy link
Member Author

essen commented Aug 18, 2015

Done, tests need to be written next though.

@essen
Copy link
Member Author

essen commented Aug 20, 2015

Looks to be working in RabbitMQ.

@essen
Copy link
Member Author

essen commented Aug 20, 2015

Done in 52797b0 except I forgot the tests. Oops. :-)

@essen
Copy link
Member Author

essen commented Aug 20, 2015

Tests are in. Closing!

@essen essen closed this as completed Aug 20, 2015
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

1 participant