Google Go Client and Connectors for Redis
Failed to load latest commit information.
bench MOD (extensive) - properly support QUIT for async clients -- TESTED Sep 14, 2012
compliance MOD (extensive) - properly support QUIT for async clients -- TESTED Sep 14, 2012
examples ADD PubSub - support PubSub PUBLISH - TESTED Sep 17, 2012
test NOP TESTS - move client tests to test/ - TESTED Sep 24, 2012
.gitignore Remove unnecessary Timer & Signal in future.go - ADHOC TESTED Feb 13, 2012
LICENSE initial commit Nov 14, 2009
NOTICE update NOTICE file. Apr 18, 2012
README.markdown NOP update README May 11, 2012
asynchclient.go REFACT - extensive - Cleanup connection cruft from 2009 - TESTED Sep 17, 2012
changelog minor cleanup & update to go r60.1 compliant with redis 2.2.13 - TESTED Sep 21, 2011
compliance_note.txt NOP - updated info files for Go 1 release Mar 30, 2012
connection.go MOD - cleanup error handling - TESTED Sep 24, 2012
connection_test.go NOP MOD - Review top level test code -- TESTED Sep 20, 2012
error.go NOP - remove debug code Sep 24, 2012
error_test.go API CHANGE - Cleanup Error - TESTED Sep 23, 2012
future.go Clarified the semantics of the TryGet funcs in futures - ADHOC TESTED Feb 13, 2012
future_test.go NOP MOD - Review top level test code -- TESTED Sep 20, 2012
protocol.go NOP - do not export unnecessary consts - TESTED Sep 24, 2012
pubsubclient.go API CHANGE - Cleanup Error - TESTED Sep 24, 2012
redis.go ADD WIP - PubSubConnection impl - ADHOC TESTED Sep 21, 2012
redisfutures.go Clarified the semantics of the TryGet funcs in futures - ADHOC TESTED Feb 13, 2012
specification.go WIP - PubSub working; WIP is timeout (general) and PSUB/PUNSUB - ADHO… Sep 23, 2012
synchclient.go API CHANGE - Cleanup Error - TESTED Sep 24, 2012



Go Clients and Connectors for Redis.

The initial release provides the interface and implementation supporting the (~) full set of current Redis commands using synchrnous call semantics. (Pipelines and asychronous goodness using the goroutines and channels is next.)

Hope to add rigorous tests as soon as I have a better understanding of the Go language tools. Same applies to the makefile.
Also am not sure regarding the efficiency of the implementation (for the obvious reasons), but definitely a goal is to make this a high performance connector.


The code is consolidated into a single 'redis' package and various elements of it are usable independently (for example if you wish to roll your own API but want to use the raw bytes protocol handling aspects).


Both Go and Redis are dynamic projects and present a challenge in fully covering the possible combinations in the wild. Given the release of Go 1, this project will focus on Go 1 based Redis compatibility; we'll deal with the far off prospect of renewed major weekly changes in Go if and when that arises.

Current status is compatible with Redis 2.4.n (2.4.9 tested) and Go 1. Redis feature set is not fully covered and is WIP.

(Always refer to compliance_note.txt for current (accurate) status for specific branches.)

Getting started:

Get, build, and startup Redis:

chmod +x redis-server
./redis-server redis.conf


alphazero[13]:entrevous$ telnet localhost 6379
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Connected to localhost.
Escape character is '^]'.



Connection closed by foreign host.

get, and install, Go-Redis

Go-Redis is built using the Go tool. The tool assumes the code will be in a folder $GOPATH/src/redis .

cd $GOPATH/src
git clone git:// redis
cd redis
go install

Confirm the install has created redis.a in your $GOPATH/pkg/ folder:

ls -l $GOPATH/pkg/"$GOOS"_"$GOARCH"/redis.a

e.g. on my Mac OS X (64b)

ls -l <my-gopath>/pkg/darwin_amd64

run the benchmarks

Basic benchmarks are in ~/bench. Use Go tool (go run ) to run the individual bench apps.

cd bench
# run the asyncbench.go 
go run asyncbench.go


Ciao.go is a sort of hello world for redis and should get you started for the barebones necessities of getting a client and issuing commands.

cd examples
go run ciao.go