cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Savva Kolbachev <s.kolbac...@gmail.com>
Subject Re: ROP, Hessian and protocol-buffers
Date Tue, 24 May 2016 10:21:21 GMT
Thank you Ari for sharing this,
I want to update the conversation.

Again, protostuff people are very helpful. They've already released the new
version of protostuff (1.4.3) which contains those bug fixes. So, I've
merged cayenne-protostuff module to the trunk. And now we are going to test
it deeper in some real-life cases. Hope, it will work fine. I'll let you
know about results. Then we are going to test HTTP/2 improvements:
https://github.com/apache/cayenne/pull/96

It seems that the next step should be moving ROP functionality to the
separate module, as it was noted before. It will give us a cleaner
structure.
I think we also need to clean up some code to make it more flexible
and independent from Hessian.
For example
https://github.com/apache/cayenne/blob/master/cayenne-client/src/main/java/org/apache/cayenne/remote/service/LocalConnection.java
It would be better to have something like this
https://github.com/apache/cayenne/blob/master/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnection.java

Also, I think we should remove the dependency on Hessian from ROPServlet
https://github.com/apache/cayenne/blob/master/cayenne-server/src/main/java/org/apache/cayenne/rop/ROPServlet.java#L102

Please, let me know what do you think.


2016-05-20 7:41 GMT+03:00 Andrus Adamchik <andrus@objectstyle.org>:

> 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
> >
>
>


-- 
Thanks and Regards
Savva Kolbachev

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message