You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-dev@incubator.apache.org by Knutsen Rolf Aslak <as...@edb.com> on 2006/11/02 09:22:33 UTC

Rough Project ideas

Stage 1:
		Split handling and events into two different concepts. 
		Hide proctocol access unless spesificly
requested/extended, 
		handled transparent in background.
		
		- bootstrap/loader class (tomcat core?)
			- configuraiton sanity check
			- connector load
			- engine load
			- event listener registration
			
		- define engine interface (tomcat?)
			Handles 'system' management, configuraiton,
module integration etc
			
		- define connector interfaces (tomcat?)
			Handles protocol spesific information ONLY

		- define module, listener, event, handler interfaces
			- Login (JAAS interface?)
			- Session
			- Transfere
			- FileSystem
			
			
		- define EventManager		
		- define HandlerManager
		
		- define Configuration 
			How to configure diff modules, listeners
				Based on user, ip, group, host, remote
ip
		
Stage 2:
		Start work on Stage 1 implementation

Stage 3:
	Look into remote monitoring interfaces - JMX
	Look into Transaction
	Look into server linking - 
		DMZ -> Closed
		Closed -> DMZ
		Cluster
		Distrubuted


General layout
---------------
	Module:
		Logical colleciton of handlers, factory, listener
providers
		
		Module handles the Handler and Listener calls.
		
	Handler:
		Actual extendable/loadable interface for user spesific
implementation
		
	Listener:
		User implementable extension point for READ only
information
	
	Event: 
		READ only object passed to Listener on'Event'


Logical Redesign:
-----------------

LoginModule
	Should handle default login/logout operations
	
	Needs factory to handle configuration based on:
		request ip?
		multi to bind ip/host?
	
	LoginHandler
		boolean login(user, pass)
		void logout(user)

	LoginListener
		onConnect()
		onDisconnect()
		onLogin()
		onLogout()
		
	LoginEvent
		user, pass, time, sessionid?

SessionModule
	Should handle an overall user session/transaction
	
	Needs factory to handle configuration based on:
		user group?
		request ip?
		multi to bind ip/host?
	
	SessionHandler
		getSession() ??

	SessionListener
		onSessionCreate
		onSessionDestory
		
	SessionEvent
		id, time, createtime, user?
	
TransfereModule
	Should handle stream trasnferes in/out

	Needs factory to handle configuration based on:
		user group?
		request ip?
		multi to bind ip/host?
		type?
		to/from path?
		filename regexp?
					
	TransfereHandler
		boolean	doUpload(FTPRequest)
		boolean doDownload(FTPRequest)
		boolean doDelete(FTPRequest)
		
	TransfereListener
		onUploadStart(?)
		onUploadEnd(?)
		onDeleteStart(?)
		onDeleteEnd(?)
		onDownloadStart(?)
		onDownloadEnd(?)
		onAppendStart(?)
		onAppendEnd(?)
		onUploadUniqueStart(?)
		onUploadUniqueEnd(?)
		
	TransfereEvent
		user, session, time, other info?

FileSystemModule
	Should handle requests regarding creation of directories etc
	
	Needs facotry to handle configuration based on:
		see TransfereModule
		
	FileSystemHandler
		doRmDir(?)
		doMkDir(?)
		doRename(?)		
		
	FileSystemListener
		onRmDirStart(?)
		onRmDirEnd(?)
		onMkDirStart(?)
		onMkDirEnd(?)
		onRenameStart(?)
		onRenameEnd(?)

	FileSystemEvent
		user, session, time, path, file, other info?
		
		
EventManager
	Decoupled manager of Events. 
	Registers event listeners
	
	addListener(Type)
	doEvent(Type)


HandlerManager
	Decoupled manager for all configured handlers
	Registers handlers
	
	addHandler(?)
	doHandle(?)
	



package structure
----------------
org.apache.ftpserver
org.apache.ftpserver.engine
	Engine
	EventManager
	HandlerManager
org.apache.ftpserver.connector
	Connector
	Command
org.apache.ftpserver.connector.ftp
org.apache.ftpserver.connector.ftp.protocol
	(STOR...(Command))
org.apache.ftpserver.connector.ftps
org.apache.ftpserver.connector.sftp
org.apache.ftpserver.login
	LoginHandler
	LoginListener
	LoginEvent
org.apache.ftpserver.session
	SessionHandler
	SessionListener
	SessionEvent
org.apache.ftpserver.transfere
	TransfereHandler
	TransfereListener
	TransfereEvent
org.apache.ftpserver.filesystem
	FileSystemHandler
	FileSystemListener
	FileSystemEvent



Look into:
-------------------
	Using the Tomcat core as the basis of the ftp server.
		It seems to be a java serve framework, engine,
connectors etc.. Might be easly reusable
		Easy access for j2ee standards, datasources, JNDI
lookups, etc..		

JMX: MBean - remote monitoring ?



Please do come with input.. :o)



- Aslak Knutsen


RE: Re: Rough Project ideas

Posted by Ga...@sungard.com.
Just a quick comment...

Though it might be nice to use a container to base the FTP Server on, I
also like and rely on the ability to embed the FTP server into my own
application as well.

Sorry for not replying back yet on the SSL stuff.  Too busy on work
projects and I'm not sure yet how to "patch" any code changes.

Gary

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Niklas Gustavsson
Sent: Thursday, November 02, 2006 1:37 PM
To: ftpserver-dev@incubator.apache.org
Subject: Re: Rough Project ideas

Knutsen Rolf Aslak wrote:
[snip a lot of thoughts]

I think I'm gonna need you to go into a little more detail on these 
before I can comment :-)


> Look into:
> -------------------
> 	Using the Tomcat core as the basis of the ftp server.
> 		It seems to be a java serve framework, engine,
> connectors etc.. Might be easly reusable

While Tomcat can certainly provide a lot ideas for us, I find the Jetty 
architecture to be easier to grasp. Jetty also has a reputation of being

very easy to embed, something I think is important for FtpServer.

> 		Easy access for j2ee standards, datasources, JNDI
> lookups, etc..		

Agreed. I think we should aim for being easy to integrate with J2EE 
servers and participate in for example JTA transactions.

> JMX: MBean - remote monitoring ?

Yes, I think we should use JMX for remote configuration. That is, 
instead of letting our admin GUI edit the config files directly, it 
would connect to the server over JMX and the server then configures 
itself. What do you think?

> Please do come with input.. :o)

Interesting stuff! Please flesh out your ideas further so that we can 
discuss them in depth.

/niklas



Re: Rough Project ideas

Posted by Niklas Gustavsson <ni...@protocol7.com>.
Knutsen Rolf Aslak wrote:
[snip a lot of thoughts]

I think I'm gonna need you to go into a little more detail on these 
before I can comment :-)


> Look into:
> -------------------
> 	Using the Tomcat core as the basis of the ftp server.
> 		It seems to be a java serve framework, engine,
> connectors etc.. Might be easly reusable

While Tomcat can certainly provide a lot ideas for us, I find the Jetty 
architecture to be easier to grasp. Jetty also has a reputation of being 
very easy to embed, something I think is important for FtpServer.

> 		Easy access for j2ee standards, datasources, JNDI
> lookups, etc..		

Agreed. I think we should aim for being easy to integrate with J2EE 
servers and participate in for example JTA transactions.

> JMX: MBean - remote monitoring ?

Yes, I think we should use JMX for remote configuration. That is, 
instead of letting our admin GUI edit the config files directly, it 
would connect to the server over JMX and the server then configures 
itself. What do you think?

> Please do come with input.. :o)

Interesting stuff! Please flesh out your ideas further so that we can 
discuss them in depth.

/niklas