All Projects → miku → Microblob

miku / Microblob

Licence: gpl-3.0
Serve millions of JSON documents via HTTP.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Microblob

Ejdb
🏂 EJDB 2.0 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image.
Stars: ✭ 1,187 (+2537.78%)
Mutual labels:  json, key-value
Fastkv
FastKV is a real-time and high-performance persistent key-value store implemented by mmap. FastKV是由mmap实现的一个高实时性、高性能key-value持久化存储组件。
Stars: ✭ 163 (+262.22%)
Mutual labels:  key-value, store
keyv
Simple key-value storage with support for multiple backends.
Stars: ✭ 202 (+348.89%)
Mutual labels:  key-value, store
Zanredisdb
Yet another distributed kvstore support redis data and index. moved to: https://github.com/youzan/ZanRedisDB
Stars: ✭ 64 (+42.22%)
Mutual labels:  json, key-value
Unqlite
An Embedded NoSQL, Transactional Database Engine
Stars: ✭ 1,583 (+3417.78%)
Mutual labels:  json, key-value
Data Store
Easily get, set and persist config data. Fast. Supports dot-notation in keys. No dependencies.
Stars: ✭ 120 (+166.67%)
Mutual labels:  json, store
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (+1120%)
Mutual labels:  json, key-value
Squirrel Json
A vectorized JSON parser for pre-validated, minified documents
Stars: ✭ 43 (-4.44%)
Mutual labels:  json
Oakdex Pokedex
Ruby Gem and Node Package for comprehensive Generation 1-7 Pokedex data, including 809 Pokémon, uses JSON schemas to verify the data
Stars: ✭ 44 (-2.22%)
Mutual labels:  json
Mkvtoolnix Batch
Windows Batch script to automate batch processing using mkvtoolnix.
Stars: ✭ 42 (-6.67%)
Mutual labels:  json
Chinese Xinhua
📙 中华新华字典数据库。包括歇后语,成语,词语,汉字。
Stars: ✭ 8,705 (+19244.44%)
Mutual labels:  json
I18nplugin
Intellij idea i18next support plugin
Stars: ✭ 43 (-4.44%)
Mutual labels:  json
Jl Sql
SQL for JSON and CSV streams
Stars: ✭ 44 (-2.22%)
Mutual labels:  json
Jsonj
A fluent Java API for manipulating json data structures
Stars: ✭ 42 (-6.67%)
Mutual labels:  json
Excel2json
把Excel表转换成json对象,并保存到一个文本文件中。
Stars: ✭ 1,023 (+2173.33%)
Mutual labels:  json
Goloc
A flexible tool for application localization using Google Sheets.
Stars: ✭ 42 (-6.67%)
Mutual labels:  json
Wheel
关于net nio os cache db rpc json web http udp tcp mq 等多个小工具的自定义实现
Stars: ✭ 45 (+0%)
Mutual labels:  json
Pg variables
Session wide variables for PostgreSQL
Stars: ✭ 44 (-2.22%)
Mutual labels:  json
Dito
Dito.js is a declarative and modern web framework with a focus on API driven development, based on Objection.js, Koa.js and Vue.js – Released in 2018 under the MIT license, with support by Lineto.com
Stars: ✭ 44 (-2.22%)
Mutual labels:  json
Jsonview
A web extension that helps you view JSON documents in the browser.
Stars: ✭ 1,021 (+2168.89%)
Mutual labels:  json

microblob

microblob is a simplistic key-value store, that serves JSON documents from a file over HTTP. It is implemented in a few hundred lines of code and does not contain many features.

Warning: This server SHOULD NEVER BE EXPOSED PUBLICLY as it contains no security, rate-limiting or other safety measures whatsoever.

microblob was written in 2017 as an ad-hoc solution to replace a previous setup using memcachedb (which was getting slow). The main goal has been to serve about 200M JSON documents from a "persistent key-value store" over HTTP and to support frequent, fast rebuilds; with limited disk space and potentially limited memory. Code lacks tests and I would write it differently today. However, it ran without issues and happily served up to 400 requests/s with limited resources and with average response times of around 1ms.

DOI Project Status: Active – The project has reached a stable, usable state and is being actively developed.

This project has been developed for Project finc at Leipzig University Library.

$ cat file.ldj
{"id": "some-id-1", "name": "alice"}
{"id": "some-id-2", "name": "bob"}

$ microblob -key id file.ldj
INFO[0000] creating db fixtures/file.ldj.832a9151.db ...
INFO[0000] listening at http://127.0.0.1:8820 (fixtures/file.ldj.832a9151.db)

It supports fast rebuilds from scratch, as the preferred way to deploy this is for a build-once update-never use case. It scales up and down with memory and can serve hundred million documents and more.

Inspiration: So what's wrong with 1975 programming? Idea: Instead of implementing complicated caching mechanisms, we hand over caching completely to the operating system and try to stay out of its way.

Inserts are fast, since no data is actually moved. 150 million (1kB) documents can be serveable within an hour.

  • ㊗️ 2017-06-30 first 100 million requests served in production

Further documentation: docs/microblob.md

Update via curl

To send compressed data with curl:

$ curl -v --data-binary @- localhost:8820/update?key=id < <(gunzip -c fixtures/fake.ldj.gz)
...

Usage

Usage of microblob:
  -addr string
        address to serve (default "127.0.0.1:8820")
  -backend string
        backend to use: leveldb, debug (default "leveldb")
  -batch int
        number of lines in a batch (default 50000)
  -c string
        load options from a config (ini) file
  -create-db-only
        build the database only, then exit
  -db string
        the root directory, by default: 1000.ldj -> 1000.ldj.05028f38.db (based on flags)
  -ignore-missing-keys
        ignore record, that do not have a the specified key
  -key string
        key to extract, json, top-level only
  -log string
        access log file, don't log if empty
  -r string
        regular expression to use as key extractor
  -s string
        the config file section to use (default "main")
  -t    top level key extractor
  -version
        show version and exit

What it doesn't do

  • no deletions (microblob is currently append-only and does not care about garbage, so if you add more and more things, you will run out of space)
  • no compression (yet)
  • no security (anyone can query or update via HTTP)

Installation

Debian and RPM packages: see releases.

Or:

$ go get github.com/miku/microblob/cmd/...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].