This content has been marked as final. Show 5 replies
I don't know how to implement the network communication.So you don't know basic socket or networking theory?
If not I would start by studying that. It may be too low level for your needs, but everything that has to do with networking derives from basic sockets so it is basically prerequisite knowledge if you want to do client/server programming.
An observation: If
- 1 client who initiates communication with the server, asking to get values.those 'values' are also file related, then what you are describing here is basically an FTP server + client.
Thank you for your answer !
I have very basic knowledge about networking theory and I already program a small application with RMI (but only a simple application). But my problem with RMI was to propertly send a file on the server. And to download a large file, the transfer was too slow and sometimes files to big => error.
My first idea was to used the FTP (a FTP server is already implemented on my server), but I don't only want to download file, but informations too.
For example, my server application is running and I want to get back to my client some execution values (temperature, process time execution, etc.).
And before to start downloading files, I want to execute a method to my server which generate the list of which file the client should download.
In summary, there is the 2 sequences I would like to implement :
-- 1. Download specific files ---
1) Client => generateList() => Server
2) Server generate the list
3) Server callback => OK, list generated
4) Client => downloadFileList() => Server
5) Client => download all the file of the list => Server
-- 2. Get informations ---
1) Client application => getValues() => Server
2) Server => sendTemperature() => Client
3) Client display this value in live
FTP for the file transfer, RMI to execute remote method, .... Should i implement a FTP with RMI ? And what about the RMIIO library ?
Please help me to define the architecture...
Thank you a lot for your help!!!
Perhaps you don't need one technology; perhaps you need to apply two. You could use FTP to do file transfers (which requires only that you have the client code as you can simply use existing FTP server software), and use RMI to communicate with your home grown server application.
Note that nowadays people tend to use the web for exposing functionality to clients. A SOAP or RESTful webservices can help you to do exactly what you are doing with RMI right now, plus it has that nice benefit that you can expose user interfaces through the web and such :)
user5070286 wrote:as a side note (and as the primary RMIIO developer), rmiio is a great solution for sending data streams over rmi. however, if you already have an ftp server available, that generally makes more sense than using rmiio.
So, I will use both to communicate: for file transfer => FTP and for data transfer => RMI.