I`ve just started working on my diploma thesis project which is "building a door access control system". Mainly it will work like this: there will be a java server, a database and clients(which will simulate the access cards at the doors) Since i don`t have the possibility to use java smart cards, i will have to simulate them by building clients and a GUI from where the employees will be to enter their ID card before having access. The problem that i`m facing now ,as i just started working on this i`m not completely sure if i should use RMI or java sockets in the communication between the client and the server. I`ve read some tutorials about the differences between but still haven`t been able to figure it out. Can anyone help me by giving his opinion in which is the best choice. I`d really appreciate it very much.
Thank you!

Votes + Comments
Well formulated question for first time poster
6 Years
Discussion Span
Last Post by alabn22

RMI involves a big learning curve and quite a lot of code. IMHO it's not appropriate unless you have identified a need that requires that kind of power, flexibility, and client/server integration. If you just have a small number of fixed messages ("I'm employee 1234, can I come in please?" - "yes") then Sockets are all you need. You'll find a bazillion (+/- 20%) code samples on the web showing how to listen on a server port, establish a connection, and send/receive messages via input/output streams across the connection. The code's not much longer than the description.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.