README.markdown
1# gomemcached
2
3This is a memcached binary protocol toolkit in [go][go].
4
5It provides client and server functionality as well as a little sample
6server showing how I might make a server if I valued purity over
7performance.
8
9## Server Design
10
11<div>
12 <img src="http://dustin.github.com/images/gomemcached.png"
13 alt="overview" style="float: right"/>
14</div>
15
16The basic design can be seen in [gocache]. A [storage
17server][storage] is run as a goroutine that receives a `MCRequest` on
18a channel, and then issues an `MCResponse` to a channel contained
19within the request.
20
21Each connection is a separate goroutine, of course, and is responsible
22for all IO for that connection until the connection drops or the
23`dataServer` decides it's stupid and sends a fatal response back over
24the channel.
25
26There is currently no work at all in making the thing perform (there
27are specific areas I know need work). This is just my attempt to
28learn the language somewhat.
29
30[go]: http://golang.org/
31[gocache]: gomemcached/blob/master/gocache/gocache.go
32[storage]: gomemcached/blob/master/gocache/mc_storage.go
33