Node FTP Server - Initial Release

Have done an initial release of my FTP Server in node.js. still a lot of work to do (like maybe some error handling?!) but i have the basic functionality working pretty seamlessly with filezilla client.

It works fine with large files (200MB+) and have managed to push it to 50k+ concurrent logged in connections (all idle - things get a bit hairy when they are all sending and receiving messages).... Seems to use up about 3-4k per active connection on average.


Git Repo is here

It has only been tested against node release 0.1.21 so far.

When i run the included test script, i get the following after 50000 connections:

FTP Return Codes:
"220":50002,
"230":50002,
"257":50002,
"331":50002,

Memory Usage (MB):
"RSS":139,
"VSZ":164,

Connection Info (Connected, Errors, EOF events, Close events, Timeout
events):
"CON":50002,
"ERR":0,
"EOF":0,
"CLO":0,
"TIM":0

feel free to provide some feedback if you have a chance to have a look at it.


NOTE: Will only work in ACTIVE mode (set your FTP client to use active connections). PASSIVE mode only works with a patch to the node code. As far as I know Ryan is adding the functionality to allow retrieval of an assigned ephemeral port in a listen event on the TCP Server, but this is not in the latest node release yet. If you really want to test out Passive mode, you can apply these patches to node release 0.1.21:

youtube server in node.js

This is my first attempt at a project with node.  Am trying to build a youtube server that will perform downloads of flv files from youtube as well as provide a web interface for viewing your downloads.

Usage is pretty straightforward, just require yuserv.js and set values for ip, port, files directory and a unique url to pass to youtube when downloading as follows:

the yuserv.get lines just set up the server to handle specific requests. it could be easily extended to add lots more functionality.

 

Filed under  //   code   event-driven   javascript   node   server