Redian新闻
>
包子答谢--请教高手:streaming data to applet
avatar
包子答谢--请教高手:streaming data to applet# Java - 爪哇娇娃
F*e
1
on the client side, I have an applet which gets data from backend/server
side.
The data on the server keeps changing. What is the best way to get up-to-
date data on the applet side?
Options I see: polling, RMI, JMS, other options?
什么办法最efficient而且又不难做?先谢了。
avatar
g*g
2
If it doesn't have to be very real time, then polling would be simplest.
You can't open a server socket on applet anyway and your option is limited.

【在 F**e 的大作中提到】
: on the client side, I have an applet which gets data from backend/server
: side.
: The data on the server keeps changing. What is the best way to get up-to-
: date data on the applet side?
: Options I see: polling, RMI, JMS, other options?
: 什么办法最efficient而且又不难做?先谢了。

avatar
F*e
3
thanks.
if I do want as real time as possible, what would be your next choice,
balancing efficiency/speed/ease of
implementation?

【在 g*****g 的大作中提到】
: If it doesn't have to be very real time, then polling would be simplest.
: You can't open a server socket on applet anyway and your option is limited.

avatar
g*g
4
Using RMI may be possible achieve near real time, but if the end user
is inside firewall, it becomes big problem. For me, the best approach
may be polling to check status (not data) very frequently, and get data
whenever status is changed.

【在 F**e 的大作中提到】
: thanks.
: if I do want as real time as possible, what would be your next choice,
: balancing efficiency/speed/ease of
: implementation?

avatar
c*t
5
This is assuming data is big. If the data is small, then it basically
can be transmitted in a single packet or two in some cases. The minimum
size of packet is actually quite big, usually 1k size.

【在 g*****g 的大作中提到】
: Using RMI may be possible achieve near real time, but if the end user
: is inside firewall, it becomes big problem. For me, the best approach
: may be polling to check status (not data) very frequently, and get data
: whenever status is changed.

avatar
F*e
6
so you are saying best to use RMI?

【在 c*****t 的大作中提到】
: This is assuming data is big. If the data is small, then it basically
: can be transmitted in a single packet or two in some cases. The minimum
: size of packet is actually quite big, usually 1k size.

avatar
c*t
7
RMI doesn't really help. RMI is simply a protocol of transfering objects
on top of TCP/IP.
Honestly, I think that you should research this problem yourself and
do some readings. Also, you need to consider the number of clients,
the number of simultaneous requests, the size of the returned data,
the time it takes to compute/retrieve the data, and the definition
of "real-time". Some real-time maybe 15-sec refresh or manual refresh.
Consider these and you won't be too clueless.
Usually polling i

【在 F**e 的大作中提到】
: so you are saying best to use RMI?
avatar
F*e
8
Thanks for your suggestions. I'll definitely start with polling.

【在 c*****t 的大作中提到】
: RMI doesn't really help. RMI is simply a protocol of transfering objects
: on top of TCP/IP.
: Honestly, I think that you should research this problem yourself and
: do some readings. Also, you need to consider the number of clients,
: the number of simultaneous requests, the size of the returned data,
: the time it takes to compute/retrieve the data, and the definition
: of "real-time". Some real-time maybe 15-sec refresh or manual refresh.
: Consider these and you won't be too clueless.
: Usually polling i

avatar
F*e
9
Eventually I need subsecond latency and there could be many concurrent
request. What will be my
best choice?

【在 c*****t 的大作中提到】
: RMI doesn't really help. RMI is simply a protocol of transfering objects
: on top of TCP/IP.
: Honestly, I think that you should research this problem yourself and
: do some readings. Also, you need to consider the number of clients,
: the number of simultaneous requests, the size of the returned data,
: the time it takes to compute/retrieve the data, and the definition
: of "real-time". Some real-time maybe 15-sec refresh or manual refresh.
: Consider these and you won't be too clueless.
: Usually polling i

avatar
c*t
10
You didn't provide information on the size of the data, the frequency
of the update, the processing time of the data, and why you would need
have such frequent update etc.
If you envision the update will be very frequent, much like playing an
interactive game, then you will need to keep a live connection. That's
for sure since the TCP/IP overhead is significant. You will also have
to get someone who is really experienced to work on it, to design the
whole architecture. It is not going to be t

【在 F**e 的大作中提到】
: Eventually I need subsecond latency and there could be many concurrent
: request. What will be my
: best choice?

avatar
c*g
11
how about appletservlet.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。