mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-812) support asynchronous mode for sftp subsystem
Date Wed, 11 Apr 2018 11:56:00 GMT

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

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


* In general, I dislike having {{void}} methods if I can return something useful.
* Having said that, we might add some hooks in the future where reply is not sent by the invoked
method, but rather by the caller of the {{process()}} method:
{code}
Buffer command = readCommand(...);
Buffer reply = process(command);
sendReply(reply);
{code}
I did not want to make this change since there are already plenty of changes, but perhaps
in the future we will do something like this, thus providing a hook for post-process intervention
before actually sending it - e.g., unit tests, monitoring callback, whatever.
* Debugging - can place a breakpoint on the line after {{process()}} call and examine the
sent buffer.

> 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)

Mime
View raw message