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

Celluloid concurrency doesn't parallelize the connection setup #84

Closed
dblock opened this issue May 1, 2016 · 5 comments
Closed

Celluloid concurrency doesn't parallelize the connection setup #84

dblock opened this issue May 1, 2016 · 5 comments
Labels

Comments

@dblock
Copy link
Collaborator

dblock commented May 1, 2016

Celluloid creates an Actor which then performs a connection. Even if you put this inside a Celluloid.defer (as I did in dblock/slack-market@3635cdd) it doesn't seem to happen in parallel, build_socket is blocking. This causes server start with lots of connections to be very slow, as we create TCP connections one-at-a-time.

@dblock dblock added the bug? label May 1, 2016
@dblock
Copy link
Collaborator Author

dblock commented May 1, 2016

@mikz Maybe you can help with this?

@dblock
Copy link
Collaborator Author

dblock commented May 1, 2016

@mikz
Copy link
Contributor

mikz commented May 2, 2016

I have not worked with Celluloid enough to get this problem.

The connect is happening synchronously iirc.
That part could be wrapped in some actor, but then the status could not be immediate and would have to use Future.

@dblock
Copy link
Collaborator Author

dblock commented May 2, 2016

@mikz I thought that using Celluloid.defer around this would do it, but I couldn't make it happen in parallel.

@dblock dblock changed the title Celluloid concurrency doesn't quite parallelize the connection setup Celluloid concurrency doesn't parallelize the connection setup May 2, 2016
@dblock
Copy link
Collaborator Author

dblock commented May 4, 2016

Fixed in dblock@e4edaca.

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

No branches or pull requests

2 participants