pedestal 2024-12-13

Hello I implemented a jdk-httpserver backend to pedestal, so far for fun. And I'd like to ask: Are there any large open source projects that use pedestal? preferably jetty's pedestal I'd like to test my implementation in a realworld app to help find if something is missing in my implementation. https://github.com/souenzzo/pedestal.jdk-httpserver

🔥 2

@hlship sync API@chuncked seems to be complete During this week I will add tests for • async • known content lenght

Beat me to it!

async done 🙂 I'm able to run all these tests, replacing io.pedestal.http.jetty-test with .zz.pedestal.jdk-httpserver https://github.com/pedestal/pedestal/blob/master/tests/test/io/pedestal/http/jetty_test.clj

Great progress!

It would be great to have a structure to the Jetty-specific tests that could be adapted for whatever container is being used, at least, for the more generic stuff (basic port mapping, basic websocket).

👍 1

I think that I'm able to write this A repository where you could run the test suite with a parametric server: PEDESTAL_TYPE=:jetty clj -M:test-runner or PEDESTAL_TYPE=.zz.pedestal.jdk-httpserver/server clj -M:test-runner (or any other valid ::http/type value) How would you call this repo? Something like pedestal-container-tests ?!

@hlship also I'd like from you: it was implemented using the right APIs? I was in doubt at some moments

More concrete question jdk's http-exchange needs to be closed. I could not find the right place to close. Seems that jetty response was never closed. I added the close to flush, but it does not work in some contexts (async) https://github.com/souenzzo/pedestal.jdk-httpserver/blob/main/src/br/dev/zz/pedestal/jdk_httpserver.clj#L91

Note for the future me: Checkout jetty's SPI intefaces that bridges jetty's and jdk.httpserver https://javadoc.jetty.org/jetty-12/org/eclipse/jetty/http/spi/package-summary.html

Hello @hlship I made a first implementation of https://github.com/souenzzo/pedestal.jdk-httpserver/tree/main/pedestal-container-tests. As a POC, it is a subproject of pedestal.jdk-httpserver, but if you like it, I will move it to its own repository (maybe inside pedestal's org?) It can be integrated in io.pedestal.test-runner or run as it own process/alias, as https://github.com/souenzzo/pedestal/pull/1 I will wait for your feedback before adding more tests or move repository