First version TODO
dormando opened this issue · comments
It compiles and connects and does things, but it's not quite there yet.
First pass missing:
- meta response API
- meta response flag parser helper API
- completion of buffer_consume() so more than one request/response will work :)
- stats call response parsing
- complete ASCII
get
handling (needs to watch forEND
) - NONBLOCK mode. Most of the WANT_READ/WANT_WRITE codes are in place already.
Missing API:
- various connect wrappers for unix sockets, local TCP binding, etc.
- UDP support (unclear if/when I'll add this)
Missing infrastructure:
- autotools for building examples?
- can this just be a header file? (need private structs/functions?)
- basic testing infrastructure. I'd prefer a header that gets included if building in test/debug mode. Then it can bash on internal-only functions.
- example "simple C client"
- ifdef cpp wrapper bits for C++ users.
Decisions:
- should
mcmc_read_value()
use iovec's instead of a loop?
... should add an explicit function for iovecs. - should
mcmc_read_value()
attempt to read the trailing\r\n
into the stack and avoid returning it to the user?
... decided to return the value with the \r\n to the user. - should this client support non-meta commands at all? (would put the minimum server version at 1.6, roughly)
- how/should we support setting/system commands? metadump/watch? (leaning towards no)
Next major work:
- TLS support. How much does this change the API? can it ifdef and/or be a different set of calls?
- example "selector object" API and code. ie: crc32/ketama selection.
- full "simple" C client?
- iovec interface for reading values.
Reworked the response parsing to use a union struct instead of many function calls. Also removes a lot of pointer checks and copying internally.
been poking at this slowly as I was on other things for quite a while. did most of the nonblock stuff and a few cleanups a while ago.
looks like I need a sendmsg() alt for mcmc_send_request(), so that's next :)