Parallel Remote File IO (64 bit)
Introduction
QUANTA can use parallel sockets to download files from remote servers
or upload files to them.
QUANTA classes used
QUANTAnet_parallelRemoteFileIOServer64_c
This class is used to set up a server for remote file I/O. The init()
method is called first with the port numbers and number of parallel sockets
and then we can use process()
to locate any clients wanting to perform remote I/O.
QUANTAnet_parallelRemoteFileIOClient64_c
A client instantiated using this class can upload()
or download()
files to the remote server established above. You can access the timestamp
on the local file using getLocalDateTime()
or on the remote file using getRemoteDateTime()
, and then find out which of the two files is the latest by comparing the
timestamps with compareDateTime()
.
In the demo programs, servertcp.cxx
sets up the TCP server and client.cxx tries to download a file from
a remote machine. The client compares the timestamp on the downloaded file
and the remote file, and determines if there was any change since the download.
Usage
1. To run the server on one machine
(say evans)
server
<NeighborServerName> < CacheLocally>
where
NeighborServerName:
Valid internet address of a host you want to connect to if files don't
exist in the server
CacheLocally:
0 or 1.
0 won't save the file downloaded from the NeighborServerName locally
for later use.
1 will save the downloaded file
(You can run this demo by
typing 'server' )
2. To run a client on a separate
machine
client <server-address>
localfilename remotefilename
Output
The client will print the the remote file's date and time stamp. The download
time and network statistics will also be displayed. The client will then
print out the local file's date and time stamp and also whether its newer/older
with respect to the remote file. The log is appended to the file remoteFileIO64.log
.
for more information: Post your questions
online on the Quanta forum
page.