binary protocol?

24 views
Skip to first unread message

dormando

unread,
May 9, 2019, 5:58:59 PM5/9/19
to memc...@googlegroups.com
Yo,

Any of you out there really _like_ the binary protocol? Aside from the
features it gives (CAS everywhere, pipelining, etc).

just thinkin' through some things.

Thanks,
-Dormando

Om Kale

unread,
May 9, 2019, 6:24:26 PM5/9/19
to memc...@googlegroups.com
Hey Dormando,
As of now only binary protocol supports SASL. 
Correct me if I am wrong but to ensure compatibility with SASL and libmemcached clients we would need binary protocol support right?


Thanks and Regards,
Om Kale



--

---
You received this message because you are subscribed to the Google Groups "memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memcached+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/memcached/alpine.DEB.2.21.1905091457160.27082%40dskull.
For more options, visit https://groups.google.com/d/optout.

dormando

unread,
May 9, 2019, 6:28:44 PM5/9/19
to memc...@googlegroups.com
Indeed we would. SASL is actually a text based protocol, as it's used in
SMTP and similar. That shouldn't be too bad.

On Thu, 9 May 2019, Om Kale wrote:

> Hey Dormando,As of now only binary protocol supports SASL. 
> Correct me if I am wrong but to ensure compatibility with SASL and libmemcached clients we would need binary protocol support right?
>
>
> Thanks and Regards,Om Kale
>
>
>
> On Thu, May 9, 2019 at 2:58 PM dormando <dorm...@rydia.net> wrote:
> Yo,
>
> Any of you out there really _like_ the binary protocol? Aside from the
> features it gives (CAS everywhere, pipelining, etc).
>
> just thinkin' through some things.
>
> Thanks,
> -Dormando
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to memcached+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/memcached/alpine.DEB.2.21.1905091457160.27082%40dskull.
> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to memcached+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/memcached/CANvBZ%3DvraaTi48Yu-a07gfc-OCAJ%3DfJfA_z97XA3UvjFretK5g%40mail.gmail.com.

dormando

unread,
May 9, 2019, 7:15:34 PM5/9/19
to memc...@googlegroups.com
To that end, I think SASL's confused everyone who's ever met it, and I
don't think anyone actually asked for it back in binprot days.

Said I was going to do this before but hadn't... Lets try something
simple, and if someone asks for SASL I think it's actually easy:

client connect:
set auth 0 0 [length]
username password
\r\n

... and if you get back a STORED, you're good to go. if you try to run any
other command you'll get:

CLIENT_ERROR unauthorized

password database is a username:password\n file on disk, reloaded when it
changes. no fancy datastructures so will get slow if people use a billion
users. user's don't do anything, but putting them there now in case we
ever decide to.

if we ever decide to support SASL again:

client connect:
get mech-list
MECH CRAM-MD5 PLAIN ETC
END

set sasl-step 0 0 [length]
data
STORED

get authenticated
[indicates done or STEP if SASL requires more steps]

... extra roundtrip in the protocol but this could be solved with
mget/mset.
> To view this discussion on the web visit https://groups.google.com/d/msgid/memcached/alpine.DEB.2.21.1905091527370.27082%40dskull.

Roberto Spadim

unread,
May 9, 2019, 7:50:11 PM5/9/19
to memc...@googlegroups.com
maybe could be used something like flatbuffers?


For more options, visit https://groups.google.com/d/optout.


--
Roberto Spadim

dormando

unread,
May 9, 2019, 7:53:16 PM5/9/19
to memc...@googlegroups.com
flatbuffers are unrelated to protocol, and are definitely not backwards
compatible with ascii :p
> https://groups.google.com/d/msgid/memcached/CAH3kUhGq%2B5FpF8C4wDDPFijMwEka8Q4cKGu%2B43vOJqiB__P7_Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages