cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: ROP, Hessian and protocol-buffers
Date Fri, 20 May 2016 04:41:22 GMT
Very nice, thanks for the overview. Let me post that on Cayenne twitter :)

> On May 20, 2016, at 6:48 AM, Aristedes Maniatis <ari@ish.com.au> wrote:
> 
> I've realised that Savva and I have been having too much conversation around this in
private and it should be brought back to the list. Here is a summary of the great work happening
behind the scenes to modernise Cayenne's ROP implementation.
> 
> First, let's remember the problems we were having:
> 
> 1. Hessian (the serialisation tool) hasn't had much love for many years. It has bugs.
In particular it fails to serialise BigDecimal and Java8 date objects.
> 
> 2. The ROP implementation is completely tied into Hessian, and not just for serialisation.
It also uses Hessian for the servlet implementation and endpoint declarations.
> 
> 3. This meant it was hard to add HTTP/2, compression and other things.
> 
> 
> So Dima spent time this past January on pulling apart the Cayenne implementation and
putting it back together again in a pluggable way. Now we can implement different serialisers
and different HTTP libraries. That work landed in 4.0M3.
> 
> Next Savva has been working on protocol-buffers, which is a Google led serialisation
library under the Apache license. It is more modern than Hessian and actively developed. It
is less likely to have security issues with lots of people looking at it. It scales really
well and is fast.
> 
> But protocol-buffers isn't enough, since that library doesn't know how to take an arbitrary
graph of objects and serialise them with their relationships. Another library protostuff sits
on top and does that for us. It is also well used and actively developed.
> 
> So now we have an almost working Cayenne extension library. Instead of Hessian, you can
drop this library into your project and have it use protostuff which uses protocol-buffers.
But bug remains in protostuff and one of the authors there has been incredibly helpful in
sorting it out. Hopefully a bit of tweaking and testing, and that will be resolved.
> 
> The problem and conversation can be seen in these threads. The protostuff people are
very helpful.
> 
> https://github.com/protostuff/protostuff/issues/176
> https://github.com/protostuff/protostuff/pull/177
> https://github.com/protostuff/protostuff/pull/180
> 
> Now it needs more testing.
> 
> 
> 
> In addition, HTTP/2 is complicated with something called ALPN which is all about negotiating
the right kind of link. Savva has some example code here: https://github.com/thinline72/rpc-example
 which demonstrates gluing together Spring remote, Jetty HTTP/2 and protostuff.
> 
> 
> In the end, we'll have:
> 
> * better security (not Hessian)
> * faster serialisation (protocol-buffers)
> * less network traffic (HTTP/2)
> * easier implementation of compression and other filters (pluggable modules)
> * simpler to set up
> 
> 
> It will be really nice and I look forward to Savva landing this into Cayenne.
> 
> Ari
> 
> 
> 
> 
> -- 
> -------------------------->
> Aristedes Maniatis
> CEO, ish
> https://www.ish.com.au
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
> 


Mime
View raw message