apache / apache/mina-sshd

How to implement the "AsynchronousFileChannel newAsynchronousFileChannel" in sshd sftp?

Open
#758 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
400
Avg merge
5d 1h
Merged PRs (30d)
1

Description

I am using sshd-sftp 2.15.0. When we download a lot of large files concurrently, we are facing downloading neck with default implementation "FileChannel newFileChannel" in RootedFileSystemProvider. But I found the "AsynchronousFileChannel newAsynchronousFileChannel" function in it, too. I think maybe it has better performance. Right?

But the class FileHandle has the "SeekableByteChannel fileChannel" property, and it is calling the provider.newFileChannel(path, options, attrs) in FileHandle. And AsynchronousFileChannel does not implement SeekableByteChannel.

Can you give me some guides how to implement the "AsynchronousFileChannel newAsynchronousFileChannel" in sshd sftp? For downloading neck, do you have any suggestion? Thanks.

![Image](https://github.com/user-attachments/assets/ff0c9d47-3993-4233-9e55-294b818a47b8)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with FileHandle and RootedFileSystemProvider, especially the existing newFileChannel and newAsynchronousFileChannel entry points. Trace how SFTP downloads use FileHandle's SeekableByteChannel and determine whether asynchronous channel support fits that path. Done means a validated performance recommendation or a clearly scoped implementation plan, including relevant tests if the project has coverage for this flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.