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?
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).]