You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by pzh <pi...@163.com> on 2019/08/29 13:18:50 UTC

[Discussion] Should thrift-java support HTTP/2 ?

Dear All:


Our team encountered some http protocol problems when using thrift-0.12.0:


1. Just like Spark Thrift's http delay case, Since HttpClient 4.3, many classes and methods have been deprecated or terminated, HttpClient uses HTTP/2, which is much worse than HTTP/2,
Apache HttpComponents httpclient 5.0 has still not released support for HTTP/2 officially.


2. In Android Thrift aspect, the underlying implementation of HttpURLConnection from Android4.4 uses OkHttp, which is based on HTTP/2 development, 
official team is no longer maintaining HttpClient.


OTOH, compared to HTTP/1, HTTP/2 has more features and excellent performance, such as: Multiplexing, binary framing, header compression, server push etc...


HTTP/1, is a little out of date, so i propose to replace HttpClient with a third-party jar that supports HTTP/2, such as OkHttp, or upgrade the java version that supports HTTP/2.


hope for your reply, guys.


Best Regards
Zhouhu

Re:Re:Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by pzh <pi...@163.com>.
Dear All:


     Improve thrift support HTTP/1 test case PR: https://github.com/apache/thrift/pull/1866


     How about that look like? Could anyone review it ?


Thanks.
Zhohu.



At 2019-09-05 21:39:30, "pzh" <pi...@163.com> wrote:

 Hi Jens,Randy,Christopher:


     According to the plan we discussed, I am currently improving the HTTP/1 test case.
   
     First of all, I found that the servlet 2.5 dependency package is relatively old, and users need to create the http environment themselves, so I added the embedded package of tomcat, 
     Second, i improved the test case of the http application layer, so the client and server can communicate with each other and print the string.


     It can work now, and i have submitted the PR, hope it is what we want. I have tested it on Windows (Windows 10) and Linux (ubuntu 14.04), and the test cases can be sent and received normally.
   
    also i want to discuss the next plan with you:
    1. The http application test case server-side code is missing. Do you need to continue to add more use cases?
    2. I found that the latest master branch has been upgraded to openJDK 11, but not all of project`s modules be covered, some areas have not been modified, do you need to improve?
     
    After completing the above 2 tasks, i think we can start HTTP/2 support in one week later.


  Best Regards.
  Zhouhu.

在 2019-09-01 21:41:45,"Jens Geyer" <je...@hotmail.com> 写道:
>
>Ok, but what and when will there be new stable version suitable to switch 
>to?
>
>
>-----Ursprüngliche Nachricht----- 
>From: Christopher
>Sent: Sunday, September 1, 2019 7:27 AM
>To: dev@thrift.apache.org
>Subject: Re: Re: [Discussion] Should thrift-java support HTTP/2 ?
>
>I'd strongly advise against updating the JDK requirement to 12.
>Requiring JDK 11 is better, because it's considered a long-term stable
>(LTS) release, and it's the latest such release. JDK 12 is not; it is
>a "rapid release" to preview features which will be in the next LTS,
>and support for 12 ends this month.
>https://en.wikipedia.org/wiki/Java_version_history
>
>On Fri, Aug 30, 2019 at 10:47 PM pzh <pi...@163.com> wrote:
>>
>> Hi,Jens and Randy:
>>       i`m working on that now, how about this plan:
>>
>>       1. run all the test case for httpclient HTTP/1 in lib and find the 
>> problems exist.
>>       2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better, 
>> need confirmed in next step.
>>       3. port all the httpclinet HTTP/2 code in lib and add test case for 
>> that.
>>
>>
>>       Any other supplementary advice?
>>
>>
>>       Maybe we need 2 or 3 weeks for the first demo, will need more 
>> details discussion and help from you in future.
>>
>>       Thanks.
>>       Zhouhu.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
>> >
>> >+1 in general, except for the library dependencies.
>> >If upgrading Java is a realistic option (I don't use it myself), I am 
>> >more
>> >in favour of that solution.
>> >
>> >JensG
>> >
>> >
>> >-----Ursprüngliche Nachricht-----
>> >From: Randy Abernethy
>> >Sent: Thursday, August 29, 2019 3:22 PM
>> >To: dev@thrift.apache.org
>> >Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
>> >
>> >+1 for http/2 support
>> >
>> >
>> >On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
>> >
>> >> HTTP/1, is a little out of date, so i propose to replace HttpClient 
>> >> with a
>> >> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the 
>> >> java
>> >> version that supports HTTP/2.
>> >
>> > 
>





 

Re:Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by pzh <pi...@163.com>.
 Hi Jens,Randy,Christopher:


     According to the plan we discussed, I am currently improving the HTTP/1 test case.
   
     First of all, I found that the servlet 2.5 dependency package is relatively old, and users need to create the http environment themselves, so I added the embedded package of tomcat, 
     Second, i improved the test case of the http application layer, so the client and server can communicate with each other and print the string.


     It can work now, and i have submitted the PR, hope it is what we want. I have tested it on Windows (Windows 10) and Linux (ubuntu 14.04), and the test cases can be sent and received normally.
   
    also i want to discuss the next plan with you:
    1. The http application test case server-side code is missing. Do you need to continue to add more use cases?
    2. I found that the latest master branch has been upgraded to openJDK 11, but not all of project`s modules be covered, some areas have not been modified, do you need to improve?
     
    After completing the above 2 tasks, i think we can start HTTP/2 support in one week later.


  Best Regards.
  Zhouhu.

在 2019-09-01 21:41:45,"Jens Geyer" <je...@hotmail.com> 写道:
>
>Ok, but what and when will there be new stable version suitable to switch 
>to?
>
>
>-----Ursprüngliche Nachricht----- 
>From: Christopher
>Sent: Sunday, September 1, 2019 7:27 AM
>To: dev@thrift.apache.org
>Subject: Re: Re: [Discussion] Should thrift-java support HTTP/2 ?
>
>I'd strongly advise against updating the JDK requirement to 12.
>Requiring JDK 11 is better, because it's considered a long-term stable
>(LTS) release, and it's the latest such release. JDK 12 is not; it is
>a "rapid release" to preview features which will be in the next LTS,
>and support for 12 ends this month.
>https://en.wikipedia.org/wiki/Java_version_history
>
>On Fri, Aug 30, 2019 at 10:47 PM pzh <pi...@163.com> wrote:
>>
>> Hi,Jens and Randy:
>>       i`m working on that now, how about this plan:
>>
>>       1. run all the test case for httpclient HTTP/1 in lib and find the 
>> problems exist.
>>       2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better, 
>> need confirmed in next step.
>>       3. port all the httpclinet HTTP/2 code in lib and add test case for 
>> that.
>>
>>
>>       Any other supplementary advice?
>>
>>
>>       Maybe we need 2 or 3 weeks for the first demo, will need more 
>> details discussion and help from you in future.
>>
>>       Thanks.
>>       Zhouhu.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
>> >
>> >+1 in general, except for the library dependencies.
>> >If upgrading Java is a realistic option (I don't use it myself), I am 
>> >more
>> >in favour of that solution.
>> >
>> >JensG
>> >
>> >
>> >-----Ursprüngliche Nachricht-----
>> >From: Randy Abernethy
>> >Sent: Thursday, August 29, 2019 3:22 PM
>> >To: dev@thrift.apache.org
>> >Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
>> >
>> >+1 for http/2 support
>> >
>> >
>> >On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
>> >
>> >> HTTP/1, is a little out of date, so i propose to replace HttpClient 
>> >> with a
>> >> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the 
>> >> java
>> >> version that supports HTTP/2.
>> >
>> > 
>

Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by Christopher <ct...@apache.org>.
Supposedly, the next one should be around 2021 (every 3 years was the
announced intent. 11 was released in 2018), but the next JDK LTS
hasn't been announced. What's wrong with JDK 11 for now? It's the
latest LTS release. I would have thought JDK 11's support for HTTP/2
would be adequate, but I haven't used HTTP/2 yet. Is JDK 11 inadequate
for HTTP/2?

On Sun, Sep 1, 2019 at 9:42 AM Jens Geyer <je...@hotmail.com> wrote:
>
>
> Ok, but what and when will there be new stable version suitable to switch
> to?
>
>
> -----Ursprüngliche Nachricht-----
> From: Christopher
> Sent: Sunday, September 1, 2019 7:27 AM
> To: dev@thrift.apache.org
> Subject: Re: Re: [Discussion] Should thrift-java support HTTP/2 ?
>
> I'd strongly advise against updating the JDK requirement to 12.
> Requiring JDK 11 is better, because it's considered a long-term stable
> (LTS) release, and it's the latest such release. JDK 12 is not; it is
> a "rapid release" to preview features which will be in the next LTS,
> and support for 12 ends this month.
> https://en.wikipedia.org/wiki/Java_version_history
>
> On Fri, Aug 30, 2019 at 10:47 PM pzh <pi...@163.com> wrote:
> >
> > Hi,Jens and Randy:
> >       i`m working on that now, how about this plan:
> >
> >       1. run all the test case for httpclient HTTP/1 in lib and find the
> > problems exist.
> >       2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better,
> > need confirmed in next step.
> >       3. port all the httpclinet HTTP/2 code in lib and add test case for
> > that.
> >
> >
> >       Any other supplementary advice?
> >
> >
> >       Maybe we need 2 or 3 weeks for the first demo, will need more
> > details discussion and help from you in future.
> >
> >       Thanks.
> >       Zhouhu.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
> > >
> > >+1 in general, except for the library dependencies.
> > >If upgrading Java is a realistic option (I don't use it myself), I am
> > >more
> > >in favour of that solution.
> > >
> > >JensG
> > >
> > >
> > >-----Ursprüngliche Nachricht-----
> > >From: Randy Abernethy
> > >Sent: Thursday, August 29, 2019 3:22 PM
> > >To: dev@thrift.apache.org
> > >Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
> > >
> > >+1 for http/2 support
> > >
> > >
> > >On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
> > >
> > >> HTTP/1, is a little out of date, so i propose to replace HttpClient
> > >> with a
> > >> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the
> > >> java
> > >> version that supports HTTP/2.
> > >
> > >
>

Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by Jens Geyer <je...@hotmail.com>.
Ok, but what and when will there be new stable version suitable to switch 
to?


-----Ursprüngliche Nachricht----- 
From: Christopher
Sent: Sunday, September 1, 2019 7:27 AM
To: dev@thrift.apache.org
Subject: Re: Re: [Discussion] Should thrift-java support HTTP/2 ?

I'd strongly advise against updating the JDK requirement to 12.
Requiring JDK 11 is better, because it's considered a long-term stable
(LTS) release, and it's the latest such release. JDK 12 is not; it is
a "rapid release" to preview features which will be in the next LTS,
and support for 12 ends this month.
https://en.wikipedia.org/wiki/Java_version_history

On Fri, Aug 30, 2019 at 10:47 PM pzh <pi...@163.com> wrote:
>
> Hi,Jens and Randy:
>       i`m working on that now, how about this plan:
>
>       1. run all the test case for httpclient HTTP/1 in lib and find the 
> problems exist.
>       2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better, 
> need confirmed in next step.
>       3. port all the httpclinet HTTP/2 code in lib and add test case for 
> that.
>
>
>       Any other supplementary advice?
>
>
>       Maybe we need 2 or 3 weeks for the first demo, will need more 
> details discussion and help from you in future.
>
>       Thanks.
>       Zhouhu.
>
>
>
>
>
>
>
>
>
> 在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
> >
> >+1 in general, except for the library dependencies.
> >If upgrading Java is a realistic option (I don't use it myself), I am 
> >more
> >in favour of that solution.
> >
> >JensG
> >
> >
> >-----Ursprüngliche Nachricht-----
> >From: Randy Abernethy
> >Sent: Thursday, August 29, 2019 3:22 PM
> >To: dev@thrift.apache.org
> >Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
> >
> >+1 for http/2 support
> >
> >
> >On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
> >
> >> HTTP/1, is a little out of date, so i propose to replace HttpClient 
> >> with a
> >> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the 
> >> java
> >> version that supports HTTP/2.
> >
> > 


Re: Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by Christopher <ct...@apache.org>.
I'd strongly advise against updating the JDK requirement to 12.
Requiring JDK 11 is better, because it's considered a long-term stable
(LTS) release, and it's the latest such release. JDK 12 is not; it is
a "rapid release" to preview features which will be in the next LTS,
and support for 12 ends this month.
https://en.wikipedia.org/wiki/Java_version_history

On Fri, Aug 30, 2019 at 10:47 PM pzh <pi...@163.com> wrote:
>
> Hi,Jens and Randy:
>       i`m working on that now, how about this plan:
>
>       1. run all the test case for httpclient HTTP/1 in lib and find the problems exist.
>       2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better, need confirmed in next step.
>       3. port all the httpclinet HTTP/2 code in lib and add test case for that.
>
>
>       Any other supplementary advice?
>
>
>       Maybe we need 2 or 3 weeks for the first demo, will need more details discussion and help from you in future.
>
>       Thanks.
>       Zhouhu.
>
>
>
>
>
>
>
>
>
> 在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
> >
> >+1 in general, except for the library dependencies.
> >If upgrading Java is a realistic option (I don't use it myself), I am more
> >in favour of that solution.
> >
> >JensG
> >
> >
> >-----Ursprüngliche Nachricht-----
> >From: Randy Abernethy
> >Sent: Thursday, August 29, 2019 3:22 PM
> >To: dev@thrift.apache.org
> >Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
> >
> >+1 for http/2 support
> >
> >
> >On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
> >
> >> HTTP/1, is a little out of date, so i propose to replace HttpClient with a
> >> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the java
> >> version that supports HTTP/2.
> >
> >

Re:Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by pzh <pi...@163.com>.
Hi,Jens and Randy:
      i`m working on that now, how about this plan:
      
      1. run all the test case for httpclient HTTP/1 in lib and find the problems exist.
      2. update JDK 0.8 to JDK 0.11 at least, maybe JDK0.12 be better, need confirmed in next step.
      3. port all the httpclinet HTTP/2 code in lib and add test case for that.


      Any other supplementary advice? 


      Maybe we need 2 or 3 weeks for the first demo, will need more details discussion and help from you in future.
      
      Thanks.
      Zhouhu. 
   
      







在 2019-08-30 02:04:11,"Jens Geyer" <je...@hotmail.com> 写道:
>
>+1 in general, except for the library dependencies.
>If upgrading Java is a realistic option (I don't use it myself), I am more 
>in favour of that solution.
>
>JensG
>
>
>-----Ursprüngliche Nachricht----- 
>From: Randy Abernethy
>Sent: Thursday, August 29, 2019 3:22 PM
>To: dev@thrift.apache.org
>Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?
>
>+1 for http/2 support
>
>
>On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:
>
>> HTTP/1, is a little out of date, so i propose to replace HttpClient with a
>> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the java
>> version that supports HTTP/2.
>
>

Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by Jens Geyer <je...@hotmail.com>.
+1 in general, except for the library dependencies.
If upgrading Java is a realistic option (I don't use it myself), I am more 
in favour of that solution.

JensG


-----Ursprüngliche Nachricht----- 
From: Randy Abernethy
Sent: Thursday, August 29, 2019 3:22 PM
To: dev@thrift.apache.org
Subject: Re: [Discussion] Should thrift-java support HTTP/2 ?

+1 for http/2 support


On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:

> HTTP/1, is a little out of date, so i propose to replace HttpClient with a
> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the java
> version that supports HTTP/2.



Re: [Discussion] Should thrift-java support HTTP/2 ?

Posted by Randy Abernethy <ra...@rx-m.com>.
+1 for http/2 support

On Thu, Aug 29, 2019, 08:19 pzh <pi...@163.com> wrote:

> Dear All:
>
>
> Our team encountered some http protocol problems when using thrift-0.12.0:
>
>
> 1. Just like Spark Thrift's http delay case, Since HttpClient 4.3, many
> classes and methods have been deprecated or terminated, HttpClient uses
> HTTP/2, which is much worse than HTTP/2,
> Apache HttpComponents httpclient 5.0 has still not released support for
> HTTP/2 officially.
>
>
> 2. In Android Thrift aspect, the underlying implementation of
> HttpURLConnection from Android4.4 uses OkHttp, which is based on HTTP/2
> development,
> official team is no longer maintaining HttpClient.
>
>
> OTOH, compared to HTTP/1, HTTP/2 has more features and excellent
> performance, such as: Multiplexing, binary framing, header compression,
> server push etc...
>
>
> HTTP/1, is a little out of date, so i propose to replace HttpClient with a
> third-party jar that supports HTTP/2, such as OkHttp, or upgrade the java
> version that supports HTTP/2.
>
>
> hope for your reply, guys.
>
>
> Best Regards
> Zhouhu