[appengine-java] Re: ImageService from dev server
Starman: Unfortunately that solution won't work for the deployed code working with the *real* blobstore/image service, as the serving URL returned is a real URL for the ImageService on a different server to your application, so you need to store the host and port. I'd rather not have specific code for dev_server and production if I can avoid it Couldn't the dev_server code for Blobstore/ImageService just return the correct hostname in the serving URL? = If experts consider that a bug in dev_server then I'd be happy to submit it. Didier: Thanks for the pointer! -- 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.
[appengine-java] Re: ImageService from dev server
Didier: Forgot to clarify this in the previous post. I have no problems to upload (and even delete) files to the blobstore in local dev_server. The problem is the URL returned by the call: url = imagesService.getServingUrl(blobKey); from the ImageService code when running in dev_server it returns http://0.0.0.0:80/_ah/img/{key} which is then NOT served. -- 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.
[appengine-java] Entity relations (JPA vs lowlevel API)
Hi there, I'm searching for information of entity relation ships in appengine. JPA for example supports relations between entites (one-to-one, ont-to-many, many-to-many). As far as I know by know the underlying datastore doesn't direktly support this and not join queries (different entities). How do you store Customer - Orders in the datastore? Is there low level API example code? Would I store an entity Customer with attributes and a list of order ids? Any help highly appreciated. Thanks Tom -- 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.
[appengine-java] Re: Entity relations (JPA vs lowlevel API)
maybe a good place to start is sourcecode of lowlevel-based frameworks like slim3 or objectify -- Roberto On Nov 20, 8:13 am, Tom heidewol...@web.de wrote: Hi there, I'm searching for information of entity relation ships in appengine. JPA for example supports relations between entites (one-to-one, ont-to-many, many-to-many). As far as I know by know the underlying datastore doesn't direktly support this and not join queries (different entities). How do you store Customer - Orders in the datastore? Is there low level API example code? Would I store an entity Customer with attributes and a list of order ids? Any help highly appreciated. Thanks Tom -- 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] Running Google App Engine from within a HSM.
Hi Ikai, Thank you for your fast response. I'm not sure I understand the question. Are you looking to run the GAE SDK inside your own hardware? Or are you looking to run something like AppScale (http://code.google.com/p/appscale/) with the security module? I am looking to run something like AppScale (http://code.google.com/p/appscale/ ) with the security module? Specifically, I was wondering if it was possible to run AppServer (part of AppScale) inside a hardware security module (HSM), where that HSM is capable of running Java Standard Edition software. So in a hybrid cloud deployment some of my business logic processing particularly sensitive information (social security numbers, credit cards, and so on) is running entirely within the protection of a hardware security module (running AppServer) managed at my site, and the remaining parts of my business logic responsible for processing less sensitive data is running on the public cloud provided by Google. Thanks! Benjamin Gittins On 19/11/2010, at 7:58 PM, Ikai Lan (Google) wrote: I'm not sure I understand the question. Are you looking to run the GAE SDK inside your own hardware? Or are you looking to run something like AppScale (http://code.google.com/p/appscale/) with the security module? If you're talking about deployment in production, you don't have any choice over what it's run on. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Thu, Nov 18, 2010 at 7:08 AM, Benjamin Gittins gittin...@gmail.com wrote: I am relatively new to Google App Engine. I'd like to know if it is possible to run Google App Engine inside a Java Standard Edition compliant network attached hardware security module, such as SafeNet LUNA-SP? ( www.safenet-inc.com/products/data-protection/hardware-security-modules/luna-sp/ ) Thanks, Benjamin Gittins -- 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-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.
[appengine-java] Re: blobstore - map returned empty
What I do is remove the prot:ip:port prefix if the ip is 0.0.0.0 before I store the url. In dev, a relative path is OK. In prod, I store exactly what is returned. R. On Oct 31, 5:45 am, pac parvez.chau...@gmail.com wrote: I have gone through your sample code few times, could not find what I am missing. What I tried now - is created a dialog with simple file upload field (rest functionality nearly copy pasted), now that seems to be working. May be I will come back to other code and see what causing it. Though another thing which I came across is that some time ImageService ( String imageURL = imagesService.getServingUrl(blobKey); ) returns serving url with ip address i.e. instead /_ah/img/iS_QaJQHwq-tmmA4_5i6kw it returns http://0.0.0.0:/_ah/img/iS_QaJQHwq-tmmA4_5i6kw In such case image does not get display as incorrect local ip address i.e.http://127.0.0.1: On Oct 28, 1:19 am, Ikai Lan (Google) ikai.l+gro...@google.com wrote: That looks right to me. Strange ... can you compare your code against this project? It's some sample code I whipped up a while ago. Here's the GWT upload widget: http://github.com/ikai/gwt-gae-image-gallery/blob/master/src/com/ikai... Here's the servlet that handles uploads: http://github.com/ikai/gwt-gae-image-gallery/blob/master/src/com/ikai... I've seen this happen before when the name isn't set correctly. Can you look into the generated source using a tool like Firebug to see if the form is being generated correctly? -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Wed, Oct 27, 2010 at 3:51 PM, pac parvez.chau...@gmail.com wrote: Hi Ikai, Upload page is a composite, in which I have a decorator panel which contains another composite which has FormPanel (Upload field) As for servlet code: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String userIdStr = req.getParameter(IAppConstants.PARAM_UserId); MapString, BlobKey blobs = blobstoreService.getUploadedBlobs(req); BlobKey blobKey = blobs.get(IAppConstants.PARAM_MyFile); . . . blobs returned is empty and so blobKey is null. IAppConstants.PARAM_MyFile is name of upload field at client side i.e. uploadField.setName(IAppConstants.PARAM_MyFile); In servlet if I do String myFile = req.getParameter(IAppConstants.PARAM_MyFile); then myFile is also null. Upload form at client does have uploadForm.setEncoding(FormPanel.ENCODING_MULTIPART); uploadForm.setMethod(FormPanel.METHOD_POST); Any suggestions? Thanks. On Oct 27, 7:28 pm, Ikai Lan (Google) ikai.l+gro...@google.comikai.l%2bgro...@google.com wrote: What does your upload page look like? Can you post the full servlet? -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Tue, Oct 26, 2010 at 4:12 PM, pac parvez.chau...@gmail.com wrote: I am trying to use BlobstoreService locally. But map is returned empty by following line in servlet: MapString, BlobKey blobs = blobstoreService.getUploadedBlobs(req); I was following post from http://ikaisays.com/(alsousing gwt as front end) but I guess I might have missed something, any thoughts? 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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java %252bunsubscr...@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.comgoogle-appengine-java%2B 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
[appengine-java] Re: Auto generating datastore-indexes.xml during unit tests
In that case, your ds files must be written somewhere else when you run unit tests. On Nov 19, 9:28 pm, Jerry jerry.morri...@gmail.com wrote: Thanks for the hypotheses! I do have datastore-indexes autoGenerate=true in war/WEB-INF/datastore-indexes.xml. I tried not tearing down the helper. Still, the test doesn't touch either of the files WEB-INF/appengine-generated/datastore-indexes-auto.xml war/WEB-INF/appengine-generated/datastore-indexes-auto.xml Any more ideas? Code excerpts: public class DatastoreIndexText { private final LocalServiceTestHelper helper = fileBasedDatastoreTestHelper(); private PersistenceManager pm; @Before public void setUp() throws Exception { helper.setUp(); pm = PMF.get().getPersistenceManager(); ... } @After public void tearDown() throws Exception { try { deleteScheme(schemeId); } finally { pm.close(); // helper.tearDown(); } } private static LocalServiceTestHelper fileBasedDatastoreTestHelper() { File location = new File(war/WEB-INF/appengine-generated/ local_db.bin); // TODO: Read these elements from the File(war/WEB-INF/appengine- web.xml). String appId = ... String appVersionId = 1; LocalDatastoreServiceTestConfig dsConfig = new LocalDatastoreServiceTestConfig() .setBackingStoreLocation(location.getAbsolutePath()) .setNoStorage(false); System.out.println(dsConfig.getBackingStoreLocation()); return new LocalServiceTestHelper( new LocalUserServiceTestConfig(), dsConfig) .setEnvIsAdmin(false) .setEnvIsLoggedIn(true) .setEnvEmail(AUTHOR_EMAIL) .setEnvAuthDomain(AUTH_DOMAIN) .setEnvAppId(appId) .setEnvVersionId(appVersionId); } On Nov 19, 12:58 am, Cyrille Vincey crll...@gmail.com wrote: Check your war WEB-INF datastore-indexes.xml (NOT the war WEB-INF appengine-generated datastore-indexes-auto.xml) You might read: datastore-indexes autoGenerate=false Try to replace with : datastore-indexes autoGenerate=true On 19/11/10 01:39, Jerry jerry.morri...@gmail.com wrote: Great tip but it's not working. Running the test updates the mod date of local_db.bin but not datastore-indexes-auto.xml. I'm also configuring a LocalUserServiceTestConfig for a logged in user, but that doesn't seem to affect it. Is another setup step needed? I'd like a unit test to trigger all auto-index because my app has many possible combinations of query filters. Thanks! On Nov 11, 11:24 am, Starman r...@arrova.ca wrote: Something like the following will setup the datastore helper and create the datastore-indexes-auto.xml: LocalDatastoreServiceTestConfig dsConfig = new LocalDatastoreServiceTestConfig(); File location = new File(war/WEB-INF/appengine-generated/ local_db.bin); dsConfig.setBackingStoreLocation(location.getAbsolutePath()); // And it seems that for the local ds service to be able to load the local_db.bin file, the local // environment must match the app id and version as stored in the file. String xml; try { xml = FileUtils.readFileToString(new File(war/WEB-INF/ appengine-web.xml)); } catch (IOException e) { throw new RuntimeException(e); } String application = StringUtils.substringBetween(xml, application, /application); String version = StringUtils.substringBetween(xml, version, /version); // Default behavior is to keep everything in RAM. Tell the local services to use the file system dsConfig.setNoStorage(false); // Create the local services. gaeDatastoreHelper = new LocalServiceTestHelper(dsConfig); gaeDatastoreHelper.setEnvAppId(application); gaeDatastoreHelper.setEnvVersionId(version); // Calling setUp() will start the local ds service and load the local_db.bin file. gaeDatastoreHelper.setUp(); This way, you can even write tests against a previously generated local_db.bin if you want. -- 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. -- 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
[appengine-java] Re: ImageService from dev server
Just to re-iterate: the question is related to images stored in the BLOBSTORE (not the datastore) and served via the ImageService using the url = imagesService.getServingUrl(blobKey); call. -- 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] Re: ImageService from dev server
so, you are not using com.google.appengine. api.datastore.Blob ? On Sat, Nov 20, 2010 at 12:23 PM, andrew aute...@gmail.com wrote: Just to re-iterate: the question is related to images stored in the BLOBSTORE (not the datastore) and served via the ImageService using the url = imagesService.getServingUrl(blobKey); call. -- 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.comgoogle-appengine-java%2bunsubscr...@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.
[appengine-java] Re: Entity relations (JPA vs lowlevel API)
Hi, I would recommend Objectify (which I use heavily): seems to match your need. regards didier On Nov 20, 1:20 pm, Roberto Saccon rsac...@gmail.com wrote: maybe a good place to start is sourcecode of lowlevel-based frameworks like slim3 or objectify -- Roberto On Nov 20, 8:13 am, Tom heidewol...@web.de wrote: Hi there, I'm searching for information of entity relation ships in appengine. JPA for example supports relations between entites (one-to-one, ont-to-many, many-to-many). As far as I know by know the underlying datastore doesn't direktly support this and not join queries (different entities). How do you store Customer - Orders in the datastore? Is there low level API example code? Would I store an entity Customer with attributes and a list of order ids? Any help highly appreciated. Thanks Tom -- 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.