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

Expose the event loop group fn separately #287

Closed
lvh opened this issue Dec 11, 2016 · 5 comments
Closed

Expose the event loop group fn separately #287

lvh opened this issue Dec 11, 2016 · 5 comments

Comments

@lvh
Copy link

lvh commented Dec 11, 2016

Aleph has some cool functionality for automatically picking the right event loop. Two suggestions:

  • The decision to use nio or epoll could be done inside the delay
  • Many applications would prefer a right-sized thread pool with daemon threads, so need to duplicate code currently in the middle of create-client

In conclusion, I'm suggesting:

If you have any opinions on how this ought to be done, I am volunteering to write the code for this.

@ztellman
Copy link
Collaborator

Is this for the purposes of code simplification, or reuse of this logic elsewhere?

@lvh
Copy link
Author

lvh commented Dec 12, 2016

Both, I guess; but mostly about reuse. E.g. I'm using Netty's DNS resolution with a little Clojure rubbed on it, and I want that functionality as well :)

I also realized why epoll and native are separate right now -- you want to be able to control which one gets used on each new client/server, not once-per-process. Right?

@ztellman
Copy link
Collaborator

That was the idea, though I'm not sure if that's actually useful in practice. For what it's worth, I do have a yet-to-be-finished aleph.dns namespace, which may address a few of your concerns, but I'll give it some thought.

@lvh
Copy link
Author

lvh commented Dec 12, 2016

Nifty. Is that available somewhere or hiding on your laptop? (I'm guessing you have more than I; all I have really is a fn that wraps .resolve, which is all I needed.)

@arnaudgeiser
Copy link
Collaborator

Since we introduced kqueue and io-uring, we now have two external undocumented functions.

While those should be considered implementation details in Aleph as the internals are not encapsulated inside a dedicated namespace (e.g: aleph.http.impl), those will probably stay for a long time or will eventually have a replacement.

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

No branches or pull requests

3 participants