Reputation: 705
Is it possible to combine all requests received in a period (say, 1 second) and serve them in a batch.
Basically, I am looking for a way to handle a list of 'http servlet request response' maps, instead of serving each and every req-resp pair separately. I hope, HttpServletReqRespMapList abstraction could share common state and it would be useful in appengine environment.
Please share, any ideas, or known implementations, ideal way to implement this in google appengine environment.
Upvotes: 0
Views: 150
Reputation: 650
I think you want to implement some caching using such mapping and reduce cost. If ti is true than you should look to other approaches.
Batch processing is not natural for Java Web application. Usually the problem could be solved in another way.
If you need common state between requests than problem becomes more complex. AppEngine architecture is based on instance-on-demand concept. So you do not have any guaranty which instance will process your request. And this mean that you can not have shared static data. So the state could be shared only using some persistent storage like DataStore/MemCache or even some FileService. But be careful when you use it, because you must consider latency of each technology.
The last reason for such architecture I see is some workflow you need to implement based on requests received. If you need some workflow you should take a look to http://code.google.com/p/appengine-pipeline/ which allow to have execution flow control for Task API.
Upvotes: 2
Reputation: 101149
No, it's not, and the servlet standard doesn't provide any mechanism for this in any case.
Why would you want to do this?
Upvotes: 1