My Blogs
libssh async SFTP project created as a part of GSoC 2023

All pages

Project Overview

  • Project Name : Async SFTP Client
  • Mentors :
    • Jakub Jelen : (GitLab Profile Link )
    • Norbert Pocs : (GitLab Profile Link )
    • Sahana Prasad : (GitLab Profile Link )
  • Contributor : Eshan Kelkar (GitLab Profile Link )


Project Goals

  1. Creating a low level asynchronous API for performing remote reads and writes.
  2. Creating a high level file transfer API that uses the low level async API internally.
For the created APIs, the following also had to be written :
  • Tests
  • Benchmarks (to analyse performance)
  • Documentation


SFTP AIO API (Project Goal 1)

In the GSOC community bonding period, some issues were identified in the then existing libssh async SFTP API for reading. Those issues were :

  • Incorrect file offset handling in certain scenarios by the async API.
  • API user needed to perform cumbersome typecasting of the request ids used by the API.

On discussion with the mentors, it was decided to fix these issues in the existing API before developing the high level file transfer API.

Fixing these issues required changing function return types and parameter types. Since the API was already public, that couldn't have been done without breaking the existing libssh user code.

Hence, it was decided that a new async API had to be created. In future, the users would use the new async API and libssh would deprecate the old async API.

This new async API was named as SFTP AIO (async i/o) and it :

  • Solves the above described issues in the old async API.
  • Provides the user ability to perform async read/write operations on remote files.


SFTP FT API (Project Goal 2)

After creating the SFTP AIO API, the SFTP FT (File transfer) API was created. Features of this API :

  • Provides functions to perform 4 kinds of transfers :
    • Local to Remote (Upload)
    • Remote to Local (Download)
    • Remote to Remote (Remote copy)
    • Local to Local (Local copy)
  • Uses the low level async SFTP AIO API internally to get faster transfers as compared to transfers performed using synchronous SFTP read/write API.
  • Makes transfers efficient by minimizing the number of data copies between buffers as much as possible.
  • Provides a feature to resume interrupted transfers.
  • Provides a progress callback feature to monitor the progress of the tranfer. This could be useful for applications that want to show some progress related UI.


On next Page

Next page contains :

  • Links to the merge requests created for the project.
  • Description of current state of the project.



All pages