Giter Site home page Giter Site logo

wl152 / bambleweeny Goto Github PK

View Code? Open in Web Editor NEW

This project forked from u1i/bambleweeny

0.0 0.0 0.0 41.23 MB

Bambleweeny is lightweight key-value store and message broker based on HTTP/REST.

License: MIT License

Dockerfile 1.10% Python 73.00% Shell 25.90%

bambleweeny's Introduction

Python 2.7 GitHub release docker pulls GitHub license GitHub issues

Bambleweeny is a lightweight HTTP/REST based key-value store and message broker that offers identity, access & quota management. It's fast, easy to use, and well-documented.

Written in Python, using a Redis backend, deployable in a tiny container.

Use cases: NoSQL database, web cache, data ingestion, quick prototyping, mocking API endpoints, webhooks, configuration management and coordination across distributed systems.

Run Bambleweeny

docker run -d -p 8080:8080 u1ih/bambleweeny

This gives you a single, stateful and self-contained instance. Good enough for demos and tests. See the Documentation Index for infos on how to run it as a topology, in Kubernetes and OpenShift.

Simple HTTP based Key/Value Access

Bambleweeny has a nice command-line interface. Here we'll show you some cURL examples, since everything happens over HTTP:

Get 'foo'

curl http://b9y/keys/foo -H AUTH

Set 'foo' = 'bar'

echo bar | curl -X PUT -d @- http://b9y/keys/foo -H AUTH

Make 'foo' public, so anyone can read

echo '{"key":"foo", "content_type":"text/html"}' | curl -X POST -d @- http://b9y/routes -H AUTH

/routes/125e6a6f-c3f3-403b-b096-89978773139b

curl http://b9y/routes/125e6a6f-c3f3-403b-b096-89978773139b

bar

Upload binary files

curl --upload-file image.png http://b9y/keys/pic -H AUTH

Create a counter - 'pick a number'

curl http://b9y/incr/ticket_number -H AUTH

Message Broker

Push a message to a queue

echo test_message | curl -X POST http://b9y/lists/my_queue -H AUTH

Pop a message from a queue

curl http://b9y/lists/my_queue -H AUTH

The Getting Started Guide helps you get going quickly.

Using the REST API

The endpoint /swagger gives you the Swagger file. Check out the Getting Started Guide and the API Documentation for detailed information on managing users, keys and lists.

Performance (Apache Bench)

  • ~45 reads per second, ~29 writes per second - Raspberry Pi 3 Model B, ARMv7 1GB RAM
  • ~540 reads per second, ~400 writes per second - 1x vCPU 1 GB RAM (AWS t2.micro)
  • ~800 reads per second, ~530 writes per second - MacBook Pro 2.9GHz i7 16GB RAM

Behind the Scenes

Design Principles:

  • minimal use of external libraries
  • readable code over performance
  • simplicity over feature overload

Stack & Tools

  • Python, Bottle WSGI Framework, CherryPy thread-pooled webserver
  • Redis
  • Docker

Where does the name come from?

bambleweeny's People

Contributors

u1i avatar boterhammen avatar

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.