Java: socket or RMI?
I need to divide our applications into lightweight GUI applications and business logic applications This is not a client / server setting because the server component has only one client
Another limitation of an application is that it has only one entry / exit point Therefore, if we use RMI, it will only work on one function All form data has been wrapped into a string and passed through a transmission area
Should I only use Java sockets to enhance this application, or should I use RMI? Or some other Java technology?
My previous post outlined the requirements of our application, but it was not answered https://stackoverflow.com/questions/2604528/terminal-panel-pc-single-server-solution-client-server-or-rdp
Cheers!
Solution
Personally, if you have only one method to call RMI, RMI seems excessive, and all your data is contained in the string I think a simple socket server is enough to meet your needs However, RMI does provide a lot of things for free, such as multithreading, distributed garbage collection, object marshalling and so on But if you have only one client, multithreading may not work because you are doing your own object grouping, and these benefits may not get any benefits
Here is a good page about RMI functions: http://java.sun.com/javase/technologies/core/basic/rmi/whitepaper/index.jsp