",,,using sockets and copy paste the file, but this is a very slow process.,,"
If u want to view the file on the client side then it will be streamed (downloaded) one way or another. The exception is when you are remotely viewing the desktop of the server.
Usually big files are streamed i.e. sections of the file are downloaded for view. For example if you are looking at page 1 then the next two pages can be downloaded in advance but not the entire document.
Your problem with these files is that you have to read them through the application that reads those files, and the application should provide you with an API for streaming data into the application. This is what happens with multi-media streaming software. The File Format of the file should also be optimised for streaming. Multi-media files are optimized because it's widely known that they can be streamed.
Streaming has to be done properly (and in part I will explain to you why the File Format has to be optimized for this-as I mentioned above): Imagine a video file being streamed. Packets of data don't follow the same path to the client. So the client application cannot assume that the packets it receives are in the same order as they were sent by the server. Video files (the file format) have extra data, usually a video frame number, and each frame is packaged into a packet. When a client gets the packet, thus the frame, it will order it in the correct order before playing the video. There is more to this but I believe you get the picture. Similarly apply this to files like pdfs. If the file is streamed then there needs to be some data in the File Format to tell the client how to arrange the packets it receives. I doubt pdfs have such a mechanism because when u view a pdf on a webpage, the file is first wholy downloaded.
The above details are at the low level and there could be some tool to help you but probably not to the extent you expect. I'm only telling you the above so that you see the devil is in the details!
Note: Streaming the file is not about RMI, but more about network programming.
Also keep in mind, if we are talking about .doc files, which can be modified then it gets trickier. If the client makes a change on the file then those changes have to be saved on the original document on the server, and that means operating on sections of the file at the binary level, and also handling conflicts at that level if more that one user is working on the file.
O_O
--- On Thu, 4/16/09, Duggan Kim <mdkimani@gmail.com> wrote:
|