You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jon Folland, Nativ Ltd" <jo...@nativ.tv> on 2009/10/12 14:08:10 UTC

Two questions on Apache Mina FTPServer

Hi, 

1. Is there any reason why the FTPServer project does not support Socket and ServerSocket Factories in the DataConnection classes? The reason I ask is we would like to specify a different concrete implementation of the Java Socket and ServerSocket classes without changing the code base. I notice this is supported in the FTPClient class in the Apache commons net package and it's very useful from the FTP client perspective. Is there any chance of an update on the code? 

2. Is there any reason why the DataConnection classes don't use nio server socket channels for better scaling on the sever-side to support large volumes of concurrent file transfers? 

Many thanks, 

Jon. 

Re: Two questions on Apache Mina FTPServer

Posted by "Jon Folland, Nativ Ltd" <jo...@nativ.tv>.
Hi Sai, 

Thanks for this. The strategy in point one is the one we followed and it works. The only reason I requested factories is to save a lot of cut of paste of perfectly good code. But this will suffice, so thanks for your help. 

Regarding point 2, thanks very much for this also. 

Regards, 

Jon. 

----- Original Message ----- 
From: "Sai Pullabhotla" <sa...@jmethods.com> 
To: dev@mina.apache.org 
Sent: Monday, 12 October, 2009 1:30:56 PM 
Subject: Re: Two questions on Apache Mina FTPServer 

I think #1 is kind of available. The data connection handling is 
defined by the interface ServerDataConnectionFactory. The current 
version ships the default implementation in IODataConnectionFactory. 
It appears that you can substitute your own implemenation of 
ServerDataConnectionFactory by setting the ATTRIBUTE_DATA_CONNECTION 
in the FtpSession. So, as soon as a client logs in, you can use an 
Ftplet to update the FtpSession and tell it to use your own version of 
data connection factory. 

I think #2 is in works or at least in the wish list for 2.0. Some one, 
please correct me if I'm wrong. 

Hope this helps. 

Sai Pullabhotla 
www.jMethods.com 




On Mon, Oct 12, 2009 at 7:08 AM, Jon Folland, Nativ Ltd 
<jo...@nativ.tv> wrote: 
> Hi, 
> 
> 1. Is there any reason why the FTPServer project does not support Socket and ServerSocket Factories in the DataConnection classes? The reason I ask is we would like to specify a different concrete implementation of the Java Socket and ServerSocket classes without changing the code base. I notice this is supported in the FTPClient class in the Apache commons net package and it's very useful from the FTP client perspective. Is there any chance of an update on the code? 
> 
> 2. Is there any reason why the DataConnection classes don't use nio server socket channels for better scaling on the sever-side to support large volumes of concurrent file transfers? 
> 
> Many thanks, 
> 
> Jon. 
> 


-- 
Jon Folland 

Join us at Streaming Media Europe 2009, Stand 21. 


TECH MEDIA INVEST TOP 100 COMPANIES IN THE UK. 
_______________________________________________________ 

NATIV - TOTAL VIDEO LOGISTICS 
_______________________________________________________ 

phone: +44 (0)20 7580 9488 fax: +44 (0)20 7580 9489 

mobile: +44 (0)7974 324 260 skype: jonfolland 

email: jon.folland@nativ.tv msn: jon@nativ.tv 
_______________________________________________________ 

web: http://nativ.tv blog: http://nativ.tv/futurevideo 
_______________________________________________________ 


The contents of this email are intended exclusively for the addressee. 
If you are not the addressee you must not read, use or disclose the 
email contents; you should notify us immediately, by clicking reply, 
and delete this email. 

Whilst Nativ has taken reasonable steps to scan this email, it does 
not accept liability for any virus that may be contained within it. 

Re: Two questions on Apache Mina FTPServer

Posted by Sai Pullabhotla <sa...@jmethods.com>.
I think #1 is kind of available. The data connection handling is
defined by the interface ServerDataConnectionFactory. The current
version ships the default implementation in IODataConnectionFactory.
It appears that you can substitute your own implemenation of
ServerDataConnectionFactory by setting the ATTRIBUTE_DATA_CONNECTION
in the FtpSession. So, as soon as a client logs in, you can use an
Ftplet to update the FtpSession and tell it to use your own version of
data connection factory.

I think #2 is in works or at least in the wish list for 2.0. Some one,
please correct me if I'm wrong.

Hope this helps.

Sai Pullabhotla
www.jMethods.com




On Mon, Oct 12, 2009 at 7:08 AM, Jon Folland, Nativ Ltd
<jo...@nativ.tv> wrote:
> Hi,
>
> 1. Is there any reason why the FTPServer project does not support Socket and ServerSocket Factories in the DataConnection classes? The reason I ask is we would like to specify a different concrete implementation of the Java Socket and ServerSocket classes without changing the code base. I notice this is supported in the FTPClient class in the Apache commons net package and it's very useful from the FTP client perspective. Is there any chance of an update on the code?
>
> 2. Is there any reason why the DataConnection classes don't use nio server socket channels for better scaling on the sever-side to support large volumes of concurrent file transfers?
>
> Many thanks,
>
> Jon.
>

Re: Two questions on Apache Mina FTPServer

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Mon, Oct 12, 2009 at 2:08 PM, Jon Folland, Nativ Ltd
<jo...@nativ.tv> wrote:
> 1. Is there any reason why the FTPServer project does not support Socket and ServerSocket Factories in the DataConnection classes? The reason I ask is we would like to specify a different concrete
> implementation of the Java Socket and ServerSocket classes without changing the code base. I notice this is supported in the FTPClient class in the Apache commons net package and it's very useful from the
> FTP client perspective. Is there any chance of an update on the code?

One reason is that we create sockets in several different ways, some
which I don't think would work with providing factories (like from
SSLContext). But, if you can provide a patch that enables injecting
factories in a consistent way I would be happy to review it for 1.1.0.

> 2. Is there any reason why the DataConnection classes don't use nio server socket channels for better scaling on the sever-side to support large volumes of concurrent file transfers?

Only lacking time :-). Again, feel free to provide a patch.

/niklas