any interest in a pedestal implementation using jdk-httpserver? There are still things to be done.. If there is interest, I can finish doing this implementation https://github.com/pedestal/pedestal/compare/master...souenzzo:pedestal:jdk-httpserver
@hlship
it's not clear to me from where create-connector is invoked
I can't find any mention of create-connector in io.pedestal.http namespace
https://github.com/pedestal/pedestal/blob/master/http-kit/src/io/pedestal/http/http_kit.clj#L72
Background: Pedestal has always had this goal of being overly concise (I understand that impulse, just look at Tapestry 5); one aspect of this is being able to say :jetty in the service map, rather than explicitly pipe the service map into the io.pedestal.http.jetty/server function. This looks cool in tiny demos, but has its own issues, such as getting in the way of AOT compilation (since there isn’t a connection between the application code and all the pedestal.jetty code until runtime); this has been patched somewhat, but it is ugly. The new io.pedestal.connector namespace is, effectively, a replacement for io.pedestal.http; Pedestal connectors are based only on the Ring specification, with no Servlet API in sight. Once you use the functions in io.pedestal.connector to configure your connector, you explicitly pass it to a connector function, such as io.pedestal.http.http-kit/create-connector … thus the bridge from application code to Pedestal code is unbroken.
You can see this in the new tests.
the AoT issue could be solved by using ::http/type http-kit/server (using a function instead of a keyword in type)
But OK, I will move to the new connector API
I think this might be better implemented now as a Pedestal Connector (which doesn't rely on the servlet API). Can you implement WebSockets on top of this API?
But I like the idea of a non-dependencies implementation to go along with http-kit (one 90k dependency).
Not sure about websockets Maybe it could be possible through this impl https://docs.oracle.com/en/java/javase/24/docs/api/java.net.http/java/net/http/WebSocket.html There is no mentions to "server" or "client" on this page, but websockets are kind of "no distinction between client and server" so IDK Pedestal connector is pretty new 🙂 I'm not sure how to use it (yet)
Can I open a PR, and we exchange comments?
Absolutely.
I'm finishing up some fixes to the embedded template and will probably do a snapshot or alpha release today or tomorrow.
huh. TIL. about the jdk-httpserver module.
Imagine if they loved us enough to give us a standard JSON parser?
“Last mover advantage” isn’t quite working out with JSON, unfortunately…