{"id":25463859,"url":"https://github.com/solutionstack/simple-go-nfs-server","last_synced_at":"2025-08-27T04:10:58.598Z","repository":{"id":276716828,"uuid":"930052260","full_name":"solutionstack/Simple-Go-Nfs-Server","owner":"solutionstack","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-10T03:25:50.000Z","size":1660,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T08:47:22.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solutionstack.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-02-10T01:24:38.000Z","updated_at":"2025-02-19T09:31:08.000Z","dependencies_parsed_at":"2025-02-10T03:33:55.578Z","dependency_job_id":null,"html_url":"https://github.com/solutionstack/Simple-Go-Nfs-Server","commit_stats":null,"previous_names":["solutionstack/simple-go-nfs-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solutionstack/Simple-Go-Nfs-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FSimple-Go-Nfs-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FSimple-Go-Nfs-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FSimple-Go-Nfs-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FSimple-Go-Nfs-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutionstack","download_url":"https://codeload.github.com/solutionstack/Simple-Go-Nfs-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FSimple-Go-Nfs-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272289450,"owners_count":24907799,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-18T06:30:36.216Z","updated_at":"2025-08-27T04:10:58.564Z","avatar_url":"https://github.com/solutionstack.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build](https://github.com/solutionstack/Simple-Go-Nfs-Server/actions/workflows/go.yml/badge.svg)\n\n# Network File System in Go\n\n## Overview\n\nThis project demonstrates a simple network file system implemented in Go. It explores low-level networking concepts and provides a practical example of how to build a distributed file system. The system operates in two modes: **Master** and **Replica**.\n\n## Features\n\n- **Master and Replica Modes**: The program can be run in either master or replica mode, allowing for flexible configurations based on your needs.\n- **Replica Requirement**: At least one replica must be running before starting the master node. This ensures that the master can effectively manage and coordinate file operations across the replicas.         \n- **Low-Level Networking Exploration**: The primary goal of this project is to delve into low-level networking concepts in Go, providing insights into how network file systems operate.\n\n## Getting Started\n\n### Prerequisites\n\n- Go (version 1.19 or higher)\n- Basic understanding of Go programming and networking concepts\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/network-file-system.git\n   cd network-file-system\n   \n2. Run one or more replica instances providing `--port` and `--storage-root` cli arguments\n   ````bash\n   go run main.go replica --port=XXXX --storage-root=/path/for/files\n\n3. Run the master instance which starts an http server to interact with the NFS\n    ````bash\n   go run main.go master --peers=comma-seperated-list-of-ip-ports --storage-root=/path/for/files --http-port=XXXX\n\n### Usage\n\n#### The http-server exposes two endpoints\n    - POST / Which is the main file upload endpoint and expects multipart data,\n             data is replicated to all available replicas instances\n\n    - GET /byname?filename= This endpoint expects a previously uplocaded file and a randomly selected replica is used to \n            stream the (if available) to the client\n\n### Demo\n1. Create to replicas and one master instance and post a file to the master\n\n[start_servers.webm](https://github.com/user-attachments/assets/81a9198b-52be-4933-86b3-0bb1e807003b)\n\n2. Call a GET request to read the uploaded file which is streamed from a random replica instance\n   \n[read_file.webm](https://github.com/user-attachments/assets/8a4d24e4-0aae-4833-97ed-c3047bd26a6e)\n\n\n## Acknowledgments\n\n ### [Go Programming Language](https://golang.org)\n ### Inspiration from various network file system implementations\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionstack%2Fsimple-go-nfs-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutionstack%2Fsimple-go-nfs-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionstack%2Fsimple-go-nfs-server/lists"}