> Cayenne I think this will be counterproductive. We'll be rein

Sorry hit send too soon :) This wasn't supposed to be there. Essentially our 
Cayenne/protocol separation happens at this interface:

https://github.com/apache/cayenne/blob/master/cayenne-client/src/main/java/org/apache/cayenne/remote/ClientConnection.java

I guess what you are proposing is splitting ClientConnection into a 2-part 
stack:

Serialization Handler (Objects in / Objects out) -> Binary Protocol Adapter 
(Stream in / Stream out) ?

Andrus




> On Dec 17, 2015, at 10:31 AM, Andrus Adamchik <and...@objectstyle.org> wrote:
> 
> Cayenne I think this will be counterproductive. We'll be rein
> 
> 
>> On Dec 17, 2015, at 10:24 AM, Aristedes Maniatis <a...@maniatis.org> wrote:
>> 
>> On 17/12/2015 6:05pm, Andrus Adamchik wrote:
>>> So how about implementing HttpClientConnection with JAX-RS? It will take 
>>> care of HTTP(S) as the wire protocol and will provide very clean 
>>> pluggability layer (MessageBodyReader/MessageBodyWriter). I very much like 
>>> JAX-RS API, which works on both client and server. And certainly wouldn't 
>>> want to reimplement all this from scratch. I think this should be 
>>> compatible with protobuf (and maybe with Hessian), as well as JSON or 
>>> anything else. 
>>> 
>>> One thing I am not sure about is whether we can wrap HTTP/2 support around 
>>> this?
>> 
>> I'm unclear as to why Cayenne should have any knowledge of the connection at 
>> all. Why should Cayenne care whether the connection between the client and 
>> server is HTTP, HTTP2, files on disk, unix sockets or email mime attachments?
> 
> Cayenne doesn't, but Cayenne needs to have access to an object that does. 
> ClientConnection is this object now. 
> 
>> I'd like a blob or stream of serialised data passed up to my application. 
>> Then the app can decide how to transport, compress, encrypt and authenticate 
>> it.
>> 
>> Can we create an interface which encapsulates just the data stream?
> 
> We can. It is not incompatible with JAX-RS idea. JAX-RS layer though will 
> need to know about HTTP details.
> 
> Andrus

Reply via email to