Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9E1CF2009F8 for ; Fri, 20 May 2016 05:49:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9CC82160A22; Fri, 20 May 2016 03:49:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1E44160A00 for ; Fri, 20 May 2016 05:49:09 +0200 (CEST) Received: (qmail 56338 invoked by uid 500); 20 May 2016 03:49:09 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 56327 invoked by uid 99); 20 May 2016 03:49:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2016 03:49:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5D72E1A47CE for ; Fri, 20 May 2016 03:49:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.068 X-Spam-Level: X-Spam-Status: No, score=-0.068 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id v8KX0c02juDp for ; Fri, 20 May 2016 03:49:05 +0000 (UTC) Received: from mail16.tpgi.com.au (mail16.tpgi.com.au [203.12.160.231]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 72BCA5F2C3 for ; Fri, 20 May 2016 03:49:03 +0000 (UTC) X-TPG-Junk-Status: Message not scanned X-TPG-Antivirus: Passed X-TPG-Abuse: host=[202.161.115.54]; ip=202.161.115.54; date=Fri, 20 May 2016 13:48:53 +1000 Received: from fish.ish.com.au (202-161-115-54.static.tpgi.com.au [202.161.115.54] (may be forged)) by mail16.tpgi.com.au (envelope-from prvs=094899ef66=ari@ish.com.au) (8.14.3/8.14.3) with ESMTP id u4K3mpNM029830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 May 2016 13:48:53 +1000 Received: from ip-136.ish.com.au ([203.29.62.136]:63615) by fish.ish.com.au with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1b3bQf-00040G-0X for dev@cayenne.apache.org; Fri, 20 May 2016 13:48:49 +1000 To: dev@cayenne.apache.org From: Aristedes Maniatis Subject: ROP, Hessian and protocol-buffers Message-ID: <165632c2-7737-ac7f-4abe-fa1a837c0e54@ish.com.au> Date: Fri, 20 May 2016 13:48:48 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ct7F2WRd3jgQwu0nSwEArHqO2EqsTDE4D" archived-at: Fri, 20 May 2016 03:49:10 -0000 --ct7F2WRd3jgQwu0nSwEArHqO2EqsTDE4D Content-Type: multipart/mixed; boundary="sUo3Mwwq0cS8Q3TbNU9KvJh1Mosua7WUg" From: Aristedes Maniatis To: dev@cayenne.apache.org Message-ID: <165632c2-7737-ac7f-4abe-fa1a837c0e54@ish.com.au> Subject: ROP, Hessian and protocol-buffers --sUo3Mwwq0cS8Q3TbNU9KvJh1Mosua7WUg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've realised that Savva and I have been having too much conversation aro= und 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 Cayenn= e'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 dat= e objects. 2. The ROP implementation is completely tied into Hessian, and not just f= or 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 impleme= ntation 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 se= rialisation library under the Apache license. It is more modern than Hess= ian and actively developed. It is less likely to have security issues wit= h 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 relatio= nships. Another library protostuff sits on top and does that for us. It i= s also well used and actively developed. So now we have an almost working Cayenne extension library. Instead of He= ssian, you can drop this library into your project and have it use protos= tuff which uses protocol-buffers. But bug remains in protostuff and one o= f the authors there has been incredibly helpful in sorting it out. Hopefu= lly 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 al= l about negotiating the right kind of link. Savva has some example code h= ere: 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 modul= es) * simpler to set up It will be really nice and I look forward to Savva landing this into Caye= nne. Ari --=20 --------------------------> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A --sUo3Mwwq0cS8Q3TbNU9KvJh1Mosua7WUg-- --ct7F2WRd3jgQwu0nSwEArHqO2EqsTDE4D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlc+iSAACgkQ72p9Lj5JECoTjQCeLrNSA1al1x2nnTD2asunkR82 cXcAnRUDvQQX+EAxoR8ig68eD/CbEsEi =YfYv -----END PGP SIGNATURE----- --ct7F2WRd3jgQwu0nSwEArHqO2EqsTDE4D--