[appengine-java] Re: Caching using static fields
You're welcome to file a feature request, although for the time being, memcache and the datastore will remain the only mechanisms for communicating across all instances of a running application. http://code.google.com/p/googleappengine/issues/list - Jason On Tue, Oct 20, 2009 at 10:20 PM, Adligo sc...@adligo.com wrote: Hi All, I also struggled with this topic a bit, and I am wondering why the google app engine doesn't have some api like; GWT RPC? public MachineMacOrSomething getRAMSessionMachineIdString session); regular http myapp.appspot.com/whatRAMSessionMachineId?jsessionId=/xyz It would also solve the issue of storing Sessions to disk on each request, which really doesn't seem all that efficient (having used it for a month or so). For GWT( and other ajax) apps this would provide a simple way of using a Session and Static Cacheing the way it is usually done in Java App Servers (have seen static caching in a few Tomcat projects, Jboss and Tomcat keep the HttpSession in RAM). Perhaps there would also be a appengine-web.xml setting ram-session so that the older disk session impl would not need to be changed. GWT RPC itself may need also be upgraded to be compatible with the idea, including the MachineId somewhere for routing in the google app engine code. Cheers, Scott --~--~-~--~~~---~--~~ 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] Re: Caching using static fields
Hi All, I also struggled with this topic a bit, and I am wondering why the google app engine doesn't have some api like; GWT RPC? public MachineMacOrSomething getRAMSessionMachineIdString session); regular http myapp.appspot.com/whatRAMSessionMachineId?jsessionId=/xyz It would also solve the issue of storing Sessions to disk on each request, which really doesn't seem all that efficient (having used it for a month or so). For GWT( and other ajax) apps this would provide a simple way of using a Session and Static Cacheing the way it is usually done in Java App Servers (have seen static caching in a few Tomcat projects, Jboss and Tomcat keep the HttpSession in RAM). Perhaps there would also be a appengine-web.xml setting ram-session so that the older disk session impl would not need to be changed. GWT RPC itself may need also be upgraded to be compatible with the idea, including the MachineId somewhere for routing in the google app engine code. Cheers, Scott --~--~-~--~~~---~--~~ 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] Re: Caching using static fields
What about using memcache as keeping cache version counter ? When update is needed than this counter is increased. Every requests keeps local number and at the beginning compare local counter against memcache counter. If not equal than refresh local cache and local cache number. If memcache counter if not available (expired) than assume it as equal 0 and behave accordingly. It could mean unnecessary cache refreshing from time to time if memcache expires. --~--~-~--~~~---~--~~ 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] Re: Caching using static fields
Thanks leszek, I agree that keeping an indicator in memcache is much better than keeping the data itself there. I was trying to avoid checking memcache on every request, but I guess there is no way around that :) On Oct 19, 10:11 am, leszek leszek.ptokar...@gmail.com wrote: What about using memcache as keeping cache version counter ? When update is needed than this counter is increased. Every requests keeps local number and at the beginning compare local counter against memcache counter. If not equal than refresh local cache and local cache number. If memcache counter if not available (expired) than assume it as equal 0 and behave accordingly. It could mean unnecessary cache refreshing from time to time if memcache expires. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---