- Saved searches
- Use saved searches to filter your results more quickly
- anneharun3/File-Sharing-System-FSS-using-only-Java-sockets
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- ReadMe.txt
- Saved searches
- Use saved searches to filter your results more quickly
- License
- FileSysOrg/jfileserver
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.MD
- About
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
anneharun3/File-Sharing-System-FSS-using-only-Java-sockets
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
ReadMe.txt
Harun Anne G01102695 hanne@gmu.edu /*********************************************************************************/ Instructions for starting the server and client setup. You can connect multiple clients at a time and perform operations simultaneously. Exceptions and error messages are handled explicitly. Server startup: java -cp pa1.jar Server start Client startup: set PA1_SERVER = localhost: port_number can be any number. For example 4098. Commands for uploadig and donloading the file: java -cp pa1.jar Client upload java -cp pa1.jar Client download Commands for controlling the directories the file: java -cp pa1.jar Client dir java -cp pa1.jar Client mkdir java -cp pa1.jar Client rmdir java -cp pa1.jar Client rm java -cp pa1.jar Client shutdown /*********************************************************************************/ File Sharing System (FSS) using only Java sockets You are charged with building a simple file sharing system (FSS) using a simple command line interface. The FSS consists of two types of entities: a file server and many clients. In this FSS: 1. The client MUST be able to upload files to the file server. It’s fine to upload them one at a time. If the file already exists, replace it. 2. The client MUST be able to download a given file from the file server, by providing the full filename path to the file server. If the file does not already exist, it MUST return an error message on standard error and return a non-zero error code. 3. The client MUST be able to list the file system objects (files and directories) on a file server directory, including the file server’s root (“/”) directory. If the requested directory does not exist, it MUST report an error message on standard error and return a non-zero error code. 4. The client MUST be able to create a directory (if the directory does not exist) and remove empty directories (if the directory is empty), and MUST be able to report whether or not these operations succeeded. If there’s an error, it MUST report an error message on standard error and return a non-zero error code. 5. The client MUST be able to remove a given file from the file server, by providing the full filename path to the file server. If the file does not already exist, it MUST return an error message on standard error and return a non-zero error code. 6. The file server MUST allow multiple clients to simultaneously connect to a single file server for upload/download, and allow for apparently-simultaneous transfer (e.g., it’s NOT okay for the file server to wait for one transfer to complete before another begins). 7. Clients MUST be able to cleanly shut down the file server. 8. The system MUST support the resume upload and download: If a file transfer between a client and a server is interrupted (because the network, server, or client has failed), the same client MUST be able to resume upload/download at the file server from the same point of progress by re-requesting the same filename. In other words, the client MUST NOT have to upload/download the data that is already uploaded/downloaded. Note that you have to handle server crashes too – you may want to use “flush()” in the server. In order for the TA to verify that you have implemented this functionality the program MUST print the progress of upload/download as it’s proceeding, including an indication that a partial download is skipping re-download of some portion of the file. The client will need to know how to contact the server; for this exercise, the client MUST accept this in an environment variable named PA1_SERVER with the computer name, a colon, and the TCP portnumber (e.g., “localhost:8000”). The server will need a place to store its data; its file system “root” MUST be the current directory for when it is started. Do not make any other assumptions about the properties of the file. The file sharing system MUST be able to exchange files of any type and with arbitrary filenames. Note: Linux/Unix filesystems are normally case-sensitive, but Windows/MacOS are normally case-insensitive; you don’t need to provide case-sensitive functionality on non-case-sensitive systems, but it MUST maintain the upper/lower case provided to it since that information matters on some systems. If there’s no error, return an error code of 0 (no error). When developing your system you MUST use Java, and for the networking portions you MUST use ONLY the Java sockets libraries (no JMI, etc.). No other use of third party software is allowed, unless explicitly permitted by the instructor. For purposes of this exercise we’ll totally ignore security, e.g., no authentication or authorization is needed. Note that illegally downloaded files (i.e., files violating the copyright laws) may not be used for developing, testing, or demoing your assignment. Deliverables 1. Executable and self-contained jar files. 2. A read-me text file. 3. Source Code in Java. Executable and self-contained jar files: The program MUST be implemented as a single jar file containing both server and client. A read-me text file: The text file MUST provide step-by-step instructions for running and testing your software. It MUST also clearly list the location of server’s storage folder i.e. the location where the server stores the received files. Source Code in Java: the source code submitted for your program MUST match the executable jar file. Below are commands that your system MUST support (we plan to create a test script), in order of the overall requirements above. Unix syntax shown: java -cp pa1.jar server start & # To set up client so it knows what server to talk to: export PA1_SERVER= # On Windows: set PA1_SERVER=….. java -cp pa1.jar client upload java -cp pa1.jar client download java -cp pa1.jar client dir java -cp pa1.jar client mkdir java -cp pa1.jar client rmdir java -cp pa1.jar client rm java -cp pa1.jar client shutdown Below is an example: mkdir –p server ; cd server java -cp pa1.jar server start 8000 cd .. ; mkdir –p client1 ; cd client1 export PA1_SERVER=localhost:8000 java -cp pa1.jar client upload text1.pdf /folders/text1.pdf Uploading file …. 50% (changes real-time) File uploaded. (start another client) cd ..; mkdir –p client2 ; cd client2 java -cp pa1.jar client download /folders/text1.pdf copy_of_text1.pdf Downloading file …. 50% (changes real-time) File Downloaded. java -cp pa1.jar client shutdown
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Java file server with SMB, FTP/FTPS and NFS support, virtual filesystems, database filesystems
License
FileSysOrg/jfileserver
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.MD
JFileServer — The Java File Server
JFileServer is a Java based file server that currently supports the SMB/CIFS, FTP/FTPS and NFS protocols. A virtual filesystem interface allows custom filesystems to be implemented, with a database filesystem framework that makes it easy to use a database to store the filesystem metadata, and optionally the file data.
The file server is highly scaleable using asynchronous I/O, thread pools and memory pools to optimise the throughput. The server may be clustered for additional scaleability based on the Hazelcast cluster technology.
An Enterprise add-on module adds support for SMBv2 (higher performance) and SMBv3 (full encryption).
The JFileServer code originally started out as the JLAN Server, the first version being released by Starlasoft back in the late 1990’s with basic SMB1 support. As development of the JLAN Server continued, SMB1 support was enhanced, and FTP and NFS support were added, along with the database filesystem framework and smart caching.
In 2007 Alfresco Software bought the rights to the JLAN Server code rebranding it as Alfresco-JLAN, and releasing the code as open source. Development continued with the addition of support for NTLMv2 and Kerberos enterprise authentication, scaleability enhancements using NIO, thread pools and memory pools, plus cluster support using Hazelcast, and FTPS support.
In recent years no new development has been done on the Alfresco-JLAN code.
At the beginning of 2018 we forked the Alfresco-JLAN code to create the JFileServer project to bring the source code up to date, and continue development of the file server.
The core JFileServer library and components such as the database filesystem implementations are licensed under the same GNU LGPL v3.0 license as the original Alfresco-JLAN code.
The JFileServer code uses features of JDK version 7 onwards.
Pre-configured setups of the core JFileServer and various database fileserver implementations are available as Docker images which can either be used as they are or used as the starting point for your own configurations.
For a list of the available Docker images see https://hub.docker.com/r/filesysorg/.
The main website can be found at http://www.filesys.org.
Additional information and documentation will be added there in the near future.
About
Java file server with SMB, FTP/FTPS and NFS support, virtual filesystems, database filesystems