🦉owlcache is a lightweight, high-performance, non-centralized, distributed Key/Value memory-cached data sharing application written by Go

Related tags

Caching owlcache
Overview

English | 中文简介

🦉 owlcache

Image text

License release

🦉 owlcache is a lightweight, high-performance, non-centralized, distributed Key/Value memory-cached data sharing application written by Go (used as a lightweight database in certain scenarios).

Highlights and features

  • 💡 Cross-platform operation
  • 🚀 Single node ultra high performance
  • Non-centralized, distributed
  • 🌈 Data concurrency security
  • 🔍 Support data expiration
  • 🖥 Key/Value Data storage
  • 🎨 Easy to use, only a few operating commands
  • ⚔️ Authentication
  • 📝 Logging
  • 🔭 Support both TCP and HTTP/HTTPS connections
  • 🍻 Support Memcache, Redis data import(String)

Documentation

Image text

Design

Image text

How to compile

Compilation environment requirements

  • golang >= 1.9

Source download

  • Go command download (will automatically download the dependent library, if you directly download the source code will prompt the class library is missing)
go get -u github.com/xssed/owlcache

If 'go mod' is ON in your go locale, you need to create a directory locally on your computer, enter the directory, and execute git clone https://github.com/xssed/owlcache.gitCommand to download the source code.

Build

  • Enter the owlcache home directory and execute the compilation command (in gopath mode, enter the owlcache home directory of gopath directory, and in gomod mode, enter the local directory you created in the previous prompt)
go build

Run

  • Note that the owlcache.conf file should be in the same directory as the main program.
  • The .conf configuration file must be a uniform UTF-8 encoding.
  • Set the option in the configuration file owlcache.conf.

Linux

./owlcache

Windows (DOS)

  • Note: In the Windows production environment deployment, it is found that the memory release will be relatively slow after the query request processing, and will be released within about half an hour. Linux does not have this problem, which is related to Go's internal mechanism.
owlcache

Parameter help

  • You can check out the help before running.
  • Note that the runtime configuration parameters take precedence over the configuration parameters in the *.conf file.
owlcache -help
Welcome to use owlcache. Version:XXX
If you have any questions,Please contact us: [email protected]
Project Home:https://github.com/xssed/owlcache
                _                _
   _____      _| | ___ __ _  ___| |__   ___
  / _ \ \ /\ / / |/ __/ _' |/ __| '_ \ / _ \
 | (_) \ V  V /| | (_| (_| | (__| | | |  __/
  \___/ \_/\_/ |_|\___\__,_|\___|_| |_|\___|

Usage of owlcache:
  -config string
        owlcache config file path.[demo:/var/home/owl.conf] (default "owlcache.conf")
  -host string
        binding local host ip address. (default "0.0.0.0")
  -log string
        owlcache log file path.[demo:/var/log/] (default "./log_file/")
  -pass string
        owlcache Http connection password. (default "")

Example with configuration parameter run

owlcache -config /var/home/owl.conf -host 127.0.0.1 -log /var/log/ -pass 1245!df2A

Simple use example

Single node to get the Key value

  • TCP command: get \n
get hello\n
  • HTTP Note: HTTP access data is not verified by password, only other operations that change data require authentication.
Request parameter Parameter value
cmd get
key key name
http://127.0.0.1:7721/data/?cmd=get&key=hello

Response result example:

{
    "Cmd": "get",
    "Status": 200,
    "Results": "SUCCESS",
    "Key": "hello",
    "Data": "world",
    "ResponseHost": "127.0.0.1:7721",
    "KeyCreateTime": "2019-04-24T18:05:10.9132377+08:00"
}

The cluster obtains the Key value.

  • Suppose there are now three owlcache services: 127.0.0.1: 7721, 127.0.0.1:7723, 127.0.0.1:7725. Each service has a data called Key called hello.
Request parameter Parameter value
cmd get
key key name
http://127.0.0.1:7721/group_data/?cmd=get&key=hello

Response result example:

{
    "Cmd": "get",
    "Status": 200,
    "Results": "SUCCESS",
    "Key": "hello",
    "Data": [
        {
            "Address": "127.0.0.1:7723",
            "Data": "world7723",
            "KeyCreateTime": "2019-04-10T13:43:01.6576413+08:00",
            "Status": 200
        },
        {
            "Address": "127.0.0.1:7721",
            "Data": "world7721",
            "KeyCreateTime": "2019-04-09T17:50:59.458104+08:00",
            "Status": 200
        },
        {
            "Address": "127.0.0.1:7725",
            "Data": "world7725",
            "KeyCreateTime": "2019-04-08T14:32:20.6934487+08:00",
            "Status": 200
        }
    ],
    "ResponseHost": "127.0.0.1:7721",
    "KeyCreateTime": "0001-01-01T00:00:00Z"
}

...more please refer to the detailed description of the document

Development and discussion(not involved in business cooperation)

You might also like...
LevelDB style LRU cache for Go, support non GC object.

Go语言QQ群: 102319854, 1055927514 凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa LRU Cache Install go get github.com/chai2010/c

A zero-dependency cache library for storing data in memory with generics.

Memory Cache A zero-dependency cache library for storing data in memory with generics. Requirements Golang 1.18+ Installation go get -u github.com/rod

go-pmem is a project that adds native persistent memory support to Go.

Introduction go-pmem is a project that adds native persistent memory support to Go. This is achieved through a combination of language extensions, com

An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC

GCache Cache library for golang. It supports expirable Cache, LFU, LRU and ARC. Features Supports expirable Cache, LFU, LRU and ARC. Goroutine safe. S

Design and Implement an in-memory caching library for general use

Cache Implementation in GoLang Problem Statement Design and Implement an in-memory caching library for general use. Must Have Support for multiple Sta

A simple generic in-memory caching layer

sc sc is a simple in-memory caching layer for golang. Usage Wrap your function with sc - it will automatically cache the values for specified amount o

Efficient cache for gigabytes of data written in Go.

BigCache Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance. BigCache keeps entries on hea

Ristretto is a fast, concurrent cache library built with a focus on performance and correctness.
Ristretto - A fast, concurrent cache library built with a focus on performance and correctness

Ristretto Ristretto is a fast, concurrent cache library built with a focus on pe

Releases(V0.4.3-beta)
Owner
d4rkdu0
治本于农,务兹稼穑。
d4rkdu0
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.

go-cache go-cache is an in-memory key:value store/cache similar to memcached that is suitable for applications running on a single machine. Its major

Patrick Mylund Nielsen 6.5k Oct 2, 2022
A REST-API service that works as an in memory key-value store with go-minimal-cache library.

A REST-API service that works as an in memory key-value store with go-minimal-cache library.

HarunBuyuktepe 2 Aug 25, 2022
Ristretto - A high performance memory-bound Go cache

Ristretto Ristretto is a fast, concurrent cache library built with a focus on pe

Outcaste, Inc. 65 Sep 3, 2022
cyhone 129 Sep 21, 2022
gdcache is a pure non-intrusive distributed cache library implemented by golang

gdcache is a pure non-intrusive distributed cache library implemented by golang, you can use it to implement your own distributed cache

Jovan 9 Mar 24, 2022
Fast key-value cache written on pure golang

GoCache Simple in-memory key-value cache with default or specific expiration time. Install go get github.com/DylanMrr/GoCache Features Key-value stor

Dmitriy Eginov 1 Nov 16, 2021
Gocodecache - An in-memory cache library for code value master in Golang

gocodecache An in-memory cache library for code master in Golang. Installation g

Takuo Oki 3 Jun 23, 2022
Cachy is a simple and lightweight in-memory cache api.

cachy Table of Contents cachy Table of Contents Description Features Structure Configurability settings.json default values for backup_file_path Run o

Hayrullah cansu 4 Apr 24, 2022
An embedded key/value database for Go.

bbolt bbolt is a fork of Ben Johnson's Bolt key/value store. The purpose of this fork is to provide the Go community with an active maintenance and de

etcd-io 5.9k Sep 23, 2022
🧩 Redify is the optimized key-value proxy for quick access and cache of any other database throught Redis and/or HTTP protocol.

Redify (Any database as redis) License Apache 2.0 Redify is the optimized key-value proxy for quick access and cache of any other database throught Re

Dmitry Ponomarev 3 Sep 25, 2022