Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FearedPixel

[java] Remote method invocation question:

This topic is 5743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I dont know much about RMI, but if i don''t need to, then i don''t really want to learn it. My question is: Can I use RMI to create a client/server system where tcp/ip connections are made between the server app and the client app (neither of which is an applet, just a JFrame) and I just call remote methods rather than implementing a communication protocol and serialise all data transfers? Or is RMI just something exclusive to applets etc and just calling remote methods in class files hosted somewhere on ftp or http? Now before everyone tells me to rtfm, i just want to know this simple question, i dont really want to rtfm if i find out it was a waste of time.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

You got it correct.

RMI is as simple as you think it is

And yes, with the default settings there will be a TCP/IP connection between the nodes (client and server).

And yes to your next question ... you will only call methods on objects, and you almost won''t (except for catching RMIExceptions) notice there''s RMI at work

But it all comes at a cost.

Client/server programming via sockets can be much faster, due to the optimizations in data flow and/or you can use compression, if not employed by the medium (modem, etc.), unfortunately this approach carries with it the burden of an application level protocol and it''s mainteance.

So feel free to experiment with RMI, or is there another way to find out if you really need to use it ?



Petr Stedry

Share this post


Link to post
Share on other sites
Thanks for your help, i will most certainly look into RMI now . Speed is not really an issue since there will only be minimal data transfer, and it is not going to be a real time system.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!