EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP operations in parallel

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#20761
Posted: 07/11/2012 10:17:37
by fidel pd (Basic support level)
Joined: 07/11/2012
Posts: 7

Hello,

I am working with the SophisticatedClient sample. I have noticed that two sends can not be performed simultaneously. Is there any way to perform two simultaneous send operations? I think it is necessary to retrieve the id of the SFTP operation in order to can perform two sends operations in parallel. Is there any way to get this id?

Thank you.
#20762
Posted: 07/11/2012 10:50:36
by Ken Ivanov (EldoS Corp.)

Fidel,

SSH and SFTP utilize strict request ordering, i.e. the outbound packets should depart strictly one after another. Still, in most cases you can send subsequent requests without waiting for responses to preceding ones to arrive. This is known as pipelining and is implemented in TElSimpleSFTPClient class internally.

If you tell us what goal you are trying to achieve, we would be able to provide you with more detailed assistance.
#20766
Posted: 07/11/2012 11:56:02
by fidel pd (Basic support level)
Joined: 07/11/2012
Posts: 7

Hello,

I will try to summarize the objective of the project. I want to develop a library that allows multiple send or receive operations simultaneously. Looking at the API, I thought that using asynchronous operations was sufficient, but I have seen in the sample application that is not so. If I do a send and before the end of the first one I do another send, the first is lost. Do you know any way to fix it?

Thank you in adavance.
#20767
Posted: 07/11/2012 12:15:42
by Eugene Mayevski (EldoS Corp.)

You can create separate SFTP channels, then you can execute some operations in parallel. The sample creates just one SFTP channel and you need to extend it.


Sincerely yours
Eugene Mayevski
#20770
Posted: 07/11/2012 12:51:27
by fidel pd (Basic support level)
Joined: 07/11/2012
Posts: 7

Hello,

in the IETF Internet Draft version 3 of SFTP protocol said: "There is no limit on the number of outstanding (non-acknowledged)requests that the client may send to the server." and "Exactly one response will be returned for each request. Each response packet contains a request identifier which can be used to match each response with the corresponding request. Note that it is legal to have several requests outstanding simultaneously, and the server is allowed to send responses to them in a different order from the order in which the requests were sent (the result of their execution, however, is guaranteed to be as if they had been processed one at a time in the order in which the requests were sent).".

How I can retrieve the request identifier using TElSftpClient class? I think that if I have this identifier I can do different SFTP operations simultaneously because when I receive an event I can associate this event with the original operation.

Thank you in adavance.
#20771
Posted: 07/11/2012 13:23:04
by Eugene Mayevski (EldoS Corp.)

I am afraid TElSFTPClient doesn't provide control down to such granularity. If you want parallel operations, use several instances of TElSFTPClient. If you want to play with SFTP protocol - write your own SFTP component (SFTP is not bound to SSH and SFTP protocol is relatively simple) or modify the source code of our SFTP component as you need.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 1630 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!