[appengine-java] Shared Datastore via Multiple App Versions Locally

2010-08-12 Thread millr
Hello,

I am aware that it is possible to run different applications that
share the same datastore by using different version strings for the
two applications, as detailed here:
http://googleappengine.blogspot.com/2009/06/10-things-you-probably-didnt-know-about.html

Now that I have found this approach I am wondering how I could pool
the data on the development versions of the app that I am running
locally.

I am using JRuby for a rack app and have found that the datastore data
is stored in /WEB-INF/appengine-generated/local_db.bin, so I tried
creating a symlink from the original app to the same location within
the new app I wish to share the datastore with. This didn't work an
produced the following error:

INFO: Failed to load from the backing store, /WEB-INF/appengine-
generated/local_db.bin
java.io.StreamCorruptedException: invalid stream header: 626F6F6B
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:
783)

Does anyone know of ways I can share this data successfully on my
local versions of apps?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Shared Datastore via Multiple App Versions Locally

2010-08-13 Thread John Patterson
Your approach works fine for me on OS X.  But the datastore is held in  
memory so only one app can use it at a time.  If you make changes to  
the datastore you also need to wait until you see the log message  
"Time to persist datastore..." before shutting down the app.


On 13 Aug 2010, at 09:14, millr wrote:


Hello,

I am aware that it is possible to run different applications that
share the same datastore by using different version strings for the
two applications, as detailed here:
http://googleappengine.blogspot.com/2009/06/10-things-you-probably-didnt-know-about.html

Now that I have found this approach I am wondering how I could pool
the data on the development versions of the app that I am running
locally.

I am using JRuby for a rack app and have found that the datastore data
is stored in /WEB-INF/appengine-generated/local_db.bin, so I tried
creating a symlink from the original app to the same location within
the new app I wish to share the datastore with. This didn't work an
produced the following error:

INFO: Failed to load from the backing store, /WEB-INF/appengine-
generated/local_db.bin
java.io.StreamCorruptedException: invalid stream header: 626F6F6B
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:
783)

Does anyone know of ways I can share this data successfully on my
local versions of apps?

Thanks.

--
You received this message because you are subscribed to the Google  
Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com 
.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en 
.




--
You received this message because you are subscribed to the Google Groups "Google 
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.