Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

support memcached binary protocol #15

Open
erikfrey opened this issue Sep 10, 2012 · 5 comments
Open

support memcached binary protocol #15

erikfrey opened this issue Sep 10, 2012 · 5 comments

Comments

@erikfrey
Copy link
Contributor

Darner ought to support the memcached binary protocol:

  • It's simpler and faster to parse.
  • Some newer memcached libraries, such as dalli, support the binary protocol exclusively.
@klausbrunner
Copy link

I think that makes a lot of sense performance-wise and in terms of implementing clients. The mixed text-and-binary memcache protocol is just a PITA for writing a client.

On the other hand, if it's about clients, have you considered HTTP instead? I really think the Kestrel-memcache protocol variant is a bit of a hack (what with shoehorning some request parameters into the queue name, ignoring the flags, and forcing blocking waits on clients which may not be prepared for them), so why bother with it? Darner's API should map pretty well to a REST-style HTTP interface. Good HTTP server and client libraries are ubiquitous.

It might not be as space-efficient as a binary protocol, but the overhead isn't that big.

@erikfrey
Copy link
Contributor Author

@klausbrunner I'd hope at this point no one is actually writing memcache clients anymore, but I get what you mean.

An http API is a great idea. The darner queue/storage mechanism is separate from the memcache protocol, so it's pretty-well set up to add new protocols on top. Want to give it a try? :)

@klausbrunner
Copy link

I've been considering that. Problem is that last time I did serious work in C++, dinosaurs roamed the earth and Bjarne Stroustroup had a full head of hair. I have trouble even reading modern C++ sources. Any suggestions for a good and simple HTTP server library to use? I've briefly looked at cloudmeter/pion (seems a tad complex) and libmicrohttpd (C, so might be more effort to integrate).

@nova77
Copy link
Contributor

nova77 commented Nov 20, 2012

@klausbrunner netlib is pretty sweet and there are even talks about getting it into the next standard. However, because it is still in a rather early stage the api could change substantially before 1.0.

@klausbrunner
Copy link

@nova77 Thanks, this really looks nice. Not the least because there's some actual documentation ;-) Will give it a go one of these days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants