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 13:01:00 GMT

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

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

{quote}
I'm all for a single point in the code where the answer is sent back (or queued), but it can't
be the return value of the process() method if we ever want to support aync.
{quote}
Let me suggest the following clarification then (not documented, but this is how the code
behaves) - any implementation that is expected to return a {{Buffer}} may return _null_ in
order to indicate that it is taking care of the response sending in some way. I will *document*
this, and also override {{send}} for the *synchronous* implementation to always return _null_,
thus indicating that it has taken care of sending the response and that the caller of {{process()}}
need not do anything. This way, when using async. sending, simply return _null_ to indicate
that it is taken care of somewhere else...

How does that sound ?

> 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