Protocol questions

Dustin Sallings dustin at spy.net
Sat Mar 1 18:51:57 UTC 2008


On Mar 1, 2008, at 10:23, Brian Aker wrote:

> Yes, we could do stats (aka fetch some minimal data)... but why not  
> just push it each time out?
>
> It would save a round trip, also, as the server is around longer  
> these problems are just going to get more complex.


	As much as I didn't like the idea of having to detect the protocols,  
it does solve one of your problems:

> Tell me:
> 1) Is UDP on.

	Try to send a message to it?

> 2) Version

	version command

> 3) Port for binary protocol

	Same as your UDP discovery -- assume it's the same port, try talking  
to it.

> 4) Cache implementation.

	I'm not sure how relevant this is in general for a client, but either  
version or stats can do this.

> 5) Total Cache size.

	Stats already does this.


	Now, stats is a little free-form, which is why there's still no  
binary protocol implementation of stats (I haven't tried to come up  
with anything better than processing the input and dumping the text  
without killing flexibility).  Perhaps it could do something  
considerably different in the binary protocol.  Perhaps it's fine the  
way it is.

	There's been talk of a ``capabilities'' type command.  I think it'd  
start looking like stats really quickly.

-- 
Dustin Sallings





More information about the memcached mailing list