[ 
https://issues.apache.org/jira/browse/SSHD-812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433898#comment-16433898
 ] 

Goldstein Lyor commented on SSHD-812:
-------------------------------------

I have looked over the code you mentioned, and it looks promising. I apologize 
that I do not have enough time to really figure out how it achieves the duality 
we discussed (i.e., allow for both synch. and async. implementations) - I trust 
your judgement in this. There are still a few issues we need to make sure we 
cover in full before we release it into the wild:

* The good-old-and-trusty robust code is still there - we did not degrade the 
reliability. I am not sure how we achieve this, except for rigorous scrutiny of 
the code (for which I do not expect to have time in the upcoming weeks).
* The issue of version setting in a concurrent environment (see one of my 
previous comments on this issue) - basically, some assurance that until the 
{{SSH_FXP_INIT}} command has been received we work synchronously - i.e., 
process one command at a time. Only after having (successfully) processed the 
initialization command do we "go wild" and work asynchronously
* How should the user signal which implementation to activate ? I am totally 
fine with having 2 *separate* concrete classes and let the user decide which to 
use in the {{SftpSubsystemFactory}}. In this context we should decide on some 
preferred default (my vote goes to the synch. implementation)
* What about the client side - should we open a followup issue to provide 
asynch. implementations - at least for read/write/upload/download of large 
chunks of data ?

> support asynchronous mode for sftp subsystem
> --------------------------------------------
>
>                 Key: SSHD-812
>                 URL: https://issues.apache.org/jira/browse/SSHD-812
>             Project: MINA SSHD
>          Issue Type: New Feature
>    Affects Versions: 1.7.0
>         Environment: java1.8, linux
>            Reporter: Zhenliang Su
>            Assignee: Goldstein Lyor
>            Priority: Minor
>              Labels: asynchronous, sftp
>         Attachments: Main.java, doRead.png
>
>
> I used SSHD as a middleman between client and target sftp server.
> I found that, when filezilla client directly connect to the target sftp 
> server, it transfers fast. When filezilla client connect to the middleman, it 
> transfers slow.
> I analyzed the source code of 
> org.apache.sshd.server.subsystem.sftp.SftpSubsystem#doRead, and I found it 
> behaves like block mode, and client's other SSH_FXP_READ request blocked in 
> the same thread.
>  
> my middleman code:
>  [^Main.java]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to