Well, the 0.6.0 is still under vote, so trunk will contain nothing
different from 0.6.0 atm.
We have JIRA raised about the failing tests, but it seems the problem
is more in the tests than the code itself.

For performances on sftp transfers, a patch has been provided which
boosts the performances a lot, so yeah, 0.6.0 will be definitely
faster than 0.5.0.

For callbacks, I think currently, the best way would be to wrap the
NativeFileSystemView to override the SshFile#handleClose.
Given it seems quite a common request, maybe a patch to help doing
that (or adding a specific way of intercepting the call) would be a
good idea.

On Fri, Sep 9, 2011 at 17:35, Davis Ford <[email protected]> wrote:
> Forget a) - I grabbed the trunk revision and built that, and it is way better 
> than the 0.5.0 release...assuming this is due largely in part to this code in 
> SshServer.java:  I'm using 0.7.0-SNAPSHOT -- aside from the usual disclaimers 
> that go with SNAPSHOT releases...is there anything major in the trunk that I 
> should be worried about?  The SftpTest.java does not pass for me.
>
> // MINA itself forces our socket receive buffer to 1024 bytes
>            // by default, despite what the operating system defaults to.
>            // This limits us to about 3 MB/s incoming data transfer.  By
>            // forcing back to the operating system default we can get a
>            // decent transfer rate again.
>            //
>            final Socket s = new Socket();
>            try {
>              try {
>                  
> nio.getSessionConfig().setReceiveBufferSize(s.getReceiveBufferSize());
>              } finally {
>                  s.close();
>              }
>            } catch (IOException e) {
>                log.warn("cannot adjust SO_RCVBUF back to system default", e);
>            }
>
> I'd still love any pointers on how to do MD5 on the incoming stream and how 
> to detect when a file is complete.
>
> Regards,
> Davis
>
> From: Davis Ford
>
> Hi, I'm looking into building SFTP support into a project with Apache SSHD 
> and JSch.  I looked at the following unit test from sshd-core as a guideline 
> for how to do SFTP:
>
> http://svn.apache.org/repos/asf/mina/sshd/trunk/sshd-core/src/test/java/org/apache/sshd/SftpTest.java
>
> I have a couple quick questions:
>
> a) In the test method testExternal() I set the test to sleep indefinitely so 
> I could test transfers of variable size files.  Using the latest FileZilla 
> client, I tried sending a file ~150MB and the throughput was less than ideal. 
>  I don't recall the exact numbers, but this is a transfer from localhost to 
> localhost, and it took several minutes.  Is there any way I can boost the 
> performance to get better throughput?
>
> b) I want to calculate the MD5 on the incoming byte stream for a file, but it 
> wasn't clear to me how to inject something like an interceptor that can get 
> a-hold of the input stream in order to do so.  Is this possible?
>
> c) Is there an event / callback mechanism to know when a file has been 
> completely received?  In my scenario, the client will be sending multiple 
> files in one session, and as each file is read and completely written to 
> disk, I need to trigger an event.
>
> Thanks in advance!
>
> Davis
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to