Giter VIP home page Giter VIP logo

redis's Introduction


Becoming a full Redis implementation in Go

This project started to see how easy it is to implement a full Redis clone in Go. As one of the side effects, imagine you could write redis modules in Go, that would be awesome!

Get involved!

This project is in work-in-progress, so share ideas, code and have fun.

The goal is to have all features and commands like the actual redis written in C have. We are searching contributors!

Documentation

godoc: https://godoc.org/github.com/redis-go/redis

Getting Started

You can already test out the API.

To install, run:

go get -u github.com/redis-go/redis

Roadmap

  • Client connection / request / respond
  • RESP protocol
  • able to register commands
  • in-mem database
  • active key expirer
  • Implementing data structures
    • String
    • List
    • Set
    • Sorted Set
    • Hash
    • ...
  • Tests
    • For existing commands
    • For key expirer
  • Alpha Release

TODO beside Roadmap

  • Persistence
  • Redis config
    • Default redis config format
    • YAML support
    • Json support
  • Pub/Sub
  • Redis modules
  • Benchmarks
  • master slaves
  • cluster
  • ...

redis's People

Contributors

robinbraemer 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

Watchers

 avatar

redis's Issues

go test is kicking up some noise

I just ran go test on this repo and see

this is first of many
ub.com/redis-go/redis $ go test
--- FAIL: TestKeyExpirer (1.00s)
    keyexpire_test.go:11: 
        	Error Trace:	keyexpire_test.go:11
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
pie@peach /cryptdata6/var/log/tmp/shared/gopath/src/github.com/redis-go/redis $ go test
--- FAIL: TestKeyExpirer (1.00s)
    keyexpire_test.go:11: 
        	Error Trace:	keyexpire_test.go:11
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestKeyExpirer
    keyexpire_test.go:12: 
        	Error Trace:	keyexpire_test.go:12
        	Error:      	Received unexpected error:
        	            	dial tcp :6379: connect: connection refused
        	Test:       	TestKeyExpirer
KEY: lpushkey
CREATED NEW LIST
KEY: lpushkey
KEY: lpushkey
KEY: lpushkey2
CREATED NEW LIST
KEY: list
CREATED NEW LIST
--- FAIL: TestLRangeCommand (9.00s)
    list_test.go:57: 
        	Error Trace:	list_test.go:57
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34116->127.0.0.1:6379: i/o timeout
        	Test:       	TestLRangeCommand
    list_test.go:58: 
        	Error Trace:	list_test.go:58
        	Error:      	Should not be zero, but was 
        	Test:       	TestLRangeCommand
    list_test.go:59: 
        	Error Trace:	list_test.go:59
        	Error:      	Should NOT be empty, but was 
        	Test:       	TestLRangeCommand
    list_test.go:62: 
        	Error Trace:	list_test.go:62
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34118->127.0.0.1:6379: i/o timeout
        	Test:       	TestLRangeCommand
    list_test.go:63: 
        	Error Trace:	list_test.go:63
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestLRangeCommand
--- FAIL: TestPingCommand (6.00s)
    redis_test.go:24: 
        	Error Trace:	redis_test.go:24
        	Error:      	Not equal: 
        	            	expected: "PONG"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-PONG
        	            	+
        	Test:       	TestPingCommand
    redis_test.go:25: 
        	Error Trace:	redis_test.go:25
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34120->127.0.0.1:6379: i/o timeout
        	Test:       	TestPingCommand
    redis_test.go:30: 
        	Error Trace:	redis_test.go:30
        	Error:      	Not equal: 
        	            	expected: "Hello, redis server!"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-Hello, redis server!
        	            	+
        	Test:       	TestPingCommand
    redis_test.go:31: 
        	Error Trace:	redis_test.go:31
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34122->127.0.0.1:6379: i/o timeout
        	Test:       	TestPingCommand
--- FAIL: TestSetCommand (9.00s)
    redis_test.go:36: 
        	Error Trace:	redis_test.go:36
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestSetCommand
    redis_test.go:37: 
        	Error Trace:	redis_test.go:37
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34124->127.0.0.1:6379: i/o timeout
        	Test:       	TestSetCommand
    redis_test.go:40: 
        	Error Trace:	redis_test.go:40
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestSetCommand
    redis_test.go:41: 
        	Error Trace:	redis_test.go:41
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34126->127.0.0.1:6379: i/o timeout
        	Test:       	TestSetCommand
    redis_test.go:44: 
        	Error Trace:	redis_test.go:44
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestSetCommand
    redis_test.go:45: 
        	Error Trace:	redis_test.go:45
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34128->127.0.0.1:6379: i/o timeout
        	Test:       	TestSetCommand
--- FAIL: TestGetCommand (3.00s)
    redis_test.go:50: 
        	Error Trace:	redis_test.go:50
        	Error:      	Not equal: 
        	            	expected: "v"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-v
        	            	+
        	Test:       	TestGetCommand
    redis_test.go:51: 
        	Error Trace:	redis_test.go:51
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34130->127.0.0.1:6379: i/o timeout
        	Test:       	TestGetCommand
--- FAIL: TestDelCommand (6.00s)
    redis_test.go:56: 
        	Error Trace:	redis_test.go:56
        	Error:      	Not equal: 
        	            	expected: 0
        	            	actual  : 2
        	Test:       	TestDelCommand
    redis_test.go:57: 
        	Error Trace:	redis_test.go:57
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34132->127.0.0.1:6379: i/o timeout
        	Test:       	TestDelCommand
    redis_test.go:61: 
        	Error Trace:	redis_test.go:61
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34134->127.0.0.1:6379: i/o timeout
        	Test:       	TestDelCommand
--- FAIL: TestTtlCommand (15.00s)
    redis_test.go:66: 
        	Error Trace:	redis_test.go:66
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestTtlCommand
    redis_test.go:67: 
        	Error Trace:	redis_test.go:67
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34136->127.0.0.1:6379: i/o timeout
        	Test:       	TestTtlCommand
    redis_test.go:69: 
        	Error Trace:	redis_test.go:69
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestTtlCommand
    redis_test.go:70: 
        	Error Trace:	redis_test.go:70
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34138->127.0.0.1:6379: i/o timeout
        	Test:       	TestTtlCommand
    redis_test.go:73: 
        	Error Trace:	redis_test.go:73
        	Error:      	Should be true
        	Test:       	TestTtlCommand
        	Messages:   	ttl: 0
    redis_test.go:74: 
        	Error Trace:	redis_test.go:74
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34142->127.0.0.1:6379: i/o timeout
        	Test:       	TestTtlCommand
    redis_test.go:77: 
        	Error Trace:	redis_test.go:77
        	Error:      	Not equal: 
        	            	expected: -2000000000
        	            	actual  : 0
        	Test:       	TestTtlCommand
    redis_test.go:78: 
        	Error Trace:	redis_test.go:78
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34144->127.0.0.1:6379: i/o timeout
        	Test:       	TestTtlCommand
    redis_test.go:81: 
        	Error Trace:	redis_test.go:81
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34146->127.0.0.1:6379: i/o timeout
        	Test:       	TestTtlCommand
    redis_test.go:82: 
        	Error Trace:	redis_test.go:82
        	Error:      	Not equal: 
        	            	expected: -1000000000
        	            	actual  : 0
        	Test:       	TestTtlCommand
--- FAIL: TestExpiry (6.01s)
    redis_test.go:87: 
        	Error Trace:	redis_test.go:87
        	Error:      	Received unexpected error:
        	            	read tcp 127.0.0.1:34148->127.0.0.1:6379: i/o timeout
        	Test:       	TestExpiry
    redis_test.go:88: 
        	Error Trace:	redis_test.go:88
        	Error:      	Not equal: 
        	            	expected: "OK"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-OK
        	            	+
        	Test:       	TestExpiry
FAIL
exit status 1
FAIL	github.com/redis-go/redis	58.064s

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.