Hi,
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!

peter_budo commented: Well formulated question for first time poster +16

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.

Thank you for your reply and your opinion James.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.