cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <>
Subject Re: [RT] Cayenne for other platforms
Date Sun, 28 Aug 2011 20:24:53 GMT
I played around with:

I finally managed to send a "call" to cayenne, with auth. For this
test I used the cayenne-rop-server-tutorial.

After getting the proxy, i tried to call getEventManager() but it
fails with 500: expected 'c' in hessian input at 72

But it should be the DataChannel I get, right?

On Sat, Aug 27, 2011 at 4:19 PM, Andrus Adamchik <> wrote:
> And we can also work towards the same goal from another direction - simplifying the protocol
to make it easier to build "ad hoc" clients without sacrificing the features. We've thought
of that before, just never got around doing it.
> Andrus
> On Aug 27, 2011, at 4:16 PM, Andrus Adamchik wrote:
>> First some background on ROP extensions. Tore did some experiments with Cocoa Cayenne
[1], there was an old GSoC project exposing ROP server via SOAP [2], and then there was a
recent Android success report (with the existing Java client).
>> I suspect writing a meaningful client in another language is quite challenging. What
ROP does at the high-level is providing a remote stub of the DataChannel [3], and a servlet
session to allow connecting to the same server-side DataContext (or not... this can theoretically
be made completely stateless on the server side). This appears deceptively simple. DataChannel
has only 4 operations, (you can ignore 'getEventManager', so let's say - 3 operations), but
the number of object types passed through these 3 methods, and the complexity of the data
structures made it prohibitive so far.
>> So to create a wow factor, you'd need a PHP version of ObjectContext that can manage
object relationships and build the diffs for the 'onSync' operation, provide lazy faulting
of relationships, etc.
>> I think whoever does the PHP implementation can start small though - just implement
DataChannel.onQuery and a subset of queries, say NamedQuery (this is the simplest one and
also the most benign from the server security standpoint). And bring back DataRows instead
of full objects. Even that can be pretty powerful, and cause enough interest to get the rest
of ObjectContext going.
>> Cheers,
>> Andrus
>> [1]
>> [2]
>> [3]
>> On Aug 27, 2011, at 3:41 PM, Christian Grobmeier wrote:
>>> Hello,
>>> this early morning I dreamed of Cayenne (not kidding). I think it is
>>> possible to connect other languages speaking Hessian to Cayenne, for
>>> example PHP. This morning I imagined how it should be done. Lets
>>> assume we use PHP. Then we would "only" need a few classes, like
>>> CayenneRuntime for ROP Clients. We would need to use Dataobjects which
>>> can be translated to the Cayennebojects (they probably can be
>>> generated from the original classes). Then we need to serialize them
>>> and send em. This is for creating objects. I am a
>>> A bit more difficult is to send queries to Cayenne. How could that be
>>> done? The queries need to be serialized to a format Cayenne can use.
>>> There are some other difficulties to be managed. Can serialized Java
>>> objects be with the PHP Hessian lib and what happens with them? Are
>>> they plain PHP objects? If it is not possible, other ways can apply,
>>> for example using JSON as intermediate format. But is the
>>> serialization effort really worth the value?
>>> What are your thoughts on this? I think having Cayenne available for
>>> PHP - this would be *wow*. Best of both worlds, so to say!
>>> Cheers
>>> Christian


View raw message