1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-24 00:30:49 +00:00
Beego/vendor/github.com/couchbase/gomemcached
2018-11-09 12:37:28 +08:00
..
client update mod 2018-11-09 12:37:28 +08:00
.gitignore update mod 2018-11-09 12:37:28 +08:00
LICENSE update mod 2018-11-09 12:37:28 +08:00
mc_constants.go update mod 2018-11-09 12:37:28 +08:00
mc_req.go update mod 2018-11-09 12:37:28 +08:00
mc_res.go update mod 2018-11-09 12:37:28 +08:00
README.markdown update mod 2018-11-09 12:37:28 +08:00
tap.go update mod 2018-11-09 12:37:28 +08:00

gomemcached

This is a memcached binary protocol toolkit in go.

It provides client and server functionality as well as a little sample server showing how I might make a server if I valued purity over performance.

Server Design

overview

The basic design can be seen in gocache. A storage server is run as a goroutine that receives a MCRequest on a channel, and then issues an MCResponse to a channel contained within the request.

Each connection is a separate goroutine, of course, and is responsible for all IO for that connection until the connection drops or the dataServer decides it's stupid and sends a fatal response back over the channel.

There is currently no work at all in making the thing perform (there are specific areas I know need work). This is just my attempt to learn the language somewhat.