Client-server app involving a DB (general question)
This is a question I should have asked a long time ago...
In a classic client/server scenario where server-side performs some DB queries/updates on a client request and sends some response, what is the best approach? All logic is on the server, GUI on the client. There should be only a small number of clients and that is not likely to change, but if you're taking this into consideration, please tell me how would your answer differ if this was not the case (ie there was a greater number of clients). Should I go with sockets, RMI (used it the last time), or is there a third (possibly simpler/better) solution? Maybe a third party library that can help? Or at least a pattern I should follow or anything I should think of beforehand?
I'm asking this because every time I start doing a project, somewhere at the middle I discover I've spent a lot of time creating something that already exists, and instead of just implementing it, I end up making it from scratch. Or I find out my architecture sucks because I lacked experience and made a dumb mistake. You get the idea.
Since this is the first time I'm about to start a more serious project involving the afore mentioned scenario, I would really like to get it right.
P.S.
Please tell me if my question makes no sense?