zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michi Mutsuzaki <mi...@cs.stanford.edu>
Subject Re: Zookeeper protocol weirdness and pure Python kazoo client
Date Thu, 30 Aug 2012 23:50:07 GMT
Hi Ben,

> Based on the pookeeper code (https://github.com/maguro/pookeeper), I've implemented a
version of kazoo that uses the wire protocol and is pure Python (https://github.com/python-zk/kazoo/tree/pure-python).
Speaking to Zookeeper directly has been quite interesting. All the documentation assumes one
uses the C/Java libs, so what actually happens doesn't seem to be cleanly or clearly defined
anywhere beyond the implementations. Is there an actual spec somewhere?

I don't think there is an official spec beyond the zookeeper.jute
file. It would be very helpful if you can share what you have found
implementing your python client.

> One of the oddities of passing a bad auth packet (ie, saying 'asdfjasdf' instead of 'digest'),
is that Zookeeper returns an auth packet -4 with an error header, and then drops the connections.
In the state diagram, the client is expected to 'end'. That's fine and all, my client happened
to reconnect the first time with the prior session id/password.... which was still valid.
Is this expected behavior?

I think this is expected. ZooKeeper should not expire a session
because of authentication failure. That would make it easier for a
malicious client to expire random sessions. I don't know if there is a
technical reason for dropping the connection though. Maybe it was an
arbitrary decision?

--Michi

Mime
View raw message