JPPF
 Home   About   Download   Documentation   Forums 

FTP Server Sample

What does the sample do?

This sample illustrates how to embed an FTP server within a JPPF driver, and how to use a FTP client from a JPPF task to upload or download files as needed. The FTP server implementation is Apache's FtpServer, and the FTP client is the one available in the Apache Commons Net library.

Related source files

  • FTPServerStartup.java : This is a JPPF driver startup class, which starts an Apache Mina FTPd server instance at driver startup time
  • CommandLineExt.java : a utility class that reads the FTP server's configuration file and launches it
  • FTPClientWrapper.java : a wrapper around the Apache Commons-Net FTP client, as a convenience to easily upload and download files
  • FTPTask.java : a JPPF task which downloads a file from the driver, processes it, then uploads a transformed file back to the server
  • FTPRunner.java : the client application that submits the task to the JPPF grid

How do I run the sample?

Before running this sample application, you need to install a JPPF driver and at least one node.
For information on how to set up a node and server, please refer to the JPPF documentation.
Once you have installed a server and node, perform the following steps:
  1. open a command prompt in JPPF-x.y-samples-pack/FTPServer
  2. to build a deployment archive, type:
    - "ant zip"; this will generate a zip file with all required libraries and configuration files
    - "ant tar.gz"; this will generate an equivalent tar.gz
  3. the next step is to extract the archive file into the JPPF driver root installation folder
  4. you can then start the driver and nodes
  5. to run the demo application, you can either use the batch script "run.bat" (on Windows) or "run.sh" (on Linux), or the Ant script: "ant run"

I have additional questions and comments, where can I go?

If you need more insight into the code of this demo, you can consult the Java source files located in the FTPServer/src folder.

In addition, There are 2 privileged places you can go to:

Support This Project Copyright © 2005-2013 JPPF.org Powered by Parallel Matters  Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads