So this boils down to JCache (google memory) vs Persistent storage (google disks), right?
Does this pattern work instead? 1. Query Amazon for what you need 2. Store results using a persistent storage http://code.google.com/appengine/docs/java/datastore/ Example: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Making_Objects_Persistent) PersistenceManager pm = PMF.get().getPersistenceManager(); Employee e = new Employee("Alfred", "Smith", new Date()); try { pm.makePersistent(e); } finally { pm.close(); } 3. Read from the persistent storage. If this is slow (I have no idea) you could then use JCache to cache (on each google server instance hosting an instance of your class) the persistent storage result the same way you do now On Oct 28, 10:37 am, kousen <[email protected]> wrote: > I'll definitely turn on logging and try to see what's going on. > > Thanks, > > Ken > > On Oct 28, 4:18 am, leszek <[email protected]> wrote: > > > > > It looks ok, the only problem I can see that something can happen > > between storing book in cache and getting book from cache. > > Scenario like: > > 1) fetch book from Amazon and store in cache. > > 2) book expires in Amazon (or any other event happens) > > 3) next request - get data from cache - you return status of the book > > at the point 1), not the point 2). > > > But maybe this problem does not matter very much. > > > If you want to see if it is working simply use logging and watch the > > log entries.http://code.google.com/intl/pl/appengine/docs/java/runtime.html > > > I don't know if there is any method of sending request simultaneously > > - maybe Amazon API supports some king of "batch requests" - but I'm > > guessing only.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
