-
Notifications
You must be signed in to change notification settings - Fork 2
Agora Proposal
Test FreeDOM API with the goal of supplying working feedback to help shape it’s development. More specifically, we’d like to create a web application that leverages some of the API provided by FreeDOM to sync files between multiple users and/or devices. This should hopefully expose some of the difficulties and restrictions in using FreeDOM in web development.
Caylan Lee: I’m a senior in the Computer Science department. I have some experience in web development, including overseeing a 10 week, 7 person communication tool built using Django. This project will be a lot of new areas for me, which I am excited to explore.
Nicholas Shahan: I am undergraduate in the computer science department and have web development experience from past employers that will help me get started in this project. My previous experience was strictly in a client/server model so the peer-to-peer nature of this project will be a great learning experience. I hope to bring a strong work ethic and organizational skills to the project. I have a strong sense of self motivation but working in a group setting will also be a learning experience for me.
Tariq Yusuf: I am a Senior in the Computer Science and Engineering department. I have worked extensively with various web frameworks, client and server-side technologies, and hope to bring my own ideas and perspectives to the table.
Most group based file synchronization and sharing options require a central server to act as a hub that the clients connect to and download new files and updates to existing files. Since all files are stored on the servers, this can be resource intensive and expensive to scale for an open source project. Examples of this method include Dropbox, Google Drive, and SpiderOak. By using the FreeDOM API, we can provide a similar service that uses peer-to-peer sharing and remains serverless.
Users will be able to create a space to share with others, add local files or folders, and other users or devices subscribed to that space will receive updates directly. The multi-user and multi-device problems are very similar, and we will probably focus on only the multi-user sharing first. When a space is updated on one user’s machine, any users that are subscribed to that space will have their space updated via a peer-to-peer connection. Some system of conflict resolution will need to be used, but we may be able to rely on existing implementations.
First steps will involve looking at the previous FreeDOM prototypes that have been created and gain a familiarity with the scope of the work and the unique features to FreeDOM. Following that, we will look toward existing technologies for inspiration and possible inclusion in our project. Open source web apps or browser plugins should serve as a starting point when looking for existing technology. We can also investigate traditional peer-to-peer software to see what can be applied in a browser. After that, some formal requirements will be put in place and agreed upon and development can begin. The programming will be scoped and divided with realistic milestones and goals so we can assess progress. We hope to be able to get a working prototype of multi-user file sync within the first quarter.
Due to the scale of this project, we will develop a way to consistently document the code to make it easy to follow. We will be taking advantage of YUIDoc to export our documentation to a more readable form. We will also make it a requirement to run YUIDoc before committing repository changes.
Function Description
/**
* My method description. Like other pieces of your comment blocks,
* this can span multiple lines.
*
* @method methodName
* @param {String} foo Argument 1
* @param {Object} config A config object
* @param {String} config.name The name on the config object
* @param {Function} config.callback A callback function on the config object
* @param {Boolean} [extra=false] Do extra, optional work
* @return {Boolean} Returns true on success
*/
Class Description
/**
* This is the description for my class.
*
* @class MyClass
* @constructor
*/
Property Description
/**
* My property description. Like other pieces of your comment blocks,
* this can span multiple lines.
*
* @property propertyName
* @type {Object}
* @default "foo"
*/
Module (file) documentation
/**
* Provides the base Widget class...
*
* @module widget
*/
-
FileSystemItem-
name- String -
isFolder- boolean -
contents- Array- If
isFolderis true, then this will contain otherFileSystemItems - If
isMetadatais true, then this will benull. - Otherwise, this will contain the bit stream for the file.
- If
-
timestamp- Integer -
isDeleted- Boolean -
isMetadata- Boolean
-
-
GroupShare-
fileSystem-FileSystemItem(this can be empty if no sharing has occurred yet). -
groupUsers-User[] -
groupName- String -
addUser- Adds a user to this group share by the UID. -
removeUser- Removes a user from this group share by the UID. -
saveShare- Writes theGroupShareinformation to the browser’s local storage. -
synchronize- Synchronizes the files among the online users.
-
-
User- (
constructor) - Performs AJAX request and gets information for the currently authenticated + user. If no user is authenticated, we return false instead of a constructed object. There + will be another constructor for initializing friends that should only be used when pulling + friend info. -
displayName- String -
UID- The UID for this user. -
contacts-User[] List of friends of the current user. -
isOnline- Boolean
- (
- getCurrentUser() - to display pretty name at the top of page
- getUsers() - to display names of users that have access to a space
- addUser() - when adding a new user to a space
- removeUser() - when removing a user from a space
- getDirContents() - to display the contents of the current folder
- getFile() - to copy a file out of Agora - when drag/drop out of the window and dropped in the local file system
- putFile() - to copy a file into the Agora file system - when drag/drop on the window from the local file system
- deleteFile() - to remove a file from the Agora file system
- renameFile() - to rename a file in the Agora file system
- getParentFolder() - to display the file system breadcrums
Login:
Jake just found the best recipe for fried baby snakes. He copied it into a text file and wants to share it with his buds. First things first, he needs to login.
- Jake enters the URL to the Agora site in his web browser.
- Jake is greeted with a login screen.
- Jake enters his username and password, then clicks Login.
Possible Errors/Outcomes:
Wrong username/password combo
Need password reset
Need to create an an account
Create New Share:
Lisa went for coffee and slipped on some that had been spilled on the floor of the coffee shop. She is planning on suing the proprietor and has written a description of the fiasco. Lisa is on the Agora site and wants to create a new share with some coworkers so that can read her story and verify that is how it happened.
- Lisa clicks the “create a new space” button.
- She gives the new share a name.
- Then she enters the account names of the users she wants to share with.
- Lisa clicks Create Share.
Possible Errors/Outcomes:
User does not exist
No users added?

Add files to a share:
Ralph knows some moderators on his favorite internet forum. He made a really funny picture in photoshop that is making fun of some of the members on the forum. He decided that it should not be posted there, but he wants to share it with the moderators anyway. Luckily he already has a Agora share setup with them for exactly this type of situation. He has already logged in and selected the existing share.
- Ralph resizes and arranges his browser window so he can see the Agora share and his local file system or desktop.
- Ralph drags and drops a file from his desktop onto the filesystem area of the window.
Possible Errors/Outcomes:
Confusion about dragging files into the window
Missed the drag and drop area
Dropped into the “root” of the share
Dropped into an existing folder

Remove file from share:
Margo knows that one of her Agora friends is now under surveillance by the FBI. She doesn’t know why but she does know that she wants nothing to do with it. Margo decides to remove all of her files from the share that her friend group has been using. She has logged in and opened the share.
- Margo selects a file and drags it to the Trash icon.
- She starts selecting multiple files and drags them to the trash.
Possible Errors/Outcomes:
Misses the trash icon
Deletes the wrong file

Download a local file system copy of a file:
Yun thought the huge .jpg showing the densest part of the milkyway was so cool. Her Agora friend has shared it with her and she wants to copy it onto her local file system. She has already logged in and opened the share.
- Yun resizes and arranges the browser window so she can see the Agora share and her local file system or desktop.
- She then drags the file from the Agora window onto her local file system or desktop.
Possible Errors/Outcomes:
Misses the intended destination
Copies the wrong file
Add users to a share:
Troy is in need of some cash. He and his roommate have decided to sublet their living room to a friend so now there are three people living in the house. He already had a house share setup on Agora and he wants to add his new roomie to the share. Troy has already logged in and has the share selected.
- Troy clicks Add User
- He enters the identification of his new friend and and submits
Possible Errors/Outcomes:
Did not provide all needed information
Cannot find the user based on the information provided
Remove users from a share:
Cammy had a falling out with her BFF. Time to remove her from the Agora share she has with her friends. Cammy has already logged in and selected the share.
- Cammy clicks Users button to see all of the users in the share.
- Cammy clicks the remove button next to her ex-BFF’s name.
- She clicks Yes when prompted with the confirmation message.
Possible Errors/Outcomes:
Doesn’t confirm the removal
TODO
Create a new account
Leave a share
Delete a share