https://github.com/srijanshetty/nodesock
P2P filesharing
https://github.com/srijanshetty/nodesock
Last synced: about 2 months ago
JSON representation
P2P filesharing
- Host: GitHub
- URL: https://github.com/srijanshetty/nodesock
- Owner: srijanshetty
- Created: 2013-09-07T06:34:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-07T03:15:25.000Z (about 10 years ago)
- Last Synced: 2025-01-17T19:51:06.816Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 172 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Introduction
A simple file sharing program written in node#Usage
1. First run the server node server.js
2. Now, the client has two modes
* __Interactive mode__: node client.js
* __Bulk Uploader__: node client.js#Dependencies
* Node
* sqlite3#Design Decisions
* __Multiple Clients__: Nodejs has been specifically used because of this
reason, since nodejs handles everything asynchronously in an event loop, it
has the ideal environment for a network application.* __Multiple Requests__: Each connection to the server serves as a _closure_; in
essence, every connection is handled independent of other clients. Each request
is handled inside this connection object.* __Database__: _sqlite_ has been used for the database as it does not need
additional installations and only requires a node module. A simple file can
serve as a sqlite database.* __Filepath__: Filepaths are resolved before sending them to the server,
invalid paths are signalled as an error.* __P2P__: Every client has a listener at FILEPORT, whenever it recieves a
request to share a file, it sends the entire file to peer asking for it.* __Command Structure__: \;;parameter1;;parameter2..
* ;; has been chosen as the delimiter arbitarily
* \
* \
* \
* \
* \
* \
* \#Limitations
* All p2p transferred files are written to a single file called recieved. Which
is overwritten every time.