You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2023/05/04 12:37:18 UTC

Java 21 and virtual threads

Hi all,

The latest Java 21 EA build has moved virtual threads (from project 
Loom) out of preview. How do we want to handle this in Tomcat 11? Recall 
that Jakarta EE 11 has set Java 21 as the minimum version.

I think we have the following options:

1. Stick with Java 17 as the minimum version and don't provide virtual 
thread functionality.

2. Stick with Java 17 as the minimum version and provide virtual thread 
functionality via the JreCompat module.

3. Increase minimum Java version to Java 21 for Tomcat 11 and provide 
virtual thread functionality.

I am currently leaning towards 3 but could live with 2.

Thoughts? Other options?

Mark

PS Option 3 will require updates to the CI systems - I am happy to take 
care of those.

PPS I don't think all of the current Loom module will make it into 
Tomcat 11. I am currently thinking to pull in the Executor and then 
provide a boolean option for the existing endpoints to switch the 
internal executor to Loom.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Java 21 and virtual threads

Posted by Rémy Maucherat <re...@apache.org>.
On Thu, May 4, 2023 at 2:37 PM Mark Thomas <ma...@apache.org> wrote:
>
> Hi all,
>
> The latest Java 21 EA build has moved virtual threads (from project
> Loom) out of preview. How do we want to handle this in Tomcat 11? Recall
> that Jakarta EE 11 has set Java 21 as the minimum version.
>
> I think we have the following options:
>
> 1. Stick with Java 17 as the minimum version and don't provide virtual
> thread functionality.
>
> 2. Stick with Java 17 as the minimum version and provide virtual thread
> functionality via the JreCompat module.
>
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide
> virtual thread functionality.
>
> I am currently leaning towards 3 but could live with 2.
>
> Thoughts? Other options?

I'm ok with 3) personally. I'm not sure about Panama moving out of
preview at the moment though.

Rémy

> Mark
>
> PS Option 3 will require updates to the CI systems - I am happy to take
> care of those.
>
> PPS I don't think all of the current Loom module will make it into
> Tomcat 11. I am currently thinking to pull in the Executor and then
> provide a boolean option for the existing endpoints to switch the
> internal executor to Loom.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Java 21 and virtual threads

Posted by Coty Sutherland <cs...@apache.org>.
On Thu, May 4, 2023 at 8:37 AM Mark Thomas <ma...@apache.org> wrote:

> Hi all,
>
> The latest Java 21 EA build has moved virtual threads (from project
> Loom) out of preview. How do we want to handle this in Tomcat 11? Recall
> that Jakarta EE 11 has set Java 21 as the minimum version.
>
> I think we have the following options:
>
> 1. Stick with Java 17 as the minimum version and don't provide virtual
> thread functionality.
>
> 2. Stick with Java 17 as the minimum version and provide virtual thread
> functionality via the JreCompat module.
>
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide
> virtual thread functionality.
>
> I am currently leaning towards 3 but could live with 2.
>
> Thoughts? Other options?
>

+1 for option 3.

Re: Java 21 and virtual threads

Posted by koteswara Rao Gundapaneni <ko...@gmail.com>.
Hi


Best choice is  3rd option


Regards
Koti

On Sat, 6 May 2023, 15:32 Felix Schumacher, <
felix.schumacher@internetallee.de> wrote:

>
> Am 04.05.23 um 14:37 schrieb Mark Thomas:
>
> Hi all,
>
> The latest Java 21 EA build has moved virtual threads (from project Loom)
> out of preview. How do we want to handle this in Tomcat 11? Recall that
> Jakarta EE 11 has set Java 21 as the minimum version.
>
> I think we have the following options:
>
> 1. Stick with Java 17 as the minimum version and don't provide virtual
> thread functionality.
>
> 2. Stick with Java 17 as the minimum version and provide virtual thread
> functionality via the JreCompat module.
>
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide
> virtual thread functionality.
>
> I am currently leaning towards 3 but could live with 2.
>
>
> +1 for option 3, as I think the possibility to try virtual threads
> outweighs the chances, that users willing to use Java 17 are note willing
> to use Java 21.
>
> Felix
>
>
> Thoughts? Other options?
>
> Mark
>
> PS Option 3 will require updates to the CI systems - I am happy to take
> care of those.
>
> PPS I don't think all of the current Loom module will make it into Tomcat
> 11. I am currently thinking to pull in the Executor and then provide a
> boolean option for the existing endpoints to switch the internal executor
> to Loom.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Java 21 and virtual threads

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 04.05.23 um 14:37 schrieb Mark Thomas:
> Hi all,
>
> The latest Java 21 EA build has moved virtual threads (from project 
> Loom) out of preview. How do we want to handle this in Tomcat 11? 
> Recall that Jakarta EE 11 has set Java 21 as the minimum version.
>
> I think we have the following options:
>
> 1. Stick with Java 17 as the minimum version and don't provide virtual 
> thread functionality.
>
> 2. Stick with Java 17 as the minimum version and provide virtual 
> thread functionality via the JreCompat module.
>
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide 
> virtual thread functionality.
>
> I am currently leaning towards 3 but could live with 2.


+1 for option 3, as I think the possibility to try virtual threads 
outweighs the chances, that users willing to use Java 17 are note 
willing to use Java 21.

Felix

>
> Thoughts? Other options?
>
> Mark
>
> PS Option 3 will require updates to the CI systems - I am happy to 
> take care of those.
>
> PPS I don't think all of the current Loom module will make it into 
> Tomcat 11. I am currently thinking to pull in the Executor and then 
> provide a boolean option for the existing endpoints to switch the 
> internal executor to Loom.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

Re: Java 21 and virtual threads

Posted by Mark Thomas <ma...@apache.org>.
On 04/05/2023 13:37, Mark Thomas wrote:
> Hi all,
> 
> The latest Java 21 EA build has moved virtual threads (from project 
> Loom) out of preview. How do we want to handle this in Tomcat 11? Recall 
> that Jakarta EE 11 has set Java 21 as the minimum version.
> 
> I think we have the following options:
> 
> 1. Stick with Java 17 as the minimum version and don't provide virtual 
> thread functionality.
> 
> 2. Stick with Java 17 as the minimum version and provide virtual thread 
> functionality via the JreCompat module.
> 
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide 
> virtual thread functionality.

I was thinking about this over the weekend. It would be nice to provide 
virtual thread support to Tomcat 10.1 and earlier as well. That would 
require the JreCompat module.

I don't think this changes the Tomcat 11 plans.

Mark


> 
> I am currently leaning towards 3 but could live with 2.
> 
> Thoughts? Other options?
> 
> Mark
> 
> PS Option 3 will require updates to the CI systems - I am happy to take 
> care of those.
> 
> PPS I don't think all of the current Loom module will make it into 
> Tomcat 11. I am currently thinking to pull in the Executor and then 
> provide a boolean option for the existing endpoints to switch the 
> internal executor to Loom.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Java 21 and virtual threads

Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1 for java 21, since tomcat 11 is still in the "dont use" area I think it
can start with 21 and thanks to the backport policy if java 17 is needed
later, work will not be crazy IMHO.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 5 mai 2023 à 03:53, Han Li <li...@apache.org> a écrit :

>
>
> > On May 4, 2023, at 20:37, Mark Thomas <ma...@apache.org> wrote:
> >
> > Hi all,
> >
> > The latest Java 21 EA build has moved virtual threads (from project
> Loom) out of preview. How do we want to handle this in Tomcat 11? Recall
> that Jakarta EE 11 has set Java 21 as the minimum version.
> >
> > I think we have the following options:
> >
> > 1. Stick with Java 17 as the minimum version and don't provide virtual
> thread functionality.
> >
> > 2. Stick with Java 17 as the minimum version and provide virtual thread
> functionality via the JreCompat module.
> >
> > 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide
> virtual thread functionality.
> +1
>
> The impact of switching 17 to 21 will not be very wide I think as Tomcat
> 11 is Alpha version now, so let’s be straightforward. :)
>
> Han
>
> >
> > I am currently leaning towards 3 but could live with 2.
> >
> > Thoughts? Other options?
> >
> > Mark
> >
> > PS Option 3 will require updates to the CI systems - I am happy to take
> care of those.
> >
> > PPS I don't think all of the current Loom module will make it into
> Tomcat 11. I am currently thinking to pull in the Executor and then provide
> a boolean option for the existing endpoints to switch the internal executor
> to Loom.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: dev-help@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: Java 21 and virtual threads

Posted by Han Li <li...@apache.org>.

> On May 4, 2023, at 20:37, Mark Thomas <ma...@apache.org> wrote:
> 
> Hi all,
> 
> The latest Java 21 EA build has moved virtual threads (from project Loom) out of preview. How do we want to handle this in Tomcat 11? Recall that Jakarta EE 11 has set Java 21 as the minimum version.
> 
> I think we have the following options:
> 
> 1. Stick with Java 17 as the minimum version and don't provide virtual thread functionality.
> 
> 2. Stick with Java 17 as the minimum version and provide virtual thread functionality via the JreCompat module.
> 
> 3. Increase minimum Java version to Java 21 for Tomcat 11 and provide virtual thread functionality.
+1

The impact of switching 17 to 21 will not be very wide I think as Tomcat 11 is Alpha version now, so let’s be straightforward. :)

Han

> 
> I am currently leaning towards 3 but could live with 2.
> 
> Thoughts? Other options?
> 
> Mark
> 
> PS Option 3 will require updates to the CI systems - I am happy to take care of those.
> 
> PPS I don't think all of the current Loom module will make it into Tomcat 11. I am currently thinking to pull in the Executor and then provide a boolean option for the existing endpoints to switch the internal executor to Loom.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org