SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:I'd use RMI more in a more classic client-server architecture, where RMI is then used instead of direct socket access to communicate between the two.
Pat Farrell wrote:Do you do this for things like remote clients talking to the server?
When I tried RMI for that, I could never get the RMI port connection through the firewalls of corporations. I gave up and just use HTTP, which is always open.
You still have to handle when the connection is broken,
you have to be aware of version skew between client and server.
Sure, the client can call the methods as if they were local, but that is often poor engineering.
I've seen too many times where folks use RMI or CORBA or equivalents and make thousands of calls across the network because it looks transparent. The performance implications are staggering.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:
When I tried RMI for that, I could never get the RMI port connection through the firewalls of corporations. I gave up and just use HTTP, which is always open.
That's more a limitation of the company security policy.
Rob Spoor wrote: Why reinvent the wheel?
Rob Spoor wrote: Both need good designing to keep the network traffic under control.
Paul Clapham wrote:The funny part is, though, that we hardly use the "remote method invocation" part of RMI. Every single one of the web site's interactions with the RMI server sends an AbcRequest object to an AbcCommand object, which returns an AbcResponse object. (Where "Abc" is one member of a long list.) In other words it's really just a request-response protocol built on top of RMI. When we want another command, we just generate the three classes (DefCommand, DefRequest, DefResponse) and plug them into some boiler-plate code and we're done.
[snip]
If we were doing it over again we would probably use a lightweight web service, probably passing JSON objects back and forth, rather than RMI.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|