Hi Bruce,

1. Why do you want to transport all the data to the front end in the
first place?
usually, a user can take only so much data at a time. How about using
paging?

2. If you request data from the back end, you get all the results you
asked for, so
your approach #1 is the common scenario. If you apply paging here,
there should be no
problem anymore.

3. Your approach #2 is also possible. You can use channels to do what
you think about.
A Channel is basically an abstraction for a polling front end.
The programming model allows you to realize a "push" server
communication.
Whether that is a good idea is up to you ;-)
-> see 
http://code.google.com/intl/de-DE/appengine/docs/java/channel/overview.html

greetz
:ollix


On 10 Jun., 12:18, Bruce Aloe <brucea...@gmail.com> wrote:
> Hello,
>
> I have a system with client-server architecture. The client is
> actually some java code and the server is some python code running in
> GAE. When i need to query the kind (table) i defined in GAE data
> store, i actually call a java function and it takes the query (e.g
> select * from Person where age < 90) and send the query to the server
> (some python code) through a http request. The server get and run the
> query and finally generate the whole result tuples. Then the whole
> result tuples will be sent back by server through a http response to
> the client. Finally the client will print out the result tuples.
>
> As you can see, the whole system architecture is just that the client
> sends a http request with query and the server returns the query
> result in just a http response. However, this will not work when the
> result tuples are too big (e.g 500MB data) so that a http response can
> not bring the whole result tuples back to the client.
>
> I have two ideas for this problems:
> 1 Let the client recursively sending the query and cursor information
> through a http request to server and the server generates partial
> result tuples for every http request and returns the partial result
> tuples back to the client through a http response. As you can imagine,
> there will be many http requests sending from client and many http
> response sending back from the server.
>
> 2 Let the client sending the query only once to server and the server
> recursively generate partial result tuples each time and send these
> partial result tuples back to client. As you can imagine, there will
> be just one http request sending from client and many http response
> sending back to the server. Actually the server streams the partial
> result tuples to the client.
>
> I prefer to implement the second idea. However, the second idea seems
> impossible to be implemented because the GAE document says "App Engine
> does not support sending data to the user's browser before exiting the
> handler. Some web servers use this technique to "stream" data to the
> user's browser over a period of time in response to a
> single request. App Engine does not support this streaming technique."
> The quote is fromhttp://code.google.com/appengine/docs/python/runtime.html.
>
> Now i can only implement the first idea.
>
> Do you have other good suggestions, ideas for me?
>
> You can of course correct me if you feel i misunderstand the GAE
> document that i quote.
>
> Thank you very much for your valuable views.
>
> Bruce

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to