Timmy Tong wrote:
> Hi,
>
> If real-time is not possible, then I think a 5 seconds update is ok. Could
> you please give more details.
>
> Thank you very much.
>
> Regards,
> Timmy
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Alexander Fedorov
> Sent: Thursday, March 22, 2001 11:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Please help about Server push and Applet/Servlet
> communication
>
> Hello Timmy,
>
> Thursday, March 22, 2001, 4:15:51 PM, you wrote:
>
> TT> Hi,
>
> TT> Let me specify my problem. As I need to display the real-time data inthe
> TT> applet, I think I can't use a pull method. The Servlet must send the data
>
> TT> once it have been changed.
>
> There is no real time, pal. What is MINIMUM time between updates? If it
> something around 3-10 seconds - just poll servlet via http. Easy and
> will work behind proxies.
>
> --
> Alexander Fedorov
> Software developer
> Adcore
> Wibautstraat 120
> 1091 GP Amsterdam
> the Netherlands
> tel: +31 (0)20 561 1825
> fax: +31 (0)20 5611701 or +31 (0)20 5611849
> e-mail: mailto:[EMAIL PROTECTED]
> www.adcore.nl
> [...]
Timmy Tong wrote:
> Dear All,
>
> I am now doing a project about stock exchange. I have a applet interface and
> need to display real-time updated stock data.
> I am not sure how to do it. I think I need a Servlet on the server side to
> check the price, when the price change, it send the data to the applet for
> display. Is this a server push? and how to do it?
> Also I have read Jason Hunter's book about the MultipartResponse, the client
> side is just a html page, can it be a applet? Does IE support it? and can I
> implement it in my project?
> Furthermore, in chapter 10 about the Applet-Servlet communication, which
> type of the connection do I need to use? HTTP or Socket?
>
> Thank you very much for your help.
>
> Regards,
> Timmy
> [...]
Hi :-), I guess perhaps there will be several kinds of client-pulling, and
perhaps we can use some of them to simulate the realtime server-pushing,
I copy the following from John Lennon's <<IMAGINE>> album... :-) :-)
in the following , server can be both a Servlet or a "plain TCP server":
* plain client-pulling
the client pulls data every 5 seconds.
* server-thread-blocking
- pure server-blocking
% first client send a request to server
% after the server gets the requesting, it begins to wait() for
a data-updating
% after getting a notify() of data-updating, server will response to
client
% then the client get the response, do some work, then send a resuest
to server again...
% then server get this request again, and begin to wait() again...
- time-out style server-blocking
similar to the above, but now the wait() is a "time-out style wait()"
it means that server will send a response to client, no matter
it is because of data-updating and/or timeout, of cource if it is because
of timeout, there will be not any updating data in response from server to
client.
* Asynchronous-server-thread
similar to server-thread-blocking, but now the server-getRequestfromClient
thread is different from server-sendResponsetoClient thread, because if the
data-updating is very slow, it seems perhaps that the first thread can be
get back
to thread pool(of cource we don't have to do it, it depends on the system
design
structure) in other word, now I try to use two "sync io" to implement one
"Async io".
is it right? thanks in advance! :-)
Bo
Mar.26, 2001
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html