Unable to store and retrieve data from Appengine Servlet Context

202 views
Skip to first unread message

Sateesh

unread,
Jul 27, 2011, 6:33:19 PM7/27/11
to Google App Engine, vtka...@google.com, sant...@google.com
Hi

Is there a way that i can use Servlet Context on Appengine.
Here is our scenario

We have GWT application
Client call a server method to get the xml data (which is around 5 mb)
Server method will prepare a map with a unique key and value as in
progress
Server will send request to another server (SERVER2) with key as
parameter
SERVER2 sends SUCCESS message after spanning a thread to fetch xml
from data store.
Client will use polling mechanism to see the status for this request
in Servelet context stored map
SEVER2 later post back the data to a servlet which will update the
value of a map in ServletContext
Client will pickup this and use in rendering

It seems that i am unable to store data in to Servlet Context in
Appengine.
In my case mem cache is not the right choice as my data is huge.
Please suggest how to over come this situation

Thanks
Sateesh

Ikai Lan (Google)

unread,
Jul 29, 2011, 10:38:35 AM7/29/11
to google-a...@googlegroups.com
I don't believe you can do this. The reason is that Servlet Context exists a 1:1 mapping per servlet container, and you may have multiple, load balanced JVMs up. You'll want to revisit Memcache, which is the closest thing to shared memory that you have available to you.

Ikai Lan 
Developer Programs Engineer, Google App Engine



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


Neill

unread,
Jun 21, 2015, 11:43:12 AM6/21/15
to google-a...@googlegroups.com, vtka...@google.com, sant...@google.com
You need to enable sessions in the appengine-web.xml,

<!-- HTTP Sessions are disabled by default. To enable HTTP sessions specify: -->
<sessions-enabled>true</sessions-enabled>

<!-- It's possible to reduce request latency by configuring your application 
to asynchronously write HTTP session data to the datastore: -->

<async-session-persistence enabled="true" />

<!-- With this feature enabled, there is a very small chance your app will 
Reply all
Reply to author
Forward
0 new messages