Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Yet another SOCKET vs RMI question

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard over and over to use RMI because it is easier.
However, I know nothing about either sockets or RMI.
From a brief lookover of RMI, it appears to be simple enough that I *KNOW* I can figure it out.
This is not the case with sockets. They look a lot more difficult.
So here's the question. Should I do the assignment in SOCKETS, just to force myself to learn them?
Is there any career advantage to knowing sockets? In other words, will I be more likely to encounter sockets or rmi in future Java applications?
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frankly, Sockets aren't that difficult either. You create a ServerSocket, call accept() and you get a Socket back. You spawn a Thread to handle communication with that Socket. On the Sockets, you just get InputStream and/or OutputStream and communicate to your heart's content. In the assignment, you'll probably use ObjectInputStream and ObjectOuputStream to shove serialized objects over the wire. The Command pattern would probably be very useful there.
The difficulty of RMI isn't really lower, but it's less work because it has been created to solve this particular type of problem.
Not sure about any career advantage either way. Sockets are more generally applicable. But I think that RMI is regarded as the more complicated topic, and RMI of course builds upon sockets internally; if you know RMI people may assume you know your way around sockets as well
Ultimately, I feel the Developer's assignment isn't primarily about learning technologies, but (among other things) about learning to properly apply the right tool for the right job. I personally found RMI was the best tool for the assignment.
- Peter
[This message has been edited by Peter den Haan (edited November 13, 2001).]
 
    Bookmark Topic Watch Topic
  • New Topic