You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Guillaume Nodet <gn...@gmail.com> on 2014/12/01 18:11:52 UTC

[SSHD] [DISCUSS] Switch SSHD to JDK 7 and NIO FileSystem api for SFTP client and server side

I started working on switching to the new NIO FileSystem api provided by
JDK 7 in the SCP, and SFTP command implementations.
I've also worked on a client side SFTP FileSystem provider.
The work so far can be found at
   https://github.com/gnodet/mina-sshd/tree/filesystem

This has 2 major impacts:
  * require switching to JDK7
  * drop of the FileSystemView / SshFile interface

The second one can affect users, as I know some people use it to do some
post-processing for sftp.  I think this could easily be worked around by
adding proper callbacks and customization in the SftpSubsystem code.

The client side SFTP FileSystemProvider is quite nice to use, as it totally
abstracts the SSH / SFTP apis.  Here is a test showing how it can be used
completely transparently:

https://github.com/gnodet/mina-sshd/commit/46721da9692d5cadcec33283204ef75929077af0#diff-fd8abe6895bf77dc725d1e2073bc57acR70

The server side is also more flexible I think, as one can easily reuse any
existing FileSystemProvider (such as https://github.com/google/jimfs for
example).

I think this is a good improvement, but I'd need to gather feedback on the
2 impacts I mentioned (more specifically the second one, as Java 6 has been
EOL'ed by Oracle more than 18 months ago).  Supporting both APIs in the
same code does not really seem an easy thing to do.

Thoughts welcomed !

Cheers,
Guillaume Nodet

-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [SSHD] [DISCUSS] Switch SSHD to JDK 7 and NIO FileSystem api for SFTP client and server side

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 01/12/14 18:11, Guillaume Nodet a écrit :
> I started working on switching to the new NIO FileSystem api provided by
> JDK 7 in the SCP, and SFTP command implementations.
> I've also worked on a client side SFTP FileSystem provider.
> The work so far can be found at
>    https://github.com/gnodet/mina-sshd/tree/filesystem
>
> This has 2 major impacts:
>   * require switching to JDK7

Java 6 is already EOL anyway...
>   * drop of the FileSystemView / SshFile interface

I can't tell about this one...