开发者

Applet in client-server infrastructure

I have a general question concerning client-server design.

We have a Java server with Spring, a GWT client program and some HTTP-servlets for our site. At the moment we also want to develop an applet which would communicate with that server in such a way GWT-client and site requests do.

Is it a good idea to communicate with the server from applet by RMI? I.e. to create some Remote services, register them with Spring and call them from applet?

Thanks in advance开发者_JS百科!


Absolutely, that was one of RMI's original primary use cases. Spring makes RMI amusingly easy, of course, and it should be an easy task to get the applet talking to it.

One big caveat - if your applet clients are behind a firewall, then RMI will almost certainly not work. If this is the case, then you'll either have to tunnel RMI over HTTP (see docs). Alternatively, you vould use Spring's HTTP remoting, but that would mean packaging some Spring JARs with the applet, which you may not want to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜