Transferring a lot of data

T

Tommaso Caldarola

I'm using a Remoting to manage small set of data, now the customer wants to
transfer big binary files (up to 10 Gb) between 2 computers.

It's better to use socket or other technology or I can continue using Remoting
without problems with great quantity of data to pass through boundaries.

TIA
 
N

Nicholas Paldino [.NET/C# MVP]

Tommaso,

Sockets would probably be better here, since you woul dhave to load 10Gb
of bytes to pass across the remoting boundary, and something tells me you
will have a hard time doing that.

Another option you could use is to have the client send you a Stream
instance back. Since a Stream is derived from MarshalByRefObject, a
reference is passed back, not a serialized instance. The client can pass a
FileStream to you, and then you can call Read, reading chunks from the
stream until it is empty.

This would involve the server issuing a call to the client to perform
the read, and then the client marshaling the byte array back to the server.
It might have a little more overhead, but might be worth what you save in
implementation.

Hope this helps.
 
W

William Stacey [MVP]

It can be done with Remoting, but is a bit difficult to make efficient. The
receiver side will cache all data in RAM, so you can't do very large files
in 1 chunk. So you need to transfer in blocks. That is ok, but then you
also need to make sure your not sending an empty buffer in the request each
time, otherwise you will be transferring 20GB instead of 10GB. There is
ways around that, but me thinks sockets would be better. If you need
security, then also use something like NegotiatedStream in .Net 2.0. You
still want to do it in something like <=500KB blocks so that you can
restart, etc.

--
William Stacey [MVP]

| I'm using a Remoting to manage small set of data, now the customer wants
to
| transfer big binary files (up to 10 Gb) between 2 computers.
|
| It's better to use socket or other technology or I can continue using
Remoting
| without problems with great quantity of data to pass through boundaries.
|
| TIA
|
| --
|
|
| Inviato da X-Privat.Org - Registrazione gratuita
http://www.x-privat.org/join.php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top