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

Support for Aleph? #39

Open
neilwashere opened this issue Jan 30, 2016 · 7 comments
Open

Support for Aleph? #39

neilwashere opened this issue Jan 30, 2016 · 7 comments

Comments

@neilwashere
Copy link

Although it's still in beta, Aleph is quite an interesting ring compatible server in that it can take handlers that return a manifold deferred.

Plugging it in with low effort requires the default handler middleware to be removed. That's fine for my needs right now. What would you like to see from a PR that included the ability to run Aleph instead of Jetty or httpkit? Is this something you would even consider?

Forked version using Aleph: https://github.com/neilwashere/boot-http

@pandeiro
Copy link
Owner

pandeiro commented Feb 1, 2016

I like it! My one change would be for the option to be named -S / --server instead of web, which seems more descriptive and parallels the variable names in the implementation. Thanks for proposing this!

@pandeiro
Copy link
Owner

pandeiro commented Feb 1, 2016

Plugging it in with low effort requires the default handler middleware to be removed.

I added a line comment to the commit in your fork asking there; but I'll ask here. Why is this? Could it be made to work with those middleware? Could those middleware be elided only when the server specified is aleph, and not, for instance, httpkit?

@boxxxie
Copy link

boxxxie commented Feb 5, 2016

would love for you to make a PR and get this merged....
💃

@neilwashere
Copy link
Author

If there is appetite for this addition then I'll proceed. I wasn't too sure if it was overstepping what this lib is offering.

I'll have a think about something not too messy for including the default middleware on a server other than Aleph (the reason being that Aleph accepts a handler that can return a deferred value. Regular middleware will blow up on that). I agree with the -S --server switch and will have a think about that too. There is a server def'd in the code and I was a little worried about shadowing.

@boxxxie
Copy link

boxxxie commented Feb 10, 2016

if someone is going to use the aleph option, or any option for that matter, i hope they do at least a little bit of reading about it.
aleph is good for me as i'm using yada. right now yada is only able to be used with aleph.
i think that if people are able to spend the time implementing a server, it should be included in the lib. if the server is funnly like pedestal or aleph, then that could be covered in documentation.

would it be possible to implement a plugin system for this boot-middlewear? allowing people to add servers without effecting the repo?

@pandeiro
Copy link
Owner

I am not sure how we could make this pluggable, as the implementation details of the different servers right now are coupled to how boot-http starts and stops them. But I'd love to hear ideas.

Re: aleph, I'd be interested in adding it, for sure. I don't think it's overstepping. It would be nice however to maintain the same semantics as the other server options, namely ability to serve a directory and resources, serve just from the resource path, or serve a handler with optional reloading. I don't know enough about aleph to know if it's easy to cover all of those.

@nha
Copy link

nha commented Jul 20, 2016

Yada ( https://github.com/juxt/yada ), which sits above Aleph, has support for serving directory etc. and is now past 1.0 so it might be worth investigating.

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

4 participants