I've finished work on Jetty Client implementation for Cayenne ROP by https://github.com/apache/cayenne/commit/34646fd5baf3640208399b2f21afc7afff6def51
So now we have cayenne-client-jetty module which works as follows: There is a one JettyHttpROPConnector <https://github.com/apache/cayenne/blob/master/cayenne-client-jetty/src/main/java/org/apache/cayenne/rop/http/JettyHttpROPConnector.java> which takes and uses Jetty HttpClient (high-level API). It could be configured by JettyHttpClientConnectionProvider <https://github.com/apache/cayenne/blob/master/cayenne-client-jetty/src/main/java/org/apache/cayenne/rop/JettyHttpClientConnectionProvider.java> for HTTP/1.1 and by JettyHttp2ClientConnectionProvider <https://github.com/apache/cayenne/blob/master/cayenne-client-jetty/src/main/java/org/apache/cayenne/rop/JettyHttp2ClientConnectionProvider.java> for HTTP/2. The last one initializes Jetty HttpClient over HTTP2Client through HttpClientTransportOverHTTP2 and works without ALPN by default. ALPN could be configured via Constants.ROP_SERVICE_USE_ALPN_PROPERTY. However, I'm not sure it's the best way to do it. Those ConnectionProviders are bound by ClientJettyHttpModule <https://github.com/apache/cayenne/blob/master/cayenne-client-jetty/src/main/java/org/apache/cayenne/configuration/rop/client/ClientJettyHttpModule.java> and ClientJettyHttp2Module <https://github.com/apache/cayenne/blob/master/cayenne-client-jetty/src/main/java/org/apache/cayenne/configuration/rop/client/ClientJettyHttp2Module.java> accordingly. So, users just need to add the appropriate Module to their ClientRuntime. I think all those things could be used by themselves or as examples to providing custom implementations. Also, I've added the simple ROP tutorial with both ClientJettyHttp2Module and ProtostuffModule: Http2Client <https://github.com/apache/cayenne/blob/master/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/Http2Client.java> Http2Server <https://github.com/apache/cayenne/blob/master/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2Server.java> BTW, as I know Ari already uses http2 and Protostuff. Please, let us know how it's going. If it's OK, I'll notify user-list about this features. 2016-06-21 3:54 GMT+03:00 Aristedes Maniatis <a...@maniatis.org>: > On 13/06/2016 6:40pm, Savva Kolbachev wrote: > > After some time I think that my current HTTP/2 ROP implementation for > > Cayenne [1] is cumbersome and complicated. I want to refactor it and make > > it as clear as possible, so it will be simple to use out of box. > > So, I suggest to rename module to something like "cayenne-jetty-client" > and > > implement only two ROPConnectors: JettyHttpConnector and > > JettyHttp2Connector for HTTP/1.1 and HTTP/2 accordingly. Both will use > > high-level Jetty Client API. > > When I look at https://github.com/apache/cayenne/pull/96/files I think > I'm seeing two separate things. > > 1. Adjustments and improvements to the Cayenne ROP implementation. For > example changes to the exception handling in cayenne/rop/ROPConnector.java > > 2. An implementation of HTTP2/jetty. > > > It would be interesting to split the two. First to commit the ROP > improvements, but then to see what is left over. If it is only a couple of > classes HighHttp2... LowHttp2... etc then another option is not to > implement this at all as a compiled jar which users add to their own > project. Rather, they could be some code examples that users copy and paste. > > > I'm not convinced this is the best approach, but I wanted to raise it as > an option. I guess the question is whether users would find the > org.apache.cayenne.configuration.Constants approach to configuration > easier, or would prefer just editing the relevant files to suit their own > config system. > > > > At any rate, now that the Jetty project have fixed the bug you found > there, it looks like HTTP2-Cayenne-ROP is ready for production! Nice work. > > > Ari > > > > > -- > --------------------------> > Aristedes Maniatis > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A > -- Best Regards, Savva Kolbachev