Ciao,
i have a seaside application with some user interface. Now i have one specific user request for query the database. This request required some long time on the server before answer. My goal is to : a) display a progress bar when the user submit this query b) block the web user request until the server answer the data query result How i can implemented this solution? Thank for any considerations. Dario _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Thu, Oct 15, 2015 at 2:23 PM, [hidden email]
<[hidden email]> wrote: > Ciao, > > i have a seaside application with some user interface. > > Now i have one specific user request for query the database. > > This request required some long time on the server before answer. > > My goal is to : > > a) display a progress bar when the user submit this query > > b) block the web user request until the server answer the data query result > > > How i can implemented this solution? This is quite tricky, I would rather try to speed up the database query ;-) First there's the question of how you get the progress of the query itself. If you don't know in advance how may rows you expect or it's a query that doesn't return a result (like an update) this can get tricky. You could try to run and parse an EXPLAIN to get a guesstimate of how many rows you will get. Or some databases allow you to check to progress of a query in a different session. Then there's the question of sending the progress updates to the client. If you're on Zinc you can use it's WebSockets support. If you're not and your sever adaptor supports flushing you can try to implement Sever Sent Events. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks Philippe,
I don't need to display the progress bar status of the elaborations. I wrong my request. I need to display the 'elaborations - processing' , that processing is in progress on the server. Something that informs the user about the processing on the server until the answer. Without informations about the specific progress of processing. I hope to explained well. Thanks, Dario _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by dtrussardi@tiscali.it
Dario,
You should not be blocking the web request while the long running query runs ... this would be an application for a service vm [1] to execute the long running query and then have your browser poll back for progress ... I think the readme for the project explains things pretty clearly ... but you can ask questions on the glass list for more information -- check in the tode directory for some service vm scripts Dale [1] https://github.com/GsDevKit/ServiceVM#servicevm On 10/15/2015 05:23 AM, [hidden email] wrote: > Ciao, > > i have a seaside application with some user interface. > > Now i have one specific user request for query the database. > > This request required some long time on the server before answer. > > My goal is to : > > a) display a progress bar when the user submit this query > > b) block the web user request until the server answer the data query result > > > How i can implemented this solution? > > Thank for any considerations. > > > Dario > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |