Re: [google-appengine] Re: Memcache expiration

2013-06-04 Thread Vinny P
On Monday, June 3, 2013 9:18:14 AM UTC-5, Pertti Kellomäki wrote:

 In my case the memcache entry reflects what would be the result of a 
 particular datastore query, so if the entry is purged the datastore query 
 can always be run.


That is exactly the recommended best practice way to use the memcache + 
datastore, so your implementation is great!

-
-Vinny P
Technology  Media Advisor
Chicago, IL

My Go side project: http://invalidmail.com/

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Memcache expiration

2013-06-04 Thread Pertti Kellomäki
Glad to hear that ;-)

Pertti


On Tue, Jun 4, 2013 at 5:55 PM, Vinny P vinny...@gmail.com wrote:

 On Monday, June 3, 2013 9:18:14 AM UTC-5, Pertti Kellomäki wrote:

 In my case the memcache entry reflects what would be the result of a
 particular datastore query, so if the entry is purged the datastore query
 can always be run.


 That is exactly the recommended best practice way to use the memcache +
 datastore, so your implementation is great!

 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 My Go side project: http://invalidmail.com/

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-appengine+unsubscr...@googlegroups.com.
 To post to this group, send email to google-appengine@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Memcache expiration

2013-06-03 Thread Pertti Kellomäki
Thanks. In my case the memcache entry reflects what would be the result of
a particular datastore query, so if the entry is purged the datastore query
can always be run.

Pertti


On Mon, Jun 3, 2013 at 4:48 PM, timh zutes...@gmail.com wrote:

 The main thing to remember is memcache on appengine is not reliable,
 Despite any deadline you set, items in memcache can be purged/removed by
 google infrastructure at any point and you have no control over that.
  Having said that relatively short periods 30 minutes for expiration tend
 to be ok. Though some times apps have at times very short life spans for
 data in memcache

 T


 On Monday, June 3, 2013 9:08:01 PM UTC+8, Pertti Kellomäki wrote:

 Hi all,

 I have never used the app engine memcache before, so I would like to
 double check that I understand how expiration works.

 I maintain a bit of state in memcache for each client, and I want the
 state to hang around as long as the client is alive, but go away after
 that. Reading the docs suggests that expiration is solely determined by
 insertion/update operations, so my client does a periodic .cas() on the
 state to move the expiration deadline forward.

 Is this a sensible implementation on app engine? My app is in Python if
 that makes a difference.

 The background is that clients poll for new events posted on the server.
 New events are inserted in event queues in memcache for each client, with a
 fallback of reading the events from datastore.
 --
 Pertti

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-appengine+unsubscr...@googlegroups.com.
 To post to this group, send email to google-appengine@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.