CARVIEW |
alphazero / Go-Redis
- Source
- Commits
- Network (3)
- Issues (2)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
Google Go Client and Connectors for Redis — Read more
name | age | message | |
---|---|---|---|
![]() |
LICENSE | Sat Nov 14 18:48:34 -0800 2009 | initial commit [alphazero] |
![]() |
NOTICE | Sun Nov 29 06:12:18 -0800 2009 | thanks to Mamading Ceesay (gh: evangineer) for ... [alphazero] |
![]() |
README.markdown | Thu Dec 03 12:51:36 -0800 2009 | update the main README [alphazero] |
![]() |
bench/ | Mon Jan 11 08:48:48 -0800 2010 | Update of source files to keep new go parser (g... [alphazero] |
![]() |
examples/ | Thu Dec 03 12:23:00 -0800 2009 | cleaned up the Makefile -- make install does th... [alphazero] |
![]() |
src/ | Mon Jan 11 08:48:48 -0800 2010 | Update of source files to keep new go parser (g... [alphazero] |
Go-Redis
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.
structure
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).
Getting started:
Get, build, and startup Redis:
make
chmod +x redis-server
./redis-server redis.conf
Confirm:
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
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
PING
+PONG
INFO
$282
redis_version:1.07
arch_bits:32
uptime_in_seconds:72
uptime_in_days:0
connected_clients:1
connected_slaves:0
used_memory:295232
changes_since_last_save:1
bgsave_in_progress:0
last_save_time:1259873372
total_connections_received:4
total_commands_processed:5
role:master
QUIT
Connection closed by foreign host.
alphazero[14]:entrevous$
build and install
To build and install Go-Redis, from the root directory of the git clone:
cd src/pkg/redis
make clean && make install
cd -
Confirm the install:
ls -l $GOROOT/pkg/"$GOOS"_"$GOARCH"/redis.a
run the benchmarks
After installing Go-Redis (per above), try (again from the root dir of Go-Redis):
cd bench
./runbench synchclient
./runbench gosynchclient
examples
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
./run ciao