You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Joseph Schmidt <jo...@yahoo.com> on 2009/04/10 16:36:42 UTC

Can Cayenne run on google AppEngine/Java?

Can cayenne run on the new Google AppEngine/Java?

I'm asking this because there are quite some restrictions to the applications that work, and many known frameworks don't work (but the authors promised to make them work - e.g. Tapestry):
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine

e.g. Hibernate does not work (maybe this might be the chance for Cayenne to get some more publicity if it could work :) ?).

thanks,
Joseph.




      


Re: Can Cayenne run on google AppEngine/Java?

Posted by Robert Zeigler <ro...@roxanemy.com>.
I've been looking at the low level api a bit more.
I think our best bet is to write a db adapter, rather than a jdbc  
driver (although the jdbc driver would be interesting as it would  
enable a much broader range of persistence support, ie, not cayenne- 
centric).

I may play with this idea some.  Definitely... intrigued. :)

Robert

On Apr 10, 2009, at 4/101:06 PM , Mike Kienenberger wrote:

> A little bit more on the topic since there's some interest:
>
>
> ---------- Forwarded message ----------
> From: Max Ross <ma...@google.com>
> Date: Apr 8, 4:59 pm
> Subject: Java Database Connectivity (JDBC)
> To: Google App Engine for Java
>
> Sounds very interesting!  It would certainly open up a lot of  
> additional
> frameworks for use on App Engine.  I can't think of any security
> restrictions that would prevent you from implementing a jdbc driver  
> that
> wraps the datastore service, so by all means go for it!
>
> Max
>
> On Wed, Apr 8, 2009 at 1:55 PM, Thomas Mueller  
> <thomas.tom.muel...@gmail.com
>> I am the author of the H2 Database Engine, and I think about writing
>> an open source "JDBC to com.google.appengine.api.datastore wrapper".
>> That way people can use SQL and the JDBC API (or other libraries that
>> use it).


Re: Can Cayenne run on google AppEngine/Java?

Posted by Mike Kienenberger <mk...@gmail.com>.
A little bit more on the topic since there's some interest:


---------- Forwarded message ----------
From: Max Ross <ma...@google.com>
Date: Apr 8, 4:59 pm
Subject: Java Database Connectivity (JDBC)
To: Google App Engine for Java

Sounds very interesting!  It would certainly open up a lot of additional
frameworks for use on App Engine.  I can't think of any security
restrictions that would prevent you from implementing a jdbc driver that
wraps the datastore service, so by all means go for it!

Max

On Wed, Apr 8, 2009 at 1:55 PM, Thomas Mueller <thomas.tom.muel...@gmail.com
> I am the author of the H2 Database Engine, and I think about writing
> an open source "JDBC to com.google.appengine.api.datastore wrapper".
> That way people can use SQL and the JDBC API (or other libraries that
> use it).

Re: Can Cayenne run on google AppEngine/Java?

Posted by Mike Kienenberger <mk...@gmail.com>.
Either way.

I was misremembering.

This is what I was thinking of:

http://groups.google.com/group/google-appengine-java/msg/d9dcf7b928beb4fb
  	
From: Thomas Mueller <th...@gmail.com>
Date: Wed, 8 Apr 2009 13:52:27 -0700 (PDT)

Subject: Discussion on will-it-play-in-app-engine

Java Database Connectivity (JDBC): "Not supported" is technically not
correct. Better would be: "Not supported by Google". Reason: the APIs
are there, and using third-party in-memory databases such as the H2
Database Engine (which I write) or HSQLDB work. I plan to write an
open souce datastore to JDBC wrapper so that people can use the JDBC
API directly via frameworks that use the JDBC API.


On Fri, Apr 10, 2009 at 1:52 PM, Robert Zeigler
<ro...@gmail.com> wrote:
> Reflection /is/ supported, with limitations.
> According to:
> http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox:
>
> Reflection
>
> An application is allowed full, unrestricted, reflective access to its own
> classes. It may query any private members, use
> java.lang.reflect.AccessibleObject.setAccessible(), and read/set private
> members.
>
> An application can also also reflect on JRE and API classes, such as
> java.lang.String and javax.servlet.http.HttpServletRequest. However, it can
> only access public members of these classes, not protected or private.
>
> An application cannot reflect against any other classes not belonging to
> itself, and it can not use the setAccessible() method to circumvent these
> restrictions.
>
> JDBC is not supported.  The data store isn't based on a relational database;
> it's an object-oriented data store.
>
> From:
> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1
>
> "Java Database Connectivity (JDBC)
> Not supported - the App Engine datastore is not a relational store. Use JDO
> or JPA instead."
>
>
> That said, we could still /probably/ provide a db adapter for the app engine
> store, and instead of translating queries, etc. to sql, translate them to
> the appropriate api calls.
>
> I suppose, in theory, you could write a jdbc adapter that translates SQL to
> the appropriate api calls, but... that seems a little silly. :) The
> "dbadapter" approach is better, I think.
>
> Robert
>
> On Apr 10, 2009, at 4/1012:40 PM , Mike Kienenberger wrote:
>
>> From what I understand, it's not JDBC that's not supported, but the
>> lack of a Google Apps Engine JDBC driver.
>>
>> I haven't tried it, but it seems like it'd be easy enough set up.
>>
>> Yes, reflection isn't supported.
>>
>> Again, though, I think the real fitting point is not getting Cayenne
>> to run in entirety on the app engine as a java -> javascript
>> translated byte code, but to make sure that client-side ROP works on
>> the apps engine, with Cayenne running on the server-side.
>>
>> On Fri, Apr 10, 2009 at 10:47 AM, Andrus Adamchik
>> <an...@objectstyle.org> wrote:
>>>
>>> On Apr 10, 2009, at 5:36 PM, Joseph Schmidt wrote:
>>>>
>>>> Can cayenne run on the new Google AppEngine/Java?
>>>>
>>>> I'm asking this because there are quite some restrictions to the
>>>> applications that work, and many known frameworks don't work (but the
>>>> authors promised to make them work - e.g. Tapestry):
>>>>
>>>>
>>>> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>>>>
>>>> e.g. Hibernate does not work (maybe this might be the chance for Cayenne
>>>> to get some more publicity if it could work :) ?).
>>>>
>>>> thanks,
>>>> Joseph.
>>>
>>> A good question...
>>>
>>> IIRC Google apps engine does not support JDBC? So that will be a
>>> showstopper, although the stack is abstracted well enough so that it
>>> should
>>> be possible to re-implement a non-JDBC DataNode. Otherwise Cayenne does
>>> not
>>> rely on reflection for CayenneDataObjects, and should be possible to port
>>> ... I think.
>>>
>>>> maybe this might be the chance for Cayenne to get some more publicity if
>>>> it could work :) ?).
>>>
>>>
>>> This might also be a chance for new Cayenne volunteers to get publicity
>>> ;)
>>>
>>> Andrus
>>>
>
>

Re: Can Cayenne run on google AppEngine/Java?

Posted by Robert Zeigler <ro...@gmail.com>.
Reflection /is/ supported, with limitations.
According to: http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox 
:

Reflection

An application is allowed full, unrestricted, reflective access to its  
own classes. It may query any private members, use  
java.lang.reflect.AccessibleObject.setAccessible(), and read/set  
private members.

An application can also also reflect on JRE and API classes, such as  
java.lang.String and javax.servlet.http.HttpServletRequest. However,  
it can only access public members of these classes, not protected or  
private.

An application cannot reflect against any other classes not belonging  
to itself, and it can not use the setAccessible() method to circumvent  
these restrictions.

JDBC is not supported.  The data store isn't based on a relational  
database; it's an object-oriented data store.

From: http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1

"Java Database Connectivity (JDBC)
Not supported - the App Engine datastore is not a relational store.  
Use JDO or JPA instead."


That said, we could still /probably/ provide a db adapter for the app  
engine store, and instead of translating queries, etc. to sql,  
translate them to the appropriate api calls.

I suppose, in theory, you could write a jdbc adapter that translates  
SQL to the appropriate api calls, but... that seems a little silly. :)  
The "dbadapter" approach is better, I think.

Robert

On Apr 10, 2009, at 4/1012:40 PM , Mike Kienenberger wrote:

> From what I understand, it's not JDBC that's not supported, but the
> lack of a Google Apps Engine JDBC driver.
>
> I haven't tried it, but it seems like it'd be easy enough set up.
>
> Yes, reflection isn't supported.
>
> Again, though, I think the real fitting point is not getting Cayenne
> to run in entirety on the app engine as a java -> javascript
> translated byte code, but to make sure that client-side ROP works on
> the apps engine, with Cayenne running on the server-side.
>
> On Fri, Apr 10, 2009 at 10:47 AM, Andrus Adamchik
> <an...@objectstyle.org> wrote:
>>
>> On Apr 10, 2009, at 5:36 PM, Joseph Schmidt wrote:
>>>
>>> Can cayenne run on the new Google AppEngine/Java?
>>>
>>> I'm asking this because there are quite some restrictions to the
>>> applications that work, and many known frameworks don't work (but  
>>> the
>>> authors promised to make them work - e.g. Tapestry):
>>>
>>> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>>>
>>> e.g. Hibernate does not work (maybe this might be the chance for  
>>> Cayenne
>>> to get some more publicity if it could work :) ?).
>>>
>>> thanks,
>>> Joseph.
>>
>> A good question...
>>
>> IIRC Google apps engine does not support JDBC? So that will be a
>> showstopper, although the stack is abstracted well enough so that  
>> it should
>> be possible to re-implement a non-JDBC DataNode. Otherwise Cayenne  
>> does not
>> rely on reflection for CayenneDataObjects, and should be possible  
>> to port
>> ... I think.
>>
>>> maybe this might be the chance for Cayenne to get some more  
>>> publicity if
>>> it could work :) ?).
>>
>>
>> This might also be a chance for new Cayenne volunteers to get  
>> publicity ;)
>>
>> Andrus
>>


Re: Can Cayenne run on google AppEngine/Java?

Posted by Mike Kienenberger <mk...@gmail.com>.
>From what I understand, it's not JDBC that's not supported, but the
lack of a Google Apps Engine JDBC driver.

I haven't tried it, but it seems like it'd be easy enough set up.

Yes, reflection isn't supported.

Again, though, I think the real fitting point is not getting Cayenne
to run in entirety on the app engine as a java -> javascript
translated byte code, but to make sure that client-side ROP works on
the apps engine, with Cayenne running on the server-side.

On Fri, Apr 10, 2009 at 10:47 AM, Andrus Adamchik
<an...@objectstyle.org> wrote:
>
> On Apr 10, 2009, at 5:36 PM, Joseph Schmidt wrote:
>>
>> Can cayenne run on the new Google AppEngine/Java?
>>
>> I'm asking this because there are quite some restrictions to the
>> applications that work, and many known frameworks don't work (but the
>> authors promised to make them work - e.g. Tapestry):
>>
>> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>>
>> e.g. Hibernate does not work (maybe this might be the chance for Cayenne
>> to get some more publicity if it could work :) ?).
>>
>> thanks,
>> Joseph.
>
> A good question...
>
> IIRC Google apps engine does not support JDBC? So that will be a
> showstopper, although the stack is abstracted well enough so that it should
> be possible to re-implement a non-JDBC DataNode. Otherwise Cayenne does not
> rely on reflection for CayenneDataObjects, and should be possible to port
> ... I think.
>
>> maybe this might be the chance for Cayenne to get some more publicity if
>> it could work :) ?).
>
>
> This might also be a chance for new Cayenne volunteers to get publicity ;)
>
> Andrus
>

Re: Can Cayenne run on google AppEngine/Java?

Posted by Andrus Adamchik <an...@objectstyle.org>.
Actually I am not sure where I got the info about reflection being  
unsupported... Google page doesn't mention that. So it comes down to  
translating SelectQueries, EJBQL and INSERT/UPDATE/DELETE to App  
Engine datastore calls.

Andrus


On Apr 10, 2009, at 5:47 PM, Andrus Adamchik wrote:

>
> On Apr 10, 2009, at 5:36 PM, Joseph Schmidt wrote:
>> Can cayenne run on the new Google AppEngine/Java?
>>
>> I'm asking this because there are quite some restrictions to the  
>> applications that work, and many known frameworks don't work (but  
>> the authors promised to make them work - e.g. Tapestry):
>> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>>
>> e.g. Hibernate does not work (maybe this might be the chance for  
>> Cayenne to get some more publicity if it could work :) ?).
>>
>> thanks,
>> Joseph.
>
> A good question...
>
> IIRC Google apps engine does not support JDBC? So that will be a  
> showstopper, although the stack is abstracted well enough so that it  
> should be possible to re-implement a non-JDBC DataNode. Otherwise  
> Cayenne does not rely on reflection for CayenneDataObjects, and  
> should be possible to port ... I think.
>
>> maybe this might be the chance for Cayenne to get some more  
>> publicity if it could work :) ?).
>
>
> This might also be a chance for new Cayenne volunteers to get  
> publicity ;)
>
> Andrus
>


Re: Can Cayenne run on google AppEngine/Java?

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Apr 10, 2009, at 5:36 PM, Joseph Schmidt wrote:
> Can cayenne run on the new Google AppEngine/Java?
>
> I'm asking this because there are quite some restrictions to the  
> applications that work, and many known frameworks don't work (but  
> the authors promised to make them work - e.g. Tapestry):
> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>
> e.g. Hibernate does not work (maybe this might be the chance for  
> Cayenne to get some more publicity if it could work :) ?).
>
> thanks,
> Joseph.

A good question...

IIRC Google apps engine does not support JDBC? So that will be a  
showstopper, although the stack is abstracted well enough so that it  
should be possible to re-implement a non-JDBC DataNode. Otherwise  
Cayenne does not rely on reflection for CayenneDataObjects, and should  
be possible to port ... I think.

> maybe this might be the chance for Cayenne to get some more  
> publicity if it could work :) ?).


This might also be a chance for new Cayenne volunteers to get  
publicity ;)

Andrus