cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: ROP
Date Wed, 16 Dec 2015 18:35:27 GMT
Proxy was a raw idea. Physically separating non-object parts of Cayenne from "business" objects
and associated business logic is still very appealing. This is about encapsulating ~60-70%
of Cayenne stack (mapping model, SQL query translation, caching, etc.) into a web service
with clear simple interface. The public API of the proxy will be (serialized) objects though
(JSON, protobuf). So that's your generic ORM in a box, serving your object model, but free
from your application java dependencies. So the consumers will need to do no ORM translation.

Anyways, I need to sit on this for some time. I feel there's something there in this approach.
This is a solution for something, but not for the problem at hand :) Protocol on the other
hand (in a Hessian-free future) will likely be the same for both "proxy" and "ROP" designs.
So I am more interested in the protocol right now.


> On Dec 14, 2015, at 1:05 PM, Aristedes Maniatis <> wrote:
> On 14/12/2015 6:56pm, Andrus Adamchik wrote:
>> For technologies like Swift that don't have native drivers yet it provides JDBC driver.
> Even Swift already has native database drivers, according to my quick search of github.
> On 14/12/2015 7:00pm, Andrus Adamchik wrote:
>> Though I guess the main motivation for Java ROP now is the ability to run code both
on the client and on the server, right?
> Absolutely. Lifecycle events are important so that the server doesn't have to trust the
client to perform validation and authorisation, and also trigger other processes like audit
> Also important are clever query concepts like pagination and prefetches.
> What could be better is integrated support for distributed caches and cache invalidation.
Or at least the hooks to make it easier to leverage ActiveMQ/EHCache/etc as a way to do these
> On 14/12/2015 7:18pm, Andrus Adamchik wrote:
>> Another thing that I hoped to achieve in Cayenne is seamless reverse-engineering
flow. The biggest hurdle in ORM is the constant need to sync up multiple layers: DB ->
ORM -> code. Annotation-based frameworks combine ORM with code, somewhat easing the pain
(though making things dirty in the process). Our full separation of all 3 layers always seemed
right. But now I think of it as an advantage not being utilized. 
> I guess I'm not seeing that pain. I really should get around to cleaning up and contributing
my cgen plugin for gradle, but really this should all be automated by the build tool.
> Perhaps we should work on some liquibase integration to help with the database update
process. We do this by hand, but it would be nice for cgen to detect the changes and append
a liquibase XML snippet.
>> So the hope is that we can do better, and perhaps a zero-manitenance proxy is the
answer to the sync problem as well. But maybe I am on the wrong track completely by mixing
modeling and query execution aspects here. 
>> Anyways, just thinking out loud :)
> If a proxy layer doesn't let you run code, then what does it do? You have Hessian serialisation
instead of SQL serialisation. You have HTTP instead of JDBC. But then what?
> Certainly the limitation of ROP is that the client is currently limited to Java, which
means roughly Swing/JavaFX. Opening it up to other UI choices means porting a great part of
Cayenne (all the client bits are still quite a lot) to Swift or Android or .NET or something.
But (to bring this back on topic) protobuf does help there since the client and server can
be different languages.
> Ari
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

View raw message