GoDrive: A cloud storage system similar to Dropbox or Google Drive, with resilient

Cloud Storage Service

Author: Marisa Tania, Ryan Tjakrakartadinata
Professor: Matthew Malensek
See project spec here: https://www.cs.usfca.edu/~mmalensek/cs521/assignments/project-4.html

About GoDrive

GoDrive is a cloud storage system similar to Dropbox or Google Drive, with resilient, replicated backend servers and a command line client application. This project uses the go standard library and socket programming.

GoDrive Design

GoDrive

How to use GoDrive

To set up the server:

go run ./server/main.go host:port host:port storageA
                        SERVER 1   SERVER 2 STORAGE_NAME

To set up the client: Client can pick to input the port for server 1 or server 2

go run ./client/main.go host:port fileName
                        SERVER 1  FILE NAME

To compile and run:

Main Server

go run ./server/main.go localhost:7777 localhost:7778 storageA
go run ./server/main.go 192.168.122.215:7777 192.168.122.215:7778 storageA

Backup Server

go run ./server/main.go localhost:7778 localhost:7777 storageB
go run ./server/main.go 192.168.122.215:7778 192.168.122.215:7777 storageB

Client

go run client/main.go 192.168.122.212:7777 put ./file.txt
go run client/main.go 192.168.122.212:7777 get file.txt
go run client/main.go 192.168.122.212:7777 search file.txt
go run client/main.go 192.168.122.212:7777 delete file.txt

GoDrive Components

GoDrive has two components:

  • Storage Server: handles storage/retrieval/search operations. Will replicate files to another storage server instance.
  • Client: can send requests to any of the storage servers.

GoDrive Features

Specific features of the system include:

  • Storage: Store any type of file (text, images, binaries, and so on). Given enough disk space (and time to transfer the data), GoDrive supports arbitrarily large file sizes.
  • Retrieval: beyond usual file retrievals with get, GoDrive is able to search and list the files in the system
  • Scalability: concurrent storage and retrieval operations is supported, as well as handling multiple clients.
  • Replication: backend servers ensure that all files are replicated for fault tolerance. If a backend server goes down, GoDrive is able to contact a replica for the file.
  • Resiliency: GoDrive is resilient to disk or memory failures. If a file is stored on a disk and gets corrupted, GoDrive can detect the corruption, retrieve a replica, and repair the file.

Storage/Retrieval Operations

Both the server and client in GoDrive support a variety of messages that influence behavior. Here are the operations:

Options:
    * put fileName      Store file
    * get fileName      Retrieve file
    * delete fileName   Delete file
    * search string     (note that this string could be blank to search for all files)

To ensure the system is trustworthy, GoDrive acknowledge each of these operations as either successful or a failure.

Included Files and Directories

There are several files included. These are:

  • Makefile: Including to compile and run the program.
  • server/main.go: The server driver that listens and responses to client requests
  • client/main.go: The client driver that send out message requests
  • message.go: Shared put, get, delete and search message requests

There are also directories to store shared files:

  • storageA: for the main server
  • storageB: for the backend server

Program Output

Server

[mtania@nemo godrive]$ go run ./server/main.go 192.168.122.212:7778 192.168.122.212:7777 storageA
2021/05/14 00:23:18 192.168.122.212:7778
2021/05/14 00:24:43 handling connection...
2021/05/14 00:24:43 DIAL COUNTER: 1 ---- 1
2021/05/14 00:24:43 File name: file.txt
2021/05/14 00:24:43 Type: 1
2021/05/14 00:24:43 File size: 29kB 

Client

2021/05/15 00:24:43 Current directory: /home/mtania/P4-go-away/godrive/storageA
2021/05/15 00:24:43 SERVER GET -> Path: /home/mtania/P4-go-away/godrive/storageA/file.txt
2021/05/15 00:24:43 File is downloaded
Owner
Ryan G Tjakrakartadinata
Currently pursuing MSCS in Computer Science at USFCA. BA in Industrial Engineering and Management. Looking for SWE internship
Ryan G Tjakrakartadinata
Similar Resources

Lightweight Cloud Instance Contextualizer

Lightweight Cloud Instance Contextualizer

Flamingo Flamingo is a lightweight contextualization tool that aims to handle initialization of cloud instances. It is meant to be a replacement for c

Jun 18, 2022

The extensible SQL interface to your favorite cloud APIs.

The extensible SQL interface to your favorite cloud APIs.

The extensible SQL interface to your favorite cloud APIs.

Jan 4, 2023

Terraform provider for HashiCorp Cloud Platform.

HashiCorp Cloud Platform (HCP) Terraform Provider Requirements Terraform = 0.12.x Go = 1.14 Building The Provider Clone the repository Enter the rep

Dec 25, 2022

The Cloud Posse Terraform Provider for various utilities (E.g. deep merging)

The Cloud Posse Terraform Provider for various utilities (E.g. deep merging)

terraform-provider-utils Terraform provider to add additional missing functionality to Terraform This project is part of our comprehensive "SweetOps"

Jan 7, 2023

Cloud cost estimates for Terraform in your CLI and pull requests 💰📉

Cloud cost estimates for Terraform in your CLI and pull requests 💰📉

Infracost shows cloud cost estimates for Terraform projects. It helps developers, devops and others to quickly see the cost breakdown and compare different options upfront.

Jan 2, 2023

Cloud-native way to provide elastic Jupyter Notebook services on Kubernetes

Cloud-native way to provide elastic Jupyter Notebook services on Kubernetes

elastic-jupyter-operator: Elastic Jupyter on Kubernetes Kubernetes 原生的弹性 Jupyter 即服务 介绍 为用户按需提供弹性的 Jupyter Notebook 服务。elastic-jupyter-operator 提供以下特性

Dec 29, 2022

A Cloud Native Buildpack for Go

The Go Paketo Buildpack provides a set of collaborating buildpacks that enable the building of a Go-based application.

Dec 14, 2022

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload. Run tools like masscan, puredns, ffuf, httpx or anything you need and get results quickly!

Jan 6, 2023

Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.

Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.

Elkeid is a Cloud-Native Host-Based Intrusion Detection solution project to provide next-generation Threat Detection and Behavior Audition with modern architecture.

Dec 30, 2022
TurtleDex is a decentralized cloud storage platform that radically alters the landscape of cloud storage.

TurtleDex is a decentralized cloud storage platform that radically alters the landscape of cloud storage. By leveraging smart contracts, client-side e

Feb 17, 2021
A simple image hosting script in Golang (Smart Storage with Telegram Cloud Storage)

image-upload-tg It's a simple image hosting script in Golang. It's have http server and image can be uploaded from here, also images store temporary i

Jan 19, 2022
cloud-native local storage management system
cloud-native local storage management system

Open-Local是由多个组件构成的本地磁盘管理系统,目标是解决当前 Kubernetes 本地存储能力缺失问题。通过Open-Local,使用本地存储会像集中式存储一样简单。

Dec 30, 2022
Google Cloud Client Libraries for Go.
Google Cloud Client Libraries for Go.

Google Cloud Client Libraries for Go.

Jan 8, 2023
☁️🏃 Get up and running with Go on Google Cloud.

Get up and running with Go and gRPC on Google Cloud Platform, with this lightweight, opinionated, batteries-included service SDK.

Dec 20, 2022
Sample apps and code written for Google Cloud in the Go programming language.
Sample apps and code written for Google Cloud in the Go programming language.

Google Cloud Platform Go Samples This repository holds sample code written in Go that demonstrates the Google Cloud Platform. Some samples have accomp

Jan 9, 2023
Use Google Cloud KMS as an io.Reader and rand.Source.

Google Cloud KMS Go io.Reader and rand.Source This package provides a struct that implements Go's io.Reader and math/rand.Source interfaces, using Goo

Dec 1, 2022
Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)

Swift This package provides an easy to use library for interfacing with Swift / Openstack Object Storage / Rackspace cloud files from the Go Language

Nov 9, 2022
Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang
Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang

Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang, i.e. Cloudpods is a cloud on clouds. Cloudpods is able to manage not only on-premise KVM/baremetals, but also resources from many cloud accounts across many cloud providers. It hides the differences of underlying cloud providers and exposes one set of APIs that allow programatically interacting with these many clouds.

Jan 11, 2022
Container Storage Interface driver for Synology NAS

Synology CSI Driver for Kubernetes The official Container Storage Interface driver for Synology NAS. Container Images & Kubernetes Compatibility Drive

Jan 5, 2023