The application we´re building will contain transactions initiated from the web tier (i.e when the user clicks a button in the GUI) and these transactions will take several seconds for the legacy systems to process. During this time the user either will have to wait (looking at the upper right corner of the browser window...), or, preferrably, I would like to allow him/her to continue using the GUI and somehow receive a signal or message when the transaction is done.
Has anyone experience in asynchronous communication from the wevb tier like this?
-
Asynchronous messages from web tier (8 messages)
- Posted by: Johan Apelgren
- Posted on: November 17 2002 10:32 EST
Threaded Messages (8)
- Asynchronous messages from web tier by Gal Binyamini on November 17 2002 12:24 EST
- Asynchronous messages from web tier by Mani Venkatesan on November 17 2002 14:36 EST
- Asynchronous messages from web tier by Ferhat SAVCI on November 18 2002 07:35 EST
- Asynchronous messages from web tier by Gal Binyamini on November 18 2002 10:39 EST
-
Asynchronous messages from web tier by Ferhat SAVCI on November 18 2002 02:41 EST
-
Asynchronous messages from web tier by Gal Binyamini on November 18 2002 03:43 EST
- Asynchronous messages from web tier by Ferhat SAVCI on November 18 2002 05:07 EST
-
Asynchronous messages from web tier by Gal Binyamini on November 18 2002 03:43 EST
-
Asynchronous messages from web tier by Ferhat SAVCI on November 18 2002 02:41 EST
- Asynchronous messages from web tier by Gal Binyamini on November 18 2002 10:39 EST
- Asynchronous messages from web tier by Leonard Gurevich on November 18 2002 17:21 EST
-
Asynchronous messages from web tier[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: November 17 2002 12:24 EST
- in response to Johan Apelgren
Well, I'd try to avoid it if you can, but if it's really essential to the GUI I know two common options. One is to set up some applet in the background which either polls or receives async notification of updates and updates the browser appriopriately. The other option, which I usually prefer, is to have some piece of Java Script run un the background and poll some servlet for update notifications. When it receives one, it reloads the appropriate page.
Gal -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Mani Venkatesan
- Posted on: November 17 2002 14:36 EST
- in response to Johan Apelgren
The best way would be to call an MDB from a servlet. When the processing is done, have the MDB send an email to the user... -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Ferhat SAVCI
- Posted on: November 18 2002 07:35 EST
- in response to Johan Apelgren
We have done this in a data-entry and correction project where we had to duplicate the behaviour of the legacy system.
Put in its simplest form: the page uses three frames. The top frame has the image of the form. The middle frame has the form initialized with the OCR output. The bottom frame has the transaction list. The user compares what's in the image with the output of the OCR, makes corrections if necessary and saves the data.
The transaction list is updated using "push" technology (multipart, new part replaces old). The servlet end of the transaction list waits on a session attribute (a syncronized List of transaction info objects).
Each request's parameters and the reference to the List object is copied into a Command object and passed on to a new thread and the servlet returns immediately. When the thread finishes, it notifies the thread waiting on the session attribute, which, in this case, is the transaction list servlet, which re-reads the list, writes the new part and flushes, thus updating the transaction list.
Hope this helps. -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: November 18 2002 10:39 EST
- in response to Ferhat SAVCI
AFAIK the MIME type "multipart/x-mixed-replace" is not supported by Internet Explorer (any version). How do you get around this?
Gal -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Ferhat SAVCI
- Posted on: November 18 2002 14:41 EST
- in response to Gal Binyamini
Another bit of information to remember for the next project, thanks Gal ;-)...
Anyway, the user desktops were SuSE Linux boxes (the previous program was a customized X application) and ours ran in Netscape Communicator (4.3?). -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Gal Binyamini
- Posted on: November 18 2002 15:43 EST
- in response to Ferhat SAVCI
Ahh, the luxury of using browsers that actually support internet standards... a rare commodity nowadays :)
Gal -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Ferhat SAVCI
- Posted on: November 18 2002 17:07 EST
- in response to Gal Binyamini
I think the x- in "multipart/x-mixed-replace" actually stands for "experimental", though this has not stopped Microsoft from implementing a feature before. It must be something else...
Anyway, with IE you could still do it with client pull (auto-refresh) configured for a short refresh cycle (10s?), but, it will not be the same thing. The user will have to wait for the next cycle or refresh the list manually to see the outcome. -
Asynchronous messages from web tier[ Go to top ]
- Posted by: Leonard Gurevich
- Posted on: November 18 2002 17:21 EST
- in response to Johan Apelgren