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 Virutal Threads (Discussion) #2779

Closed
Blquinn opened this issue Jan 30, 2023 · 7 comments
Closed

Support Virutal Threads (Discussion) #2779

Blquinn opened this issue Jan 30, 2023 · 7 comments

Comments

@Blquinn
Copy link
Contributor

Blquinn commented Jan 30, 2023

Based on a discussion started in #1712 it would be nice for jooby to support project loom's virtual threads.

There is already support for virtual threads in Jetty > v10 as well as the new Helidon Nima server.

I have taken a stab at creating a server for helidon nima here.

I have also created a separate jooby-jetty-loom module here.

Finally I have created a techempower benchmark for jooby-jetty-loom here. I've had to base it off of the prerelease jooby 3.x.

It would be nice to get some kind of review / feedback for any or all of these branches.. thanks!

@jknack @agentgt

@jknack
Copy link
Member

jknack commented Jan 30, 2023

Thank you! Benjamin. Will review shortly. I'm currently in holidays.

@Blquinn
Copy link
Contributor Author

Blquinn commented Jan 31, 2023

Sounds good, enjoy your holiday!

@jknack
Copy link
Member

jknack commented Feb 14, 2023

@Blquinn is the Nima server created from scratch? Or is it a Netty or something based on?

I usually don't like to add more servers implementation... we do have 3 already which is more than enough. Beside Nima doesn't seem to perform well in tech empower benchmark (compared to Netty/Undertow/Jetty)... The other major concern is that Nima owners keep the implementation over time, seems to soon to add it to Jooby.

@Blquinn
Copy link
Contributor Author

Blquinn commented Feb 14, 2023

@jknack Yea nima is a new server, it's in alpha. It is written from scratch. I don't think that's probably smart to add at the moment, perhaps it could be kept as a 3rd party module. I more did that for fun.

The Jetty server requires a much smaller change. It's basically just a 2 line change of code to support green threads.

I would like to figure out how to simply enable virtual threads in the existing Jetty module, but I'm not totally sure how to accomplish that.

@agentgt
Copy link
Contributor

agentgt commented Feb 15, 2023

Beside Nima doesn't seem to perform well in tech empower benchmark

It hasn’t been tested yet.

The date of the techempower last benchmark was before loom was released.

What was tested was Helidon which uses Jersey which used Grizzly (I think).

@jknack
Copy link
Member

jknack commented Feb 15, 2023

@agentgt There is a helidon-nima here: https://www.techempower.com/benchmarks/#section=test&runid=1e601092-a540-4651-8a6b-932aa5cdc152

but didn't look to see if was jersey/grizzly or not.

@agentgt
Copy link
Contributor

agentgt commented Feb 15, 2023

Oh I didn’t know about the continuous runs. That’s pretty neat.

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