{"id":21910070,"url":"https://github.com/kierse/distributed-app","last_synced_at":"2025-03-22T08:17:29.179Z","repository":{"id":66811235,"uuid":"177886921","full_name":"kierse/distributed-app","owner":"kierse","description":"eece513 distributed-app","archived":false,"fork":false,"pushed_at":"2019-03-27T00:32:33.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T08:23:10.002Z","etag":null,"topics":["distributed-computing","distributed-file-system","distributed-systems","kotlin"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kierse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-27T00:01:16.000Z","updated_at":"2019-03-27T00:33:54.000Z","dependencies_parsed_at":"2023-04-08T21:57:29.388Z","dependency_job_id":null,"html_url":"https://github.com/kierse/distributed-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kierse%2Fdistributed-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kierse%2Fdistributed-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kierse%2Fdistributed-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kierse%2Fdistributed-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kierse","download_url":"https://codeload.github.com/kierse/distributed-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924996,"owners_count":20532898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-computing","distributed-file-system","distributed-systems","kotlin"],"created_at":"2024-11-28T17:28:18.744Z","updated_at":"2025-03-22T08:17:29.155Z","avatar_url":"https://github.com/kierse.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README #\n\nAttention: for Windows users, replace `gradlew` with `gradlew.bat`\n\n## How to Use ##\n- Set up EC2 instance and pull from master\n- Update instances to [Java 9](#markdown-header-to-install-java9) if required\n- Create a \"server.txt\" file in the project root with Public DNS addresses of each EC2 instance\n- Generate public/private ssh key (without password) and save to keys/server-to-server:\n\n_Note: from the project root directory_\n```\n\u003e ssh-keygen -t rsa -b 4096 -C \"server-to-server\"\n```\n- Initialize the instances with the following commands:\n\n_Note: substitute first argument with path to actual pem file_\n```\n\u003e ./script/deploymentScript /Users/kierse/.ssh/eece513_aws.pem --ssh-keys\n```\n- Run the following command to build and deploy:\n\n_Note: substitute populate pem flag with path to actual file_\n```\n\u003e ./gradlew bootstrapAws -Ppem=/Users/kierse/.ssh/eece513_aws.pem\n```\n- In any EC2 instance home directory, start a cluster node:\n```\n\u003e java -jar distributed-app-1.0.jar\n```\n- On startup, the node will print out its join address. This address can be used by other nodes wishing to join its cluster:\n\n_Note: replace 127.0.0.1 with the join address obtained in the previous step_\n```\n\u003e java -jar distributed-app-1.0.jar 127.0.0.1\n```\n\n**_Warning: starting a node without the address of an existing cluster will effectively create a second cluster._**\n\n### Run commands across cluster ###\n\n_Note: substitute path to actual pem file_\n```\n\u003e csshx/csshX --login ec2-user -ssh_args \"-i ~/.ssh/eece513_aws.pem\" --hosts servers.txt\n```\n\n## fs513 ##\nfs513 is a command line script that can be used to interact with the distributed filesystem.\n```\nusage: ./fs513 \u003caction\u003e [\u003coption1\u003e \u003coption2\u003e]\n\n Actions:\n    put \u003clocalFileName\u003e \u003cremoteFileName\u003e  (add a local file to fs513 with the given fs513 name)\n    get \u003cremoteFileName\u003e \u003clocalFileName\u003e  (fetch a fs513 file to the local machine)\n    remove \u003cremoteFileName\u003e               (delete a file from fs513)\n\n    grep [\u003carg1\u003e \u003carg2\u003e ... \u003cargN\u003e]       (search the fs513 server logs)\n    locate \u003cremoteFileName\u003e               (list all machines (name / id / IP address) of the servers that contain a copy of the file)\n    ls                                    (list all files in fs513)\n    lshere                                (list all fs513 files stored on the local machine)\n\n    --help                                (print this message)\n```\n### Supported fs513 commands ###\n##### add file #####\n```\n./fs513 put foo.txt foo/bar/baz\n```\n##### get file #####\n```\n./fs513 get foo/bar/baz foo.txt\n```\n##### remove file #####\n```\n./fs513 remove foo/bar/baz\n```\n##### grep server logs #####\n```\n./fs513 grep -i \"no files to sync\"\"\n```\n##### locate file #####\n```\n./fs513 locate foo/bar/baz\n```\n##### list files in filesystem #####\n```\n./fs513 ls\n```\n##### list files on current machine #####\n```\n./fs513 lshere\n```\n\n## Tests ##\n\n#### Unit Tests ####\n```\n \u003e ./gradlew test\n```\n#### Distributed Tests ####\n```\n \u003e ./gradlew distributedTest\n```\n\n## UPGRADE FROM JAVA7/8 TO JAVA9 ###\n\n### To install Java9 ###\n\n```\n\u003e wget --no-cookies --no-check-certificate --header \"Cookie: oraclelicense=accept-securebackup-cookie\" http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.rpm\n\u003e sudo yum install jdk-9.0.4_linux-x64_bin.rpm\n```\n\n### To remove old Java versions ###\n\n```\n\u003e sudo yum remove java-1.8.0-openjdk\n\u003e sudo yum remove java-1.7.0-openjdk\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkierse%2Fdistributed-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkierse%2Fdistributed-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkierse%2Fdistributed-app/lists"}