EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Architecture choices

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#3391
Posted: 07/18/2007 10:11:32
by Chris Yourch (Basic support level)
Joined: 06/28/2007
Posts: 7

Since I know nothing of the internals of MsgConnect I'm wondering how I should architect an async file transfer manager. In simple terms, the manager will be able to download/upload from 1 - 10 files at a given time. Is it best to use a separate thread for each upload/download and then create an instance of a messenger/transport/queue for each thread? Or, should I have one thread and one instance of messenger/transport/queue and handle upload/download in a round-robin fashion?
#3392
Posted: 07/18/2007 10:31:25
by Eugene Mayevski (EldoS Corp.)

If efficiency is critical and the files are large, use several threads (one thread per file). If the files are small (say less than 1-2 Mb each), use one thread: the performance gained from multiple threads will be diminished by the time required to create additional threads (each InetTransport instance creates at least one additional worker thread).


Sincerely yours
Eugene Mayevski
#3396
Posted: 07/18/2007 22:44:08
by Chris Yourch (Basic support level)
Joined: 06/28/2007
Posts: 7

I have switched over to using exactly one instance of messenger/transport/queue and sending multiple files asynchronously and it seems to work ok. Even large files. Is this OK as far as performance goes?

Another question, what is the best buffer size? I'm using 4k and it seems ok. 8k seems a little faster. Is there a preferred buffer size that will give me the best performance?
#3397
Posted: 07/19/2007 00:45:59
by Eugene Mayevski (EldoS Corp.)

The exact buffer size value should be chosen experimentally as there's no linear dependence between the buffer size and speed.


Sincerely yours
Eugene Mayevski
#3409
Posted: 07/19/2007 12:41:53
by Chris Yourch (Basic support level)
Joined: 06/28/2007
Posts: 7

Have any other users out there experimented with buffer sizes?
#3410
Posted: 07/19/2007 12:43:10
by Chris Yourch (Basic support level)
Joined: 06/28/2007
Posts: 7

Is it OK to use exactly one instance each of messenger/transport/queue to send/receive multiple files asynchronously?
#3411
Posted: 07/19/2007 12:48:34
by Eugene Mayevski (EldoS Corp.)

yes, you can do any number of file transfers using just one messenger/transport/queue on each side of the communication.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 5225 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!