Giter Site home page Giter Site logo

baajarmeh / owlcache Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xssed/owlcache

0.0 1.0 0.0 4.08 MB

🦉owlcache is a lightweight, high-performance, non-centralized, distributed Key/Value memory-cached data sharing application written by Go . keyword : golang cache、go cache、golang nosql

Home Page: https://www.xsser.cc/owlcache/index.html

License: Apache License 2.0

Go 99.53% Shell 0.47%

owlcache's Introduction

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 <key>\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)

owlcache's People

Contributors

xssed avatar

Watchers

 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.