goydb, a couchdb compatible embeddable database written in go

goydb

goydb, a couchdb compatible embeddable database written in go

Getting started (not embedded)

Using docker

mkdir data
docker run -e GOYDB_ADMINS=admin:test -v data:/usr/local/var/goydb -p 7070:7070 goydb/goydb:latest

From source (go get)

go get github.com/goydb/goydb/cmd/goydb
mkdir public
mkdir dbs
goydb

From source (git)

mkdir public
mkdir dbs
go run ./cmd/goydb

Getting started with embedded version

package main

import (
	"log"
	"net/http"

	"github.com/goydb/goydb/pkg/goydb"
)

func main() {
	// create new database default config
	cfg, err := goydb.NewConfig()
	if err != nil { 
		log.Fatal(err)
	}

	// create new database
	gdb, err := cfg.BuildDatabase()
	if err != nil {
		log.Fatal(err)
	}

	// expose http api
	err = http.ListenAndServe(cfg.ListenAddress, gdb.Handler)
	if err != nil {
		log.Fatal(err)
	}
}

Fauxton UI

goydb

Add fauxton container to the router.

import (
	"github.com/goydb/goydb/pkg/public"
	"github.com/goydb/utils"
)

...
cfg.Containers = []public.Container{
	utils.Fauxton{},
}
...

Is this production-ready?

No.

See another example at the cmd/goydb/main.go.

But why?

First, couchdb is awesome. This implementation is not aiming to replace couchdb. It just another part of the ecosystem, similar to PouchDB.

The aim is to be able to build golang apps with integrated couchdb technology. That means similar to pouchdb, integrate deeply with golang but enable sync to couchdb.

Couchdb has the right principles at its heart:

  • REST
  • HTTP
  • Map Reduce
  • JSON
  • Replication
  • Attachments
  • Mango

Things that are differert from couchdb:

  • Performance due to direct access to the database using golang apis (WIP)
  • Attachment not part of the document storage but saved as regular files on disk next to the documents (WIP)
  • Search is part of the main storage using https://github.com/blevesearch/bleve (WIP)

Things that I want to experiment with:

  • Validation / Schema
    • Allow json schema based validation
  • HTTP
    • Automatic OpenAPI specification
    • GraphQL support
    • Allow PATCH
    • Allow mango for update of documents
    • HTTP API for queues e.g. /{db}/_queue/{msg}
    • http vhost and proxies (https://github.com/goydb/vhost)
  • Rendering via
    • go templates
    • jq
  • Formats allow direct support for
    • yaml
    • bson
  • Backup
    • PIT backup
      • dump/restore via http
  • Instrumentation first class metrics support
  • Security
Similar Resources

Opinionated tool for database structure management and migrations

trek Requirements At least version 13 of postgres is needed. Installation go install . Setup Create config.yaml: model_name: model_name db_name: db

Dec 14, 2022

Database migration through structures - development

goMigration 基于 Golang 的数据库迁移工具,目前仍在开发中,有兴趣的小伙伴可以联系我一起~ 食用方法 go get https://github.com/DGuang21/goMigration 手动将其安装 可通过 gom gen create_c_user_table 方法生

Dec 2, 2021

A migration engine to deploy database changes in your golang + mongodb app.

bisonmigration A migration engine to deploy database changes in your golang + mongodb app. Migration files register their UP and DOWN functions in the

Jan 30, 2022

Simple Migration Tool - written in Go

Pravasan Simple Migration tool intend to be used for any languages, for any db. Please feel free to criticize, comment, etc. Currently this is working

Sep 26, 2022

Kivik provides a common interface to CouchDB or CouchDB-like databases for Go and GopherJS.

Kivik Package kivik provides a common interface to CouchDB or CouchDB-like databases. The kivik package must be used in conjunction with a database dr

Dec 29, 2022

A MongoDB compatible embeddable database and toolkit for Go.

A MongoDB compatible embeddable database and toolkit for Go.

lungo A MongoDB compatible embeddable database and toolkit for Go. Installation Example Motivation Architecture Features License Installation To get s

Jan 3, 2023

Extensible wiki system using CouchDB and written in Golang

Extensible wiki system using CouchDB and written in Golang

Wikifeat Introduction Wikifeat is an open source collaboration platform built around the ever-popular Wiki concept. It is meant to be extensible and h

Aug 23, 2022

BadgerDB is an embeddable, persistent and fast key-value (KV) database written in pure Go

BadgerDB is an embeddable, persistent and fast key-value (KV) database written in pure Go

BadgerDB BadgerDB is an embeddable, persistent and fast key-value (KV) database written in pure Go. It is the underlying database for Dgraph, a fast,

Dec 10, 2021

ArcticDB - an embeddable columnar database written in Go

ArcticDB - an embeddable columnar database written in Go

This project is still in its infancy, consider it not production-ready, probably has various consistency and correctness problems and all API will cha

Dec 29, 2022

A CouchDB client in Go(Golang)

pillow pillow is a CouchDB client in Go(Golang). Resources Installation Usage Example Installation Install pillow as you normally would for any Go pac

Nov 9, 2022

BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

BuntDB is a low-level, in-memory, key/value store in pure Go. It persists to disk, is ACID compliant, and uses locking for multiple readers and a sing

Dec 30, 2022

FlashDB is an embeddable, in-memory key/value database in Go

FlashDB is an embeddable, in-memory key/value database in Go

FlashDB is an embeddable, in-memory key/value database in Go (with Redis like commands and super easy to read)

Dec 28, 2022

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

NutsDB English | 简体中文 NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go. It supports fully serializable transacti

Jan 1, 2023

NutsDB a simple, fast, embeddable and persistent key/value store written in pure Go.

NutsDB a simple, fast, embeddable and persistent key/value store written in pure Go.

A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

Jan 9, 2023

An embeddable implementation of the Ngaro Virtual Machine for Go programs

Ngaro Go Overview This is an embeddable Go implementation of the Ngaro Virtual Machine. This repository contains the embeddable virtual machine, a rud

Dec 3, 2022

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development

Go bindings for Sciter Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust). Attention The ownership of project is tra

Dec 23, 2022

a dynamically typed, garbage collected, embeddable programming language built with Go

The agora programming language Agora is a dynamically typed, garbage collected, embeddable programming language. It is built with the Go programming l

Dec 30, 2022

Sabre is highly customisable, embeddable LISP engine for Go. :computer:

Sabre DEPRECATED: This repository is deprecated in favour much better slurp project and will be archived/removed soon. Sabre is highly customizable, e

May 23, 2021

Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.

quickjs Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter. These bindings are a WIP and do not match full parity wit

Dec 28, 2022
Comments
  • start work on a search index using bleve

    start work on a search index using bleve

    Enables the couchdb style search indexes using bleve.

    {
      "_id": "_design/ser",
      "_rev": "1-acb62226d5cacb7f699fd30a8f5e5294",
      "indexes": {
        "newSearch": {
          "analyzer": "standard",
          "index": "function (doc) {\n  index(\"name\", doc.name);\n}"
        }
      },
      "language": "javascript",
      "views": {}
    }
    
A database migration tool written in Go.

dbmagritte created by Austin Poor A database migration tool written in Go. Usage Commands: init: Set up the repo by creating a .dbmagritte.yaml file a

Jan 29, 2022
Database schema evolution library for Go

Try browsing the code on Sourcegraph! Darwin Database schema evolution library for Go Example package main import ( "database/sql" "log" "github.

Dec 5, 2022
Django style fixtures for Golang's excellent built-in database/sql library.

go-fixtures Django style fixtures for Golang's excellent built-in database/sql library. Currently only YAML fixtures are supported. There are two rese

Sep 26, 2022
Goose database migration tool - fork of https://bitbucket.org/liamstask/goose

goose Goose is a database migration tool. Manage your database schema by creating incremental SQL changes or Go functions. Goals of this fork github.c

Dec 30, 2022
Minimalistic database migration helper for Gorm ORM

Gormigrate Gormigrate is a minimalistic migration helper for Gorm. Gorm already has useful migrate functions, just misses proper schema versioning and

Dec 25, 2022
Database migrations. CLI and Golang library.

migrate Database migrations written in Go. Use as CLI or import as library. Migrate reads migrations from sources and applies them in correct order to

Dec 31, 2022
Dead simple Go database migration library.
Dead simple Go database migration library.

migrator Dead simple Go database migration library. Features Simple code Usage as a library, embeddable and extensible on your behalf Support of any d

Nov 9, 2022
Database migrations. CLI and Golang library.

Database migrations written in Go. Use as CLI or import as library.

May 30, 2021
A simple database migration tool using an sql.DB connection and fs.FS for the migration source

A simple database migration tool using an sql.DB connection and fs.FS for the migration source. It has no non-test dependencies.

Dec 7, 2022
mini tools handling migrasion database from cli

mini tools handling migrasion database from cli

Dec 13, 2021