Code Monkey home page Code Monkey logo

fdb-object-store's Introduction

fdb-object-store

A simple object store built on top of FoundationDB. This is only a proof of concept developed for a blog post: Building an object store with FoundationDB.

Running

Requires the FoundationDB Go bindings, follow the instructions here to install. Also requires the Gin web framework. After dependencies have been installed the server can be started with go run main.go.

Using

The object store is dead simple to use and only has two features, uploading files and downloading them.

File uploads are handled by making a POST file upload to /object/path/to/file.txt. Everything after /object/ will be used as the file name, there is no notion of paths or directories but they can be simulated with slashes. When uploading a content type must also be specified with the POST form field content_type.

# Example upload using HTTPie
$ http -f POST localhost:8080/object/images/my_image.png content_type="image/png" file@local_file.png

Downloading an existing file is as simple as making a GET request to the same past as the upload. This can also be done through a browser.

# Example download of previously uploaded file (with HTTPie)
$ http -d GET localhost:8080/object/images/my_image.png

License

All code is licensed under MIT.

fdb-object-store's People

Contributors

fabianlindfors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fdb-object-store's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.