Dalhousie CSCI-3171 Network Computing, W2012/2013, Assignment
This is a small implementation of client and server of a custom Dropbox-like protocol. It should sync a folder of files (not recursively) between different clients of the same user.
Implementation details and requirements
- PHP 5.4 (array dereferencing and small notation, and closure awesomeness!)
- Depends on the Pharse library for command-line options interpretation
19905is the default value. It can be changed using one of the options listed below
- For detailed use cases, see
- Code is being tracked at BitBucket and issues are there too. The most updated code can be downloaded as a ZIP, GZ or BZ2 ball.
-debug: Puts the system in debug mode, outputing a lot of stuff
-help: shows the complete list of options
-p: port on which the program will interact
-d: [required] the directory that the program will use for synchronization
No specific options
-h: host with which the program will interact
-u: [required] the username used to synchronize
-q: [required] the password used to synchronize
$ mkdir files/client/files
$ ./server.php -d files/server
$ ./client.php -d files/client/files -u charlie -q echo
lib/phpunit.phar file was included in the project to make it easier to run standalone tests.
To run them, first run the server separately, and then:
$ ./lib/phpunit.phar tests/
It was decided to use the new ApiGen generator instead of the good'n'old PHPDocumentor because the latter has no support for Traits yet. Since they are widely used in the code, it would make the documentation incomplete.
The documentation is stored in
docs/. It can be updated using
$ apigen -p.