On Thursday, June 6, 2013 4:27:59 AM UTC-5 wrote:
My app is using a in-memory list that is accessed very often by font-end
clients, my solution before was to use a static list. After gaining more
info on GAE I know now that this wont be good because each instance would
have it's own list (right?).
It depends on how you architect your application. Written correctly, all
instances can share a data list.
On Thursday, June 6, 2013 4:27:59 AM UTC-5 wrote:
So, are backends the best fit for that?
There's nothing wrong with frontend instances for this job. Backends are
more for long-running processes.
Before anyone can give you a definitive answer, you need to give some more
information about this problem. For instance, how many elements are in this
list? What is the size of each element? How are you moving this list from
the server to the client? How often does this list change?
You said this list was static, so I assume this list won't be changing
very often. In that case, you can use the memcache/datastore as Thiago
suggested: Put each list element as an entity in the datastore, and set a
cron to periodically pull a copy of the list and store it into memcache.
Then your front end instances can pull the data from memcache/datastore.
This way all your instances will share the same list.
If this list is changing very rarely, what you can do is store it as a file
in a Google Cloud Storage bucket, and configure the bucket as a website (
https://developers.google.com/storage/docs/website-configuration ).
Whenever you need to change the list, your application on AppEngine can
update the file: https://developers.google.com/storage/docs/xml-api-overview .
You're also saving money this way since there's much less instance hours
incurred.
-
-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.