GithubHelp home page GithubHelp logo

lucid-kv / lucid Goto Github PK

View Code? Open in Web Editor NEW
369.0 369.0 31.0 1008 KB

High performance and distributed KV store w/ REST API. ๐Ÿฆ€

Home Page: https://clintnetwork.gitbook.io/lucid/

License: MIT License

Rust 88.42% Dockerfile 0.40% HTML 10.52% Procfile 0.66%
distributed-cache docker encryption key-value key-value-store kv persistence rest-api rust sse

lucid's People

Contributors

dependabot[bot] avatar imclint21 avatar rigwild avatar saki-osive avatar shuni64 avatar slals avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lucid's Issues

Continue Warp Migration

Hey @CephalonRho,

I really enjoy the work that you do to migrate on warp, but we need to reimplement some minor stuff, it's the reason why I do this issue!

From Nickel migration

  • Display the WebUI (located in webui/dist) for the / route~[feb452c]
  • Re-Implement CORS (just the base to consume the API from the WebUI) [2c7a3e4]
  • Set the server response header
  • Implement Server requests logging [f3bf3cd]

New stuffs

  • Implement HTTPS support [#32]
  • Rename "warp drive engaged"
  • Graceful shutdown

If you want to achieve this, you can re-use the warp-migration branch.

Best regards

Create GitHub Actions

Hi,

It could be great to make a GitHub action that automatically adds Linux, Windows and Mac build each commit!

Best regards

[Roadmap][Alpha] Lucid Alpha Roadmap

Hi,

I will try to define the Roadmap of Lucid for the Alpha Version.

  • Improve CLI #47
  • Finish Warp Migration #30
    • Graceful shutdown
  • Achieve PATCH Operations #44 #56
    • Lock / Unlock
    • Increment / Decrement
    • Define / Cancel Expiration
  • Encryption with Serpent #26
    • In-memory data encryption / decryption
  • Server Sent Event #27
    • Broadcast key update and creation
  • Improve Logging
    • Add colored logs as an option
    • Create output log file (in /var/log/ under Unix)
    • Broadcast to stderr for warning or error entries

In my opinion, for now, we need to concentrate our work on core features and not on CLI/clients.

[Manifest] About Expiration

Hi,

About object expirations, what do you think @CephalonRho? We have two ways to proceed:

  1. Make a loop in a separated thread and drop items when the time is due.
  2. Check the expiration date when a GET is called and drop the object if it's expired.

Best regards

Go (golang) client

Hi!

I want to write a go client for my project and use Lucid. I would like to clarify the status of the project.
Have you abandoned development?

unable to run from quickstart docs

HI, I've created the lucid.yml in a working dir, copied from https://raw.githubusercontent.com/lucid-kv/lucid/master/.github/lucid.yml and am running the commands from the doc:

$ docker pull lucidkv/lucid
$ docker run -p 7020:7020 -v lucid.yml:/etc/lucid/lucid.yml lucidkv/lucid

The image pulls fine, but on run it fails:

~\lucid> docker pull lucidkv/lucid
Using default tag: latest
latest: Pulling from lucidkv/lucid
Digest: sha256:e01de90076070ced15ec03cdc0b30451be4b00b3edb40b190496386ca6545351
Status: Image is up to date for lucidkv/lucid:latest
docker.io/lucidkv/lucid:latest
~\lucid> docker run -p 7020:7020 -v ./lucid.yml:/etc/lucid/lucid.yml lucidkv/lucid
Error: Unable to read the Lucid configuration file: Is a directory (os error 21)

What needs to happen? I'm on Windows, docker enabled for linux containers.

[PUT] Method not allowed.

Hi,

I try to store a an object using the PUT method and I get a 405 error, and also when I change the JWT token (or remove it) nothing changes, I still have this error!

{
    "message": "Method not allowed."
}

Screenshot:

image

I'm on the warp-migration branch.

Best regards

Crash with Bombardier

Benchmark software used: https://github.com/codesenberg/bombardier

2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/
2019/11/02 00:21:47 [INFO] lucid.exe: GET /api/

thread '<unknown>' has overflowed its stack

RUSTSEC-2020-0146: arr! macro erases lifetimes

arr! macro erases lifetimes

Details
Package generic-array
Version 0.12.3
URL fizyk20/generic-array#98
Date 2020-04-09
Patched versions >=0.14.0
Unaffected versions <0.8.0

Affected versions of this crate allowed unsoundly extending
lifetimes using arr! macro. This may result in a variety of
memory corruption scenarios, most likely use-after-free.

See advisory page for additional details.

Moving configuration file parsing before fern

Hey @CephalonRho,

Do you think we can move the configuration parsing part before fern, I mean before Dispatch::new?

Why? To configure logging:

  • Log level globally
  • Log output to the filesystem
  • Log coloring
  • Maybe configure log format in the future

Maybe you can do that with a smarter view, and maybe you have put Dispatch here for a good reason, but I think it's a good thing to do that to improve logging.

Preview:

image

PS: I will surely close #49 because it's outdated

RUSTSEC-2018-0006: Uncontrolled recursion leads to abort in deserialization

Uncontrolled recursion leads to abort in deserialization

Details
Package yaml-rust
Version 0.3.5
URL chyh1990/yaml-rust#109
Date 2018-09-17
Patched versions >= 0.4.1

Affected versions of this crate did not prevent deep recursion while
deserializing data structures.

This allows an attacker to make a YAML file with deeply nested structures
that causes an abort while deserializing it.

The flaw was corrected by checking the recursion depth.

See advisory page for additional details.

Hot configuration with an API endpoint

Hi,

I think we can add a /api/settings endpoint to get and set configuration parameters!

The goal is to dynamically change the configuration like authentication or persistence without rebooting.

Best regards

Looking for a logo ๐Ÿฅณ

Hi,

I'm looking for a nice logo, if anyone has an idea, use this issue ๐Ÿ‘

Some guidelines:

  • Flat design
  • Not necessary include the name of the project

Thanks

Prevent Yaml Parsing Crash

If we can add configure serde_yaml to don't crash when we have missing configuration section if could be great ๐Ÿ‘Œ๐Ÿผ

[Manifest] Server Sent Events

Hi,

The SSE part will be implemented to broadcast objects changes, what could be the right endpoints in a REST API?

Best regards

Improve logging

Hey,

In Lucid we have a Logger impl that print logging information to the stdout.

It could be cool to implement some new stuff like this:

  • Fill a logging file, defined in the configuration file (by example /var/log/lucid.log on Linux)
  • Display the owner class (by example Server etc.)
  • The possibility of disabling logging (in the configuration file)
  • Use the proper output (stdout, stderr, etc)

Best regards

Unable to get the Lucid configuration folder.

Error on antergos (archlinux)

2019/10/30 00:48:48 [ERROR] ./lucid: Unable to initialize Lucid node.
2019/10/30 00:48:48 [ERROR] ./lucid: Unable to get the Lucid configuration folder.

Embed Web UI in the binary

Hi,

@CephalonRho now you have migrated to warp, do you know how we can serve webui/dist but packed into the binary and not from the folder?

I had spoken with @jolhoeft in the past to do this with Nickel in the past (nickel-org/nickel.rs#441), but with warp I don't know how we can do this.

Best regards

[Roadmap][Beta] Lucid Beta Roadmap

Hi,

This is the roadmap for Beta release.

  • Finish SSE
  • Get metas
  • Achieve Persistence
  • Achieve Compression
  • Achieve Dump/Restore commands
  • Achieve WebUI embedding
  • Finish PATCH operations
    • Define / Cancel Expiration
  • Some Optimizations
    • Optimize Serpent (if it's possible)
    • Check for warp xxx_enabled or check_xxx functions
    • Improve some status code to respect the documentation
  • Fix some problems
    • Look for the file upload problem

[Manifest] WebUI Requirements

Hey,

In order to begin the development of the WebUI, theses features are needed:

  • An endpoint to check the JWT authentication (maybe a builtin data already stored)
  • An endpoint to get some information about the health of the computer (CPU, RAM, etc)
  • An endpoint to get and set settings
  • [Optional] An endpoint to get all logs

Kind regards

[Manifest] About Encryption

Hi,

About the encryption, @Slals is currently implementing Serpent cipher in the block-cipher crate.

When it will be good, we can start integrating it with lucid!

Best regards

Failed to compile on Apple chip M1

The following is the failure information obtained after running cargo run:

error: failed to run custom build command for `ring v0.16.9`

But if I replace the ring package with ring = "0.16.20", it can run. Is it a compatibility problem? thanks.

[Manifest] Persistence

Hey,

I think that we can do two kinds of persistence:

  1. An iteration system, when each key is updated, the key and his value is stored.
  2. A snapshot system, at each time range (defined in configuration file), all the keys are stored.

Comment if you have any idea

[Proposition] Dump / Export

Hi,

While I was eating a cake I think about making exporting/dump function.

What do you think @CephalonRho?

Best regards

[Question] Renaming Lucid?

Hi,

From a certain time, I think about renaming Lucid to Lucy, I would like to keep this issue opened and I want to know what you think about that!

Anyway It's not really important, and I think we will keep this name, but if Lucy makes a consensus we will rename it.

Best regards

RUSTSEC-2016-0005: rust-crypto is unmaintained; switch to a modern alternative

rust-crypto is unmaintained; switch to a modern alternative

Details
Status unmaintained
Package rust-crypto
Version 0.2.36
URL DaGenix/rust-crypto#440
Date 2016-09-06
Unaffected versions > 0.2.36

The rust-crypto crate has not seen a release or GitHub commit since 2016,
and its author is unresponsive.

We recommend you switch to one of the following crates instead, depending on
which algorithms you need:

See advisory page for additional details.

Finish Docker creation

Hi,

Actually Lucid contains a Dockerfile but it doesn't really work and it's not pushed on Docker Hub.

Normally the Docker Organization is created right now, I will push the container when it will be done.

Best regards

About some locations

Hi,

I think we need to respect the standards with;

  • /etc/lucid/ as configuration folder
  • /var/log/ as the log folder

etc

@CephalonRho do you have an idea how to use /var/log by example for the fern part, and how we can do with Windows or Mac by example?

Best regards

[Manifest] About some operations (like LOCK, EXPIRE etc)

Hey,

Actually, the PATCH method is used to make special operations like this with a JSON object that define the operation and properties!

Maybe we can use some HTTP methods like LOCK / UNLOCK or an other way.

Actions Performing

This is some propositions to perform some operations.

Inline:

curl -XPATCH -d 'LOCK' 'https://localhost:7021/api/kv/hello_world'

Parameters:

curl -XPATCH -d 'operation=lock' 'https://localhost:7021/api/kv/hello_world'

Json:

curl -XPATCH -d '{"operation": "LOCK"}' 'https://localhost:7021/api/kv/hello_world'

Best regards

Add comments to documentation

I think it could be cool to have comments in documentation!

# When diskless replication is used, the master waits a configurable amount of
# time (in seconds) before starting the transfer in the hope that multiple replicas
# will arrive and the transfer can be parallelized.
#
# With slow disks and fast (large bandwidth) networks, diskless replication
# works better.
repl-diskless-sync no

Issue Opened on serde_yaml Github: dtolnay/serde-yaml#145

[Manifest] File Storage / Compression

Hi,

In a previous discussion with @CephalonRho we spoke about adding compression to Lucid to improve file storage capabilities.

This issue will be used to discuss about compression library to uses and something like that!

Best regards

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.