uzhttp icon indicating copy to clipboard operation
uzhttp copied to clipboard

WIP - Minimal routing DSL

Open seanphawkins opened this issue 4 years ago • 3 comments

I've thrown together a fairly minimal routing DSL that loosely mimics Akka HTTP's syntax. It arbitrarily supports URIs with up to six variable parts.

Any feedback would be appreciated. Happy to have it folded into the baseline, move it to a different project or discard it in favor of something better.

Thanks for the work you have put into uzhttp and the Zio community.

seanphawkins avatar May 17 '20 18:05 seanphawkins

I really like this, so thanks so much for the PR.

Let me tell you why I'm not going to merge it right now 😄

There's some new momentum on zio-web (nee zio-http) which I think could subsume this use case. I'd rather it be harder for people to use this library, than have people adopt it and then I abandon it because zio-web covers the use cases. IOW, let's wait until zio-web gains some clarity, and if there's still a niche for a minimal HTTP server, then I'll be all over merging this (it's exactly the kind of thing I'd want to see in a minimal routing API for this library!) In the meantime, I think you'll be OK because you probably embedded this in your project already 😛

jeremyrsmith avatar May 19 '20 00:05 jeremyrsmith

No worries at all. I was following the zio-http repo for a while. Of course there would be sudden movement in that space as soon as I did this. ;)

Interestingly enough, my use case is a single path. When pitching zio/uzhttp vs. Akka HTTP, a team member complained that Akka's DSL was more elegant and understandable. So I wrote one. A Saturday well spent I'd say regardless.

Thanks for the quick response and your contributions to OSS.

Sean

On Mon, May 18, 2020, 8:56 PM jeremyrsmith [email protected] wrote:

I really like this, so thanks so much for the PR.

Let me tell you why I'm not going to merge it right now 😄

There's some new momentum on zio-web (nee zio-http) which I think could subsume this use case. I'd rather it be harder for people to use this library, than have people adopt it and then I abandon it because zio-web covers the use cases. IOW, let's wait until zio-web gains some clarity, and if there's still a niche for a minimal HTTP server, then I'll be all over merging this (it's exactly the kind of thing I'd want to see in a minimal routing API for this library!) In the meantime, I think you'll be OK because you probably embedded this in your project already 😛

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/polynote/uzhttp/pull/24#issuecomment-630512155, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEZ42REGSFI2DGXW7DQ5ALRSHKMRANCNFSM4NDQFSBA .

seanphawkins avatar May 19 '20 05:05 seanphawkins

Just wanted to chime in, I've been using this for Kubernetes health checks and some very trivial HTTP endpoints by just embedding it my project. Works great, and since zio-web is taking a while, as well as having a much larger scope, I'd be in favour of getting this merged.

frekw avatar Feb 17 '21 15:02 frekw