[appengine-java] Google App Engine NO LONGER FOR SMALL DEVELOPERS!!!!!!!
Dear Google staff and developers, I have been using GAE since about 1.5 years and* I have some MICRO clients*. *Usually we charge $70 / YEAR from them*. That's all we get. If google want, I can share 50% of it with Google. But when I see the new pricing model, I see that I will no longer be able to use GAE and again I will have to switch to CHEAP SHARED HOSTING. The applications have no cron job, no data store writes (unless the user goes to contact us page and submits an inquiry). There are not more than 5 visits per day in those sites. Even after this, I see that the Data store Write and Read is making up to the limit and Google will stop my site after the billing is enabled. So at the least if I exceed the quota by this: Datastore Writes Chargeable per DAY: $0.07 Datastore Writes Chargeable per day: $0.07 MANDATORY PER APPLICATION CHARGE: $9 PER MONTH *So my annual billing becomes: 12*0.07 + 12*0.07 + 9*12 = $109.68* *So I am in a loss of $ 40.* *If Google removes the mandatory $9 per app per month charge, then I will be on track..* *Back to my application - As of now, there are no data store reads and writes. I have turned off all cron jobs, and the application is almost working as static application. But still according to the billing history page, data store read and writes are making up to their upper free bound. * *I always loved and admired Google products. But if I will have to quit GAE, then I will think 1000 of times before clicking on any I accept the terms and Condition.. Stuff.* *This new pricing model has disappointed me and I believe Google completely ignored the band of such small developers like me. * *Love Java, Love Google.* Thanks Technical Lobby -- 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.
Re: [appengine-java] Re: running app engine application totally on local environment
Thanks Didier. Regards Romesh On Thu, Mar 17, 2011 at 10:21 AM, Didier Durand durand.did...@gmail.comwrote: Hi, About your second question, you'll be able to upload on the gae cloud. What I would do: in you data access layer, I would put some interceptor code that will record all changes in real time and push them to the gae cloud as soon as you have a connection (you say that internet access is shaky in that case). So. you will have real time mirroring of your local data to the cloud. The replication will happen wia the call of a servlet in the cloud that will receive serialized version of the modified /created object and put it in the datastore. regards didier On Mar 16, 7:12 pm, romesh soni soni.rom...@gmail.com wrote: Hi Didier, Thanks for your time and suggestions. Though before posting, I searched on Google to find the answer but did not find any reference :(. I thought the dev server means app engine support for local machine. Okay, I will use jetty for running the google app engine application I am building. But what about the other question? 2.) uploading data from development server to production server as there will be schedulers in local (aka development ) machines to push data to production server so that in case of system crash on local serves, my clients can switch to Production version. Thanks TL On Wed, Mar 16, 2011 at 10:33 AM, Ikai Lan (Google) ika...@google.com wrote: Thanks for answering, Didier (I notice you've answered this question several times in the past). I feel like I should add this to the FAQ ... Ikai Lan Developer Programs Engineer, Google App Engine Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine On Wed, Mar 16, 2011 at 10:13 AM, Didier Durand durand.did...@gmail.comwrote: Hi, this question was already debated many times here: it is not a good idea to use the dev server of gae for production purposes as it is only a dev server as its name implies. It's limited in many functions, you have no guarantee on its long term, etc... Why don't you go to a standard servlet container (tomcat, jetty, etc..): it would be much safer for your purpose and as it is close to gae, you can have 2 versions in parallel or migrate back easily to gae in the future when needed / possible. regards didier On Mar 16, 5:07 pm, romesh soni soni.rom...@gmail.com wrote: Did any one have answer of my questions? I am worried. Thanks Romesh On Tue, Mar 15, 2011 at 10:58 PM, romesh soni soni.rom...@gmail.com wrote: Hi Group, I am building an application where my clients will be running my app engine application on their local environments (they can not use internet because its not stable and available all the times). So I have two questions: 1.) Is it possible to run an app engine application totally on local (aka dev) server. If yes, how to start stop the server and deploy the application. (I am used to of Tomcat) 2.) uploading data from development server to production server as there will be schedulers in local (aka development ) machines to push data to production server so that in case of system crash on local serves, my clients can switch to Production version. Thanks TL -- 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-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
Re: [appengine-java] Re: running app engine application totally on local environment
Hi Didier, Thanks for your time and suggestions. Though before posting, I searched on Google to find the answer but did not find any reference :(. I thought the dev server means app engine support for local machine. Okay, I will use jetty for running the google app engine application I am building. But what about the other question? 2.) uploading data from development server to production server as there will be schedulers in local (aka development ) machines to push data to production server so that in case of system crash on local serves, my clients can switch to Production version. Thanks TL On Wed, Mar 16, 2011 at 10:33 AM, Ikai Lan (Google) ika...@google.comwrote: Thanks for answering, Didier (I notice you've answered this question several times in the past). I feel like I should add this to the FAQ ... Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine On Wed, Mar 16, 2011 at 10:13 AM, Didier Durand durand.did...@gmail.comwrote: Hi, this question was already debated many times here: it is not a good idea to use the dev server of gae for production purposes as it is only a dev server as its name implies. It's limited in many functions, you have no guarantee on its long term, etc... Why don't you go to a standard servlet container (tomcat, jetty, etc..): it would be much safer for your purpose and as it is close to gae, you can have 2 versions in parallel or migrate back easily to gae in the future when needed / possible. regards didier On Mar 16, 5:07 pm, romesh soni soni.rom...@gmail.com wrote: Did any one have answer of my questions? I am worried. Thanks Romesh On Tue, Mar 15, 2011 at 10:58 PM, romesh soni soni.rom...@gmail.com wrote: Hi Group, I am building an application where my clients will be running my app engine application on their local environments (they can not use internet because its not stable and available all the times). So I have two questions: 1.) Is it possible to run an app engine application totally on local (aka dev) server. If yes, how to start stop the server and deploy the application. (I am used to of Tomcat) 2.) uploading data from development server to production server as there will be schedulers in local (aka development ) machines to push data to production server so that in case of system crash on local serves, my clients can switch to Production version. Thanks TL -- 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-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.
[appengine-java] running app engine application totally on local environment
Hi Group, I am building an application where my clients will be running my app engine application on their local environments (they can not use internet because its not stable and available all the times). So I have two questions: 1.) Is it possible to run an app engine application totally on local (aka dev) server. If yes, how to start stop the server and deploy the application. (I am used to of Tomcat) 2.) uploading data from development server to production server as there will be schedulers in local (aka development ) machines to push data to production server so that in case of system crash on local serves, my clients can switch to Production version. Thanks TL -- 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.
Re: [appengine-java] Using custom dynamic URLs in GAE Java web-app
Did you try struts2? It suits your requirement. On Tue, Jan 18, 2011 at 1:34 PM, rsutaria rsuta...@gmail.com wrote: Hello, We have a requirement wherein we would like to use a dynamic URL which is custom created based on certain values of an object in the datastore. We are trying to build a multi-tenant application on GAE/J where the namespace is based on the value stored in one of the properties of the object. For e.g. If our landing page is: http://www.mygaejapp.com/user/login.jsp we would then like to fwd the user to a dynamic URL such as this: http://www.mygaejapp.com/company-name/user/enter-data.jsp The company-name part of the URL is not part of the filesystem but needs to dynamically added based on the properties of an object on the login page. I came across this module: http://tuckey.org/urlrewrite/ but it seems here an XML needs to be updated each time a new company- name is added and then the application needs to be reloaded in the app-server context. This doesnt seem like a feasible and scalable solution. Hence, I was wondering if there are any other ways that we can accomplish this task of being able to use dynamic URLs based on an object property without having to update any XMLs or reloading the application? Also, we are trying to build an automated SaaS app, hence manual intervention is not feasible. Any inputs will be greatly appreciated! -- 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.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-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.
Re: [appengine-java] BlobstoreService on local dev server: usable ?
Hi Didier, You have nothing to do anything special for using blobstore service in dev. It seems that your app engine api is not up to date. Can you try updating your app engine. The blobstore api has been added recently. See what your error is saying: package 'blobstore' or call 'DeleteBlob()' was not found. The blobstore service fine without any issue in dev env too. Thanks Romesh On Wed, Oct 13, 2010 at 1:48 PM, Didier Durand durand.did...@gmail.comwrote: Hi there, Trying to use BlobstoreService via the SDK on my local dev machine (Ubuntu): I get CallNotFoundException if I try to use either BlobstoreService.delete() or BlobstoreService.fetchData() in Junit tests. See trace below. a) is it possible BlobsotBlobstoreService in dev environment ? b) Do I need to do something specific to initialize or emulate it when being in dev as it has to be done for local DataStore ? thanks didier com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'blobstore' or call 'DeleteBlob()' was not found. at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:95) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:48) at com.google.appengine.api.blobstore.BlobstoreServiceImpl.delete(BlobstoreServiceImpl.java: 108) at net.didierdurand.gwtlib.server.TestBlob.testDeleteInvalidBlob(TestBlob.java: 37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod $1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java: 15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java: 41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java: 20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java: 46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java: 38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: 390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 197) -- 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.
Re: [appengine-java] Re: Blobstore upload issue (and difference between dev and prod)
Hi Guillaume , Why are you supplying WEB-INF path? blobstore.createUploadUrl should contain a servlet path instead. Implementing blobstore is quite simple and you just need to create a sevlet and provide its url in this method. I have noticed certain differences in using blobstore service in local and production environment. Can you try using a servlet path in blobstore.createUploadUrl method. Thanks Romesh On Sat, Sep 25, 2010 at 7:26 PM, Guillaume Laforge glafo...@gmail.comwrote: On Sat, Sep 25, 2010 at 15:50, Guillaume Laforge glafo...@gmail.com wrote: [...] I've got a form like this: form id=upload-form action=${blobstore.createUploadUrl('/WEB-INF/groovy/handleUpload.groovy')} method=post enctype=multipart/form-data accept-charset=UTF-8 Which is using the blobstore.createUploadUrl(). And for example, here, the created URL is that: http://my-app-id.appspot.com/_ah/upload/AMmfu6a3fot9P9ypjQFlbboc2FI9nksgTAPyWUZBv1JvrFiQ_B2gwMox-pB5nBEjf_FECuellPvCoACUHTLLWlGFKxWeNSLbFbAMhnnLUeHzbbaxdbYy5FhNpD0KJSf7kCMmlGaTwByV/ALBNUaYATJ365Aa_jKXPT2sGR8J7myfzSYTY24e2/ Which corresponds to the 404 I get in my browser for... [...] http://my-app-id.appspot.com/_ah/upload/AMmfu6a3fot9P9ypjQFlbboc2FI9nksgTAPyWUZBv1JvrFiQ_B2gwMox-pB5nBEjf_FECuellPvCoACUHTLLWlGFKxWeNSLbFbAMhnnLUeHzbbaxdbYy5FhNpD0KJSf7kCMmlGaTwByV/ALBNUaYATJ365Aa_jKXPT2sGR8J7myfzSYTY24e2/ [...] -- Guillaume Laforge Groovy Project Manager Head of Groovy Development at SpringSource http://www.springsource.com/g2one -- 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.
Re: [appengine-java] Re: Blobstore upload issue (and difference between dev and prod)
Thats great to hear. Thanks Romesh On Sat, Sep 25, 2010 at 10:28 PM, Guillaume Laforge glafo...@gmail.comwrote: Hi Romesh, On Sat, Sep 25, 2010 at 18:06, romesh soni soni.rom...@gmail.com wrote: Hi Guillaume , Why are you supplying WEB-INF path? I'm using Gaelyk, and I can reference the groovlets (ie. Groovy scripts which are served by a Servlet) using their path. Interestingly, it was working totally fine that way. The Groovlet servlet catches all the *.groovy URIs and finds the script to call itself, and using WEB-INF or not didn't really matter... at least locally. And as you gave me that hint... I tried using the path /handleUpload.groovy (which will search in /WEB-INF/groovy anyway), and it worked both locally and on app engine!!! Thanks a lot for that hint :-) blobstore.createUploadUrl should contain a servlet path instead. The nice thing about Gaelyk is that you just write scripts, you don't have to write servlets per se. And the URL I was using was of the form *.groovy, which were to be handled by the main Groovlet servlet. Implementing blobstore is quite simple and you just need to create a sevlet and provide its url in this method. I have noticed certain differences in using blobstore service in local and production environment. This is indeed a bit painful those differences, as you can spend a lot of time wondering what's going on without really figuring out :-( I hope in the future, such differences will go away! What other differences have you spotted? Can you try using a servlet path in blobstore.createUploadUrl method. Using /handleUpload.groovy which is taken care of by the main servlet worked fine. Thanks for your help :-) Guillaume Thanks Romesh On Sat, Sep 25, 2010 at 7:26 PM, Guillaume Laforge glafo...@gmail.com wrote: On Sat, Sep 25, 2010 at 15:50, Guillaume Laforge glafo...@gmail.com wrote: [...] I've got a form like this: form id=upload-form action=${blobstore.createUploadUrl('/WEB-INF/groovy/handleUpload.groovy')} method=post enctype=multipart/form-data accept-charset=UTF-8 Which is using the blobstore.createUploadUrl(). And for example, here, the created URL is that: http://my-app-id.appspot.com/_ah/upload/AMmfu6a3fot9P9ypjQFlbboc2FI9nksgTAPyWUZBv1JvrFiQ_B2gwMox-pB5nBEjf_FECuellPvCoACUHTLLWlGFKxWeNSLbFbAMhnnLUeHzbbaxdbYy5FhNpD0KJSf7kCMmlGaTwByV/ALBNUaYATJ365Aa_jKXPT2sGR8J7myfzSYTY24e2/ Which corresponds to the 404 I get in my browser for... [...] http://my-app-id.appspot.com/_ah/upload/AMmfu6a3fot9P9ypjQFlbboc2FI9nksgTAPyWUZBv1JvrFiQ_B2gwMox-pB5nBEjf_FECuellPvCoACUHTLLWlGFKxWeNSLbFbAMhnnLUeHzbbaxdbYy5FhNpD0KJSf7kCMmlGaTwByV/ALBNUaYATJ365Aa_jKXPT2sGR8J7myfzSYTY24e2/ [...] -- Guillaume Laforge Groovy Project Manager Head of Groovy Development at SpringSource http://www.springsource.com/g2one -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Guillaume Laforge Groovy Project Manager Head of Groovy Development at SpringSource http://www.springsource.com/g2one -- 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.
Re: [appengine-java] JDO - Update Partial Attributes In a Persistent Object
Hi Luka, How are you updating the object without having a reference of actual object to be updated. In such case, you should be first retrieving the actual object from db and then change the attributes and then save that object. This process doesn't result in any loss of data and you get what you want. Thanks Romesh On Thu, Sep 23, 2010 at 5:40 PM, luka uluk...@gmail.com wrote: Hi, I have some JDO persistent objects which contains lots of attributes. So in some cases I use specific Fetch Groups and retrieve only some attributes which are relevant. In these cases when I change the attributes which I retrieved and try to update them the rest of the attributes (which I did not retrieved) are being reset to null. Can I update only partial attributes in a JDO persisted object? -- 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.
Re: [appengine-java] Re: session management
Hi Stephan, Is that possible that a client had closed the browser and opens a new browser and we can still identify the client using session cookies? Thanks Romesh On Thu, May 27, 2010 at 10:42 PM, Stephan Hartmann hartm...@metamesh.dewrote: Keep in mind that sessions managed by the servlet container expire after a specific time of inactivity on the server side, so if a user comes back after a while with his old session cookie, he will still get a new session. According to the servlet spec, you can obtain this value with HttpSession.getMaxInactiveInterval() and change it with HttpSession.setMaxInactiveInterval(int), with a value of -1 meaning never to expire. Regards, Stephan 2010/5/27 lembas keremo...@gmail.com thanks romesh. I was on vacation did not see your message. sorry for a late answer. I do not use cookies for managing session. Google does. JESSIONID cookies is created on server by App Engine anyway. I just extend its expiration date. Is it possible to implement remember me functionality without cookies? On May 3, 11:22 am, romesh soni soni.rom...@gmail.com wrote: Hey Ikai, sorry I referred you by mistake.. My msg was for lembas On Mon, May 3, 2010 at 1:23 PM, romesh soni soni.rom...@gmail.com wrote: Hi Ikai, the way you are managing session is not good. actually you are using cookies for managing session, which is not a good thing. instead session management is done at server side, not client side. On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) ika...@google.com wrote: I'm not sure how this mitigates use of the _ah_session records that are created. Anytime you set an attribute, it will use this. If you're worried about _ah_session getting out of control, a better way would be to use Memcache for session data and associate it with a cookie. Stale, unused session data will be automatically expired. The advantage of using the built in sessions is that since they are backed by both Memcache and the datastore, they're going to be less volatile. On Sun, May 2, 2010 at 8:46 AM, lembas keremo...@gmail.com wrote: I have couple of questions about session management. I use GWT+GAE. I do not want my _ah_sessions table to be out of control. I do not want to generate unnecessary sessions. I have sessions-enabledtrue/sessions-enabled in my appengine- web.xml. 1.I have the following code at the beginning of my onModuleLoad() method, is it ok? String sessionid = Cookies.getCookie(JSESSIONID); if (sessionid != null) { Date now = new Date(); Date expires = new Date(now.getTime() + (long) 1000 * 60 * 60 * 24 * 365); Cookies.setCookie(JSESSIONID, sessionid, expires); } 2.After the user sends his/her usernamepassword to the server for the first time (i.e. with a new JSESSIONID cookie), I get that user object from database and if I have it, I save it using: getThreadLocalRequest().getSession().setAttribute(user, user); and send it to the client as a sign of a succesful login. So next time client visits the site with the same JSESSIONID I can get the user object directly by: getThreadLocalRequest().getSession().getAttribute(user); --- Is it ok how I use the sesssion management? Is it true that every request comes with the same JSESSIONID (unless client deleted it deliberately), no new session is created on server and server do not need to access database to get the user object? -- 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 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. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google
Re: [appengine-java] Re: session management
Hi Keremonal, As my practice I don't depend on Cookies for session management, because if cookie is disabled at client browser then you will always get a new session id and your data which was previously stored in session gets lost. As I think _ahsession is a very good thing for session mgmt. The only concern we see with it is its growing size. I would suggest you to use _ahsession for session mgmt and create a cron job to automatically delete session entries from _ahsession: public class SessionCleanup extends StandardServlet { private static final long serialVersionUID = 7896915936685966869L; private static final Logger logger = Logger.getLogger(SessionCleanup.class.getName()); private Cache cache = null; private static final String EXPIRES = _expires; @Override public void init() throws ServletException { try { final CacheFactory cacheFactory = CacheManager.getInstance().getCacheFactory(); cache = cacheFactory.createCache(Collections.emptyMap()); } catch (final CacheException e) { logger.log(Level.SEVERE, failed to configure cache, e); } } @Override protected void processRequest(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final long now = new Date().getTime(); final DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); final Query query = new Query(_ah_SESSION); // TODO make this a task for (final Entity session : datastore.prepare(query).asIterable(FetchOptions.Builder.withLimit(100))) { Long expires = (Long) session.getProperty(EXPIRES); if (expires now) { final Key key = session.getKey(); datastore.delete(key); final StringBuilder sb = new StringBuilder(Removed session with expiration ).append((new Date(expires)).toString()); if (cache != null) if (cache.containsKey(key.getName())) { cache.remove(key.getName()); sb.append(, also from memcache); } logger.log(Level.INFO, sb.toString()); } } } } Thanks Romesh On Thu, May 27, 2010 at 1:28 PM, lembas keremo...@gmail.com wrote: thanks romesh. I was on vacation did not see your message. sorry for a late answer. I do not use cookies for managing session. Google does. JESSIONID cookies is created on server by App Engine anyway. I just extend its expiration date. Is it possible to implement remember me functionality without cookies? On May 3, 11:22 am, romesh soni soni.rom...@gmail.com wrote: Hey Ikai, sorry I referred you by mistake.. My msg was for lembas On Mon, May 3, 2010 at 1:23 PM, romesh soni soni.rom...@gmail.com wrote: Hi Ikai, the way you are managing session is not good. actually you are using cookies for managing session, which is not a good thing. instead session management is done at server side, not client side. On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) ika...@google.com wrote: I'm not sure how this mitigates use of the _ah_session records that are created. Anytime you set an attribute, it will use this. If you're worried about _ah_session getting out of control, a better way would be to use Memcache for session data and associate it with a cookie. Stale, unused session data will be automatically expired. The advantage of using the built in sessions is that since they are backed by both Memcache and the datastore, they're going to be less volatile. On Sun, May 2, 2010 at 8:46 AM, lembas keremo...@gmail.com wrote: I have couple of questions about session management. I use GWT+GAE. I do not want my _ah_sessions table to be out of control. I do not want to generate unnecessary sessions. I have sessions-enabledtrue/sessions-enabled in my appengine- web.xml. 1.I have the following code at the beginning of my onModuleLoad() method, is it ok? String sessionid = Cookies.getCookie(JSESSIONID); if (sessionid != null) { Date now = new Date(); Date expires = new Date(now.getTime() + (long) 1000 * 60 * 60 * 24 * 365); Cookies.setCookie(JSESSIONID, sessionid, expires); } 2.After the user sends his/her usernamepassword to the server for the first time (i.e. with a new JSESSIONID cookie), I get that user object from database and if I have it, I save it using: getThreadLocalRequest().getSession().setAttribute(user, user); and send it to the client as a sign
Re: [appengine-java] Re: session management
Cookies are the most suitable thing for the remember me functionality best works. Because sessions end with the end of browser window and cookies still survive (if specified long life) Romesh On Thu, May 27, 2010 at 1:28 PM, lembas keremo...@gmail.com wrote: thanks romesh. I was on vacation did not see your message. sorry for a late answer. I do not use cookies for managing session. Google does. JESSIONID cookies is created on server by App Engine anyway. I just extend its expiration date. Is it possible to implement remember me functionality without cookies? On May 3, 11:22 am, romesh soni soni.rom...@gmail.com wrote: Hey Ikai, sorry I referred you by mistake.. My msg was for lembas On Mon, May 3, 2010 at 1:23 PM, romesh soni soni.rom...@gmail.com wrote: Hi Ikai, the way you are managing session is not good. actually you are using cookies for managing session, which is not a good thing. instead session management is done at server side, not client side. On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) ika...@google.com wrote: I'm not sure how this mitigates use of the _ah_session records that are created. Anytime you set an attribute, it will use this. If you're worried about _ah_session getting out of control, a better way would be to use Memcache for session data and associate it with a cookie. Stale, unused session data will be automatically expired. The advantage of using the built in sessions is that since they are backed by both Memcache and the datastore, they're going to be less volatile. On Sun, May 2, 2010 at 8:46 AM, lembas keremo...@gmail.com wrote: I have couple of questions about session management. I use GWT+GAE. I do not want my _ah_sessions table to be out of control. I do not want to generate unnecessary sessions. I have sessions-enabledtrue/sessions-enabled in my appengine- web.xml. 1.I have the following code at the beginning of my onModuleLoad() method, is it ok? String sessionid = Cookies.getCookie(JSESSIONID); if (sessionid != null) { Date now = new Date(); Date expires = new Date(now.getTime() + (long) 1000 * 60 * 60 * 24 * 365); Cookies.setCookie(JSESSIONID, sessionid, expires); } 2.After the user sends his/her usernamepassword to the server for the first time (i.e. with a new JSESSIONID cookie), I get that user object from database and if I have it, I save it using: getThreadLocalRequest().getSession().setAttribute(user, user); and send it to the client as a sign of a succesful login. So next time client visits the site with the same JSESSIONID I can get the user object directly by: getThreadLocalRequest().getSession().getAttribute(user); --- Is it ok how I use the sesssion management? Is it true that every request comes with the same JSESSIONID (unless client deleted it deliberately), no new session is created on server and server do not need to access database to get the user object? -- 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 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. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 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%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en
Re: [appengine-java] session-enabled false and JSESSIONID
hello Sergio * * *This is not an issue. disabling session id in code will not stop the cookie from saving session id. When you enable session in app engine xml file than you are telling the framework that you don't want to save sessions in cookies (client side), instead you want to save them on server i.e. using _ah_session. Cookies JSession id is default behavior of Java session mgmt. And it is nothing to do with APP engine framework.* * * *thanks* *romesh* * * On Mon, May 17, 2010 at 11:19 AM, Sergio Lopes slo...@gmail.com wrote: Hi everybody I'm trying to make a completely stateless application. I configured session-enabled to false and it seems that sessions are not being created in server side (the datastore _ah_session table is not growing anymore). But all requests are setting the JSESSIONID cookie. Why? There is no session support... Is this a bug? Should I fill this in issue tracker? Thanks Sérgio -- 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.
Re: [appengine-java] Multilingual storing data
Are you sure the data is getting in proper format to the sever for getting saved? I mean have you used the utf-8 specification for your pages? Romesh On Fri, May 7, 2010 at 2:59 PM, Henry enricrequ...@gmail.com wrote: Hi Guys, I've a simple question, I'm using Java App Engine and I need to store multilingual data like 'ñ' character. Storing it as a unicode String, when I retrieve it, I'm getting the following one '?'. Does any one know how to store them? I need to store data with different languages. Thanks in advance. -- 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.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hey Tristan, Seems you have got it solved. Thanks. I think it should work for me without any issues. I will let you know once I implement it. You have a good logic man. Can I add you on Gmail? Thanks and Regards Romesh On Tue, May 4, 2010 at 7:08 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Yes, but then you just do a test on the entity you got from the query (one test on one entity, fast) so add a last step.. using previous logic you end up with x2=71 y2=75 final step will beis (z of 76) (y2 of 75) if no... no results.. if yes... have 1 result that should solve that part On Tue, May 4, 2010 at 02:04, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, Really appreciate the logic you suggested. But consider this case: There are only two intervals in db: x1 = 4 y1 = 70 and x2 = 71 y2 = 75. I want to search by 76. The 76 doesn't fall in any category but still the query will return the second interval, which is not correct. Instead the query should say that there is no matching interval. Am I correct? Regards Romesh On Tue, May 4, 2010 at 11:09 AM, Tristan Slominski tristan.slomin...@gmail.com wrote: in that case the solution to your dilemma is as follows query.addFilter(x, FilterOptions.LESS_THAN, z); query.addSort(x, SortOrder.DESC); then execute the query with a limit of 1 that is the answer you seek in other words... assume you have two intervalsx1 = 4 y1 = 70 and x2 = 71 y2 = 75. you want to find interval that matches your condition ofx 74 y add filter for x less than 74 will give you two results where x1=4 in first result and x2=71 in second result now sort these results descending so that x2 is the first result x2=71 x1=4 set limit of 1 gives your query a result of x2 you don't need property y does that work for you? On Mon, May 3, 2010 at 22:45, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- 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.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.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
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Thomas, it is possible to pre-determine the solution list for given lower and upper bounds x and y. But there can be enormous rows for a given (x,y) pair. And there will be enormous rows containing (x,y) pairs. So I can not keep a predetermined list. Regards Romesh On Mon, May 3, 2010 at 5:52 AM, Thomas mylee...@gmail.com wrote: I can't imagine what your data is. Is it possible to pre-solve the solution list z for every (x, y) pair and store them like (x, y, list of z). If it is the case, you can use a simple z=somevalue filter to get your single result. Thomas On 5月2日, 下午4時57分, romesh soni soni.rom...@gmail.com wrote: Tristan, sorry for the mistake. I wrote the wrong thing ( I realized this at night when I went to bed for sleep) It is field1=1000=field2. A given value will always be between the lower and upper bound (field1 and field2). Thanks Romesh On Sun, May 2, 2010 at 11:20 AM, Tristan tristan.slomin...@gmail.com wrote: did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- 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 google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@googlegroups.com google-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// 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%2bunsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@googlegroups.com google-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 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 google-appengine
Re: [appengine-java] session management
Hi Ikai, the way you are managing session is not good. actually you are using cookies for managing session, which is not a good thing. instead session management is done at server side, not client side. On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) ika...@google.com wrote: I'm not sure how this mitigates use of the _ah_session records that are created. Anytime you set an attribute, it will use this. If you're worried about _ah_session getting out of control, a better way would be to use Memcache for session data and associate it with a cookie. Stale, unused session data will be automatically expired. The advantage of using the built in sessions is that since they are backed by both Memcache and the datastore, they're going to be less volatile. On Sun, May 2, 2010 at 8:46 AM, lembas keremo...@gmail.com wrote: I have couple of questions about session management. I use GWT+GAE. I do not want my _ah_sessions table to be out of control. I do not want to generate unnecessary sessions. I have sessions-enabledtrue/sessions-enabled in my appengine- web.xml. 1.I have the following code at the beginning of my onModuleLoad() method, is it ok? String sessionid = Cookies.getCookie(JSESSIONID); if (sessionid != null) { Date now = new Date(); Date expires = new Date(now.getTime() + (long) 1000 * 60 * 60 * 24 * 365); Cookies.setCookie(JSESSIONID, sessionid, expires); } 2.After the user sends his/her usernamepassword to the server for the first time (i.e. with a new JSESSIONID cookie), I get that user object from database and if I have it, I save it using: getThreadLocalRequest().getSession().setAttribute(user, user); and send it to the client as a sign of a succesful login. So next time client visits the site with the same JSESSIONID I can get the user object directly by: getThreadLocalRequest().getSession().getAttribute(user); --- Is it ok how I use the sesssion management? Is it true that every request comes with the same JSESSIONID (unless client deleted it deliberately), no new session is created on server and server do not need to access database to get the user object? -- 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. -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastore allows multi-value property. So you can have each (x,y, list of possible z) in only one row and the filter is as simple as where z=some-value. The only limitation is that list-of-z can not exceed 5000 elements. Thomas On 5月3日, 下午2時02分, romesh soni soni.rom...@gmail.com wrote: Thomas, it is possible to pre-determine the solution list for given lower and upper bounds x and y. But there can be enormous rows for a given (x,y) pair. And there will be enormous rows containing (x,y) pairs. So I can not keep a predetermined list. -- 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.
Re: [appengine-java] session management
Hey Ikai, sorry I referred you by mistake.. My msg was for lembas On Mon, May 3, 2010 at 1:23 PM, romesh soni soni.rom...@gmail.com wrote: Hi Ikai, the way you are managing session is not good. actually you are using cookies for managing session, which is not a good thing. instead session management is done at server side, not client side. On Mon, May 3, 2010 at 1:18 PM, Ikai L (Google) ika...@google.com wrote: I'm not sure how this mitigates use of the _ah_session records that are created. Anytime you set an attribute, it will use this. If you're worried about _ah_session getting out of control, a better way would be to use Memcache for session data and associate it with a cookie. Stale, unused session data will be automatically expired. The advantage of using the built in sessions is that since they are backed by both Memcache and the datastore, they're going to be less volatile. On Sun, May 2, 2010 at 8:46 AM, lembas keremo...@gmail.com wrote: I have couple of questions about session management. I use GWT+GAE. I do not want my _ah_sessions table to be out of control. I do not want to generate unnecessary sessions. I have sessions-enabledtrue/sessions-enabled in my appengine- web.xml. 1.I have the following code at the beginning of my onModuleLoad() method, is it ok? String sessionid = Cookies.getCookie(JSESSIONID); if (sessionid != null) { Date now = new Date(); Date expires = new Date(now.getTime() + (long) 1000 * 60 * 60 * 24 * 365); Cookies.setCookie(JSESSIONID, sessionid, expires); } 2.After the user sends his/her usernamepassword to the server for the first time (i.e. with a new JSESSIONID cookie), I get that user object from database and if I have it, I save it using: getThreadLocalRequest().getSession().setAttribute(user, user); and send it to the client as a sign of a succesful login. So next time client visits the site with the same JSESSIONID I can get the user object directly by: getThreadLocalRequest().getSession().getAttribute(user); --- Is it ok how I use the sesssion management? Is it true that every request comes with the same JSESSIONID (unless client deleted it deliberately), no new session is created on server and server do not need to access database to get the user object? -- 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. -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- 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.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Tristan, sorry for the mistake. I wrote the wrong thing ( I realized this at night when I went to bed for sleep) It is field1=1000=field2. A given value will always be between the lower and upper bound (field1 and field2). Thanks Romesh On Sun, May 2, 2010 at 11:20 AM, Tristan tristan.slomin...@gmail.comwrote: did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- 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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// 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%2bunsubscr...@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 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 athttp:// 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%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: Inequality Filters Are Allowed On One Property Only
Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- 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: Inequality Filters Are Allowed On One Property Only
OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- 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 athttp:// 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%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.