Git Product home page Git Product logo

goki's Introduction

goki

A toy non-persistent(in-memory) Key-Value data store. Redis is the inspiration. I'll try to model this repo as close to redis as possible.

Allowed Data Types

  • Strings
  • Integer
  • Float (although redis doesn't really support, I've added it anyway)

Main Components

  • Server - is a webserver that you can start with the command goki-server start 8080
  • Client - is a REPL client that connects to the goki-server. Usage: goki-client connect 8080
Feature Tracker
  • Make Client REPL
  • Client Connects with server
  • Fixed Request and Response types
  • Print the results and errors in a better format on client REPL
  • Check Mutex locking and unlocking behaviour for the methods that interact with the store
  • Improve Logging format on server. Make it richer with the essential details alone
  • Add helper for similar commands? Provide suggestions like Did you mean? set get...
  • Show all commands supported helper
  • Good to have : Instead of using JSON over http, try and use some other lighter format for requests and response, like bencode
  • Commands tracker: persist for certain keys, a new data structure lists - l/r-push & l\r-pop
  • Add tests (for both client and server)
Supported Client Commands
  • set
  • get
  • del
  • exists
  • expire
  • ttl
  • incr
  • decr

Follow these steps to contribute or set up the dev env

  • fork/clone this repo
  • make you sure you have go installed and your GOPATH setup since we use go modules.
  • to run the server you can use the command go run server/main.go start 9000
  • to run the client you can use the command go run client/main.go connect 9000
  • Make your changes! :)

Also, it'll be great if you could help me set up realize or any other golang task runners for this!

Any feedback, suggestions and criticism's are very much welcome! :)

More information will be updated here soon.

goki's People

Contributors

kolharsam avatar

Stargazers

Paul Kuruvilla avatar

Watchers

James Cloos avatar  avatar

goki's Issues

check the Mutex part and it's usage across the functions

I seem to be misusing it in places by not being wise about the usage and not really keeping a track of it. It would help if the locks are added and removed from the same file? One place where things can wrong hence become easier to track.

add tests

Once this is done, or as this is being done, we can set up the CI/CD as well. Done.

add help suggestions for the client

On the feature tracker here: https://github.com/kolharsam/goki#feature-tracker

This issue tracks the 4th one on the list.

What needs to be done?

So, on the client, users can get pass a wrong command, like st for set or got for get, in such cases we can show information like what git or npm do.
Like so:

                      Did you mean any of these commands?
                          - set

If it's an unknown command altogether, then show a list of all currently supported commands!

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.