in reply to Re^5: Single server-multiple clients
in thread Single server-multiple clients

Apologise for the slang

fixed parts so far:

1. Server and 2 Clients are made through socket program. ( The Code is something which I took from the net).

2. To write/read files to/from disk/client ( using simple file operations).

3. Verifying the MD5 of an x-client. ( By first,regex-ing the path of client and the drive, then perform verification(if md5_hex(path1/clientx/filex) Eq (md5_hex(pathx/diskx/filex)).

parts to be fixed:

1. How to make clients wait at the server, so that server can update their status on its table.
2.If I use request/respond type... Will the proxy server be a function ( sub proxy()) or should it be connected to the server through sockets again.

for clarification: The clients are on different machine.
wherever I type
%/> perl client.pl
the client pings the server, when I type the same line on another machine( the same client-code I believe). Its the client2 that's pinging the server now.. so on..

Thanks

Replies are listed 'Best First'.
Re^7: Single server-multiple clients
by Corion (Patriarch) on Jul 20, 2010 at 20:31 UTC

    Have you considered making your protocol just HTTP?

    Also, have you considered that file I/O will be so slow that it will deliver data at the same speed whether one reading machine is reading from it or two? The two machines will each get (at best) half the speed.

      the prototype I'm using is 'tcp' since its within a group of systems in computer lab.

      Is there a efficient method to file i/o other than Open(fileh,">filename")


      I'm not quiet familiar about an alternate.

        No, there is no more efficient method, but as long as all machines use the same hardware device, you won't see any speedup by making two or more machines read from the same drive. And the speed of calculating an MD5 is essentially bound by the speed you can read the data from disk. And a single process can max out your harddisk already, unless you have an SSD drive.