Re: [appengine-java] Global count down timer
@Jayr and @Ikai, thanks for the assistance! Actually, I cannot change this requirement because this is the core of the business. I don't really need synchronized clocks between application instances, but I need a unique global vision of a regressive timer, which can be reset at any time. That is, I need one or more timers that can be reset according to client's actions on the UI, and clients need to know every second what is the value of the timer and what happened in the previous second. I believe this is achievable on GAE since I found at least one product deployed on GAE which promises to implement the same kind of business... On Tue, Jun 28, 2011 at 1:14 AM, Ikai Lan (Google) ika...@google.comwrote: Precision of seconds can be tough, BTW, because syncing clocks is a tough problem that nobody has really solved. The mere act of making an RPC to a backend or Memcache can introduce skew simply because the latency is not predictable. Most of the time (99.999%) there shouldn't be an issue because latency will be in milliseconds, but anything can happen in a distributed environment. Depending on what it is you are doing, it may be simpler to change your product requirements. A little related: http://en.wikipedia.org/wiki/Lamport_timestamps Not that related but interesting: http://en.wikipedia.org/wiki/Uncertainty_principle 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 Tue, Jun 28, 2011 at 12:01 AM, jMotta jayrmo...@gmail.com wrote: Loreno, I don't know what you mean with global count down timer, if you want to trigger an action upon the end of the global count down you can use the * cron* implementation. Can you explain what is the use that you want with this? In low-level speaking, the only ways to share state across multiple instances / requests safety from concurrent access issues and given the cloud nature of it is use the datastore and memcache. *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.comhttp://www.blackbeltfactory.com/ui#%21User/jmotta/ref=jmotta ! On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Is it possible to implement a global count down timer in GAE/J? I would like an unique timer to be shared among all the application instances. The precision of the timer is seconds. Any idea? -- 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. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Global count down timer
Is it possible to implement a global count down timer in GAE/J? I would like an unique timer to be shared among all the application instances. The precision of the timer is seconds. Any idea? -- 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] Global count down timer
I thought on this, but I think this works fine only if I have just one running copy of my application. If I have two or more (because the workload can be high), they can be out of sync regarding their local clocks. Thus, requests that arrive at approximately the same time at the different instances, can get a different value to the second variable... On Mon, Jun 27, 2011 at 12:58 PM, Bruno Fuster brunofus...@gmail.comwrote: You could just put this countdown date into your cache (or even a static property if it won't change) and calculate the seconds easily using jodatime int seconds = Seconds.secondsBetween(new DateTime(), cache.get(countdownDate)).getSeconds(); After that, use javascript intervals to recalculate the countdown while the user is at your page instead of consuming some services on your back-end. On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Is it possible to implement a global count down timer in GAE/J? I would like an unique timer to be shared among all the application instances. The precision of the timer is seconds. Any idea? -- 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. -- Bruno Fuster -- 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.
Re: [appengine-java] Global count down timer
Sounds promising... Should say that I didn't know about the backend service so far. I'm starting with GAE, but with a non trivial problem, instead of a hello world :-) Now I just need to be able to update my timers in a second by second fashion (there are situations where I need to restart them). As far as I could see, Thread.sleep( 1000 ) should not be a problem... Thanks for the advice Bruno! On Mon, Jun 27, 2011 at 1:35 PM, Bruno Fuster brunofus...@gmail.com wrote: Right... I'm not sure but you could use the increment method from MemcacheService to atomically update this value each second from a single machine (backends) and read that from your dynamic instances constantly using ajax. http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#increment(java.lang.Object, long) On Mon, Jun 27, 2011 at 1:08 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: I thought on this, but I think this works fine only if I have just one running copy of my application. If I have two or more (because the workload can be high), they can be out of sync regarding their local clocks. Thus, requests that arrive at approximately the same time at the different instances, can get a different value to the second variable... On Mon, Jun 27, 2011 at 12:58 PM, Bruno Fuster brunofus...@gmail.comwrote: You could just put this countdown date into your cache (or even a static property if it won't change) and calculate the seconds easily using jodatime int seconds = Seconds.secondsBetween(new DateTime(), cache.get(countdownDate)).getSeconds(); After that, use javascript intervals to recalculate the countdown while the user is at your page instead of consuming some services on your back-end. On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Is it possible to implement a global count down timer in GAE/J? I would like an unique timer to be shared among all the application instances. The precision of the timer is seconds. Any idea? -- 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. -- Bruno Fuster -- 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. -- Bruno Fuster -- 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] Google plugin for Eclipse Indigo
I saw that google put a promoted download in the indigo download page ( http://www.eclipse.org/downloads/), but it seems that there isn't a google plugin version for Eclipse Indigo. Any schedule to unleash a new version of the plugin? -- 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] Flash/ajax file upload to blobstore?
Is it possible to use some enhanced component to upload files to blobstore? I'm playing with uploadify but facing problems to put it to work. I would like to be able to filter the kind of file before send it to blobstore, as well as the file size and maybe show some progress bar during the upload... -- 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: Which one is best for development...Spring Framework or Servlet Jsp....
What is a good/acceptable application load time? The load time of my application in run mode in the development environment gives me a good confidence of the real application load time on production environment? Loreno On Tue, Apr 19, 2011 at 5:18 PM, Marcel Overdijk marceloverd...@gmail.comwrote: No check out docs about Warmup requests: http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests On Apr 19, 1:18 pm, Nischal nischalshett...@gmail.com wrote: You mean you have reserved instances? IMO you would still need to take care of your load time as new instances are spun off when your traffic increases and if your load time is too much then it would lead to errors while spinning up new instances. -- 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.
Re: [appengine-java] Re: Detecting orphaned blobs in the Blobstore
Hi Didier, I'm not sure if I understand your idea. The get method you pointed is a method of a map that is retrieved by the getUploadedBlobs, from BlobstoreService right? If so, it only make sense to call getUploadedBlobs right after the blobstore redirect the request back to my application (according to the javadoc). Your idea is to store the blobs` keys regardless my form is stored or not? On Fri, Apr 8, 2011 at 1:27 AM, Didier Durand durand.did...@gmail.comwrote: Hi, You get the key of your blob via BlobKey blobKey = blobs.get(myFile) (see http://code.google.com/appengine/docs/java/blobstore/overview.html) So, I would personally store all the myFile ids that I distributed from the server side and in an asynchronous queue task would do to see if the get() above responds with a Key. If yes, you decide with other data if orphaned or not and delete appropriately. regards didier On Apr 7, 8:46 pm, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Hi there. One of the features of my application requires the upload of image files along with other data in a form. That is, my entity is composed of both some fileds (text, currency, dates, etc) and an image file. As far as I could see, to deal with the blob store service is a two phase process. In my case, I submit a form with both the image and the remaining data, this post is handled by the blob store service, which stores the image and redirects the request back to my application, with the blob key and the remaining data of the form. But, what happens if, by some reason, the remaining of the post data cannot be persisted by my application? In cases like that, how can I cope with orphaned blobs in the blob store? I took a look at the BlobstoreService API, but could not find any method that lists all the keys of persisted blobs. Actually, I have some ideas for detecting and deleting such orphan blobs, but I'm afraid I can be missing something obvious since I'm still starting with GAE. Any advice in this sense? Loreno -- 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] Detecting orphaned blobs in the Blobstore
Hi there. One of the features of my application requires the upload of image files along with other data in a form. That is, my entity is composed of both some fileds (text, currency, dates, etc) and an image file. As far as I could see, to deal with the blob store service is a two phase process. In my case, I submit a form with both the image and the remaining data, this post is handled by the blob store service, which stores the image and redirects the request back to my application, with the blob key and the remaining data of the form. But, what happens if, by some reason, the remaining of the post data cannot be persisted by my application? In cases like that, how can I cope with orphaned blobs in the blob store? I took a look at the BlobstoreService API, but could not find any method that lists all the keys of persisted blobs. Actually, I have some ideas for detecting and deleting such orphan blobs, but I'm afraid I can be missing something obvious since I'm still starting with GAE. Any advice in this sense? Loreno -- 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] Jetty terminating just after starting (Eclipse SDK)
Update done and Jetty up and running... Thanks again... On Fri, Apr 1, 2011 at 2:08 AM, Toby Reyelts to...@google.com wrote: There should be an update available for you on the 1st. (Not an April fools joke). On Thu, Mar 31, 2011 at 8:31 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Thanks for the hint Toby. How can I update the SDK manually? The Helios update site is not updated with the 1.4.3 version... On Thu, Mar 31, 2011 at 4:41 PM, Toby Reyelts to...@google.com wrote: Please update to the latest App Engine SDK. It has a workaround for this issue with Apple's latest JVM update. On Thu, Mar 31, 2011 at 3:03 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Hi there, I'm new to GAE/J, so I'm starting with a bulk of silly questions... Well, my Jetty seems to be terminating just after starting... That is, in Eclipse, I right click the project Run as Web Application. The output is printed in the terminal, as normal and without any error: 2011-03-31 16:01:25.594 java[58217:903] [Java CocoaComponent compatibility mode]: Enabled 2011-03-31 16:01:25.596 java[58217:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.10 Mar 31, 2011 7:01:25 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/appengine-web.xml Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/web.xml log4j:WARN No appenders could be found for logger (br.com.caelum.vraptor.config.BasicConfiguration). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfigfor more info. Mar 31, 2011 4:01:29 PM com.google.appengine.tools.development.DevAppServerImpl start INFO: The server is running at http://localhost:/ However, the process dies two or three seconds after the last previous message be printed... Any idea of what is going wrong here? -- 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] Jetty terminating just after starting (Eclipse SDK)
Hi there, I'm new to GAE/J, so I'm starting with a bulk of silly questions... Well, my Jetty seems to be terminating just after starting... That is, in Eclipse, I right click the project Run as Web Application. The output is printed in the terminal, as normal and without any error: 2011-03-31 16:01:25.594 java[58217:903] [Java CocoaComponent compatibility mode]: Enabled 2011-03-31 16:01:25.596 java[58217:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.10 Mar 31, 2011 7:01:25 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/appengine-web.xml Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/web.xml log4j:WARN No appenders could be found for logger (br.com.caelum.vraptor.config.BasicConfiguration). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Mar 31, 2011 4:01:29 PM com.google.appengine.tools.development.DevAppServerImpl start INFO: The server is running at http://localhost:/ However, the process dies two or three seconds after the last previous message be printed... Any idea of what is going wrong here? -- 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] Jetty terminating just after starting (Eclipse SDK)
Thanks for the hint Toby. How can I update the SDK manually? The Helios update site is not updated with the 1.4.3 version... On Thu, Mar 31, 2011 at 4:41 PM, Toby Reyelts to...@google.com wrote: Please update to the latest App Engine SDK. It has a workaround for this issue with Apple's latest JVM update. On Thu, Mar 31, 2011 at 3:03 PM, lorenoolive...@gmail.com lorenoolive...@gmail.com wrote: Hi there, I'm new to GAE/J, so I'm starting with a bulk of silly questions... Well, my Jetty seems to be terminating just after starting... That is, in Eclipse, I right click the project Run as Web Application. The output is printed in the terminal, as normal and without any error: 2011-03-31 16:01:25.594 java[58217:903] [Java CocoaComponent compatibility mode]: Enabled 2011-03-31 16:01:25.596 java[58217:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.10 Mar 31, 2011 7:01:25 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/appengine-web.xml Mar 31, 2011 7:01:26 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml INFO: Successfully processed /Users/lorenooliveira/dev/workspaces/pennypile/PennyPileEngine/war/WEB-INF/web.xml log4j:WARN No appenders could be found for logger (br.com.caelum.vraptor.config.BasicConfiguration). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Mar 31, 2011 4:01:29 PM com.google.appengine.tools.development.DevAppServerImpl start INFO: The server is running at http://localhost:/ However, the process dies two or three seconds after the last previous message be printed... Any idea of what is going wrong here? -- 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.