zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Tunnicliffe <...@beobal.com>
Subject Re: counter with zookeeper
Date Thu, 02 Dec 2010 15:25:42 GMT
Hi Claudio,

we have a very similar use case, and developed http://github.com/talis/h1 to
meet it. Initially, we coded up the simplest thing we thought could work and
deployed it, figuring that we'd have plenty of scope for improvement once we
saw it running with real load. However, to date its been ticking over so
well we've not really had cause to spend any further effort on it. HTTP
obviously adds an overhead, but to be honest, latency has not been a problem
for us and we typically see response times of a few ms. Contention over keys
is not particularly high in our application, so we've not had problems there



Sam Tunnicliffe
Head of Development, Platform Division
Talis Systems Ltd

On 2 December 2010 14:29, Claudio Martella <claudio.martella@tis.bz.it>wrote:

> Hi,
> I'm trying to implement a String->Long dictionary, as I'm doing text
> processing in M/R and would like to speed up my things.
> In order to implement the mapping, I need to access a high speed atomic
> counter that allows me to pick the latest used Long, increment it and
> use it for the latest-discovered new word to put in the dictionary.
> At first i thought about using a regular sequential znode and use the
> sequence number as the counter value, but I realize the sequence number
> is an int, while i'd like a long. Is that correct? I'm refering to
> Stat.getVersion() in the API.
> In case this strategy is unfeasible, the second possibility is to use a
> WriteLock to "/counter" to control access the payload of the znode,
> where i'd put the counter value, or access to a special row in
> cassandra, where i'd put the counter value. The Cassandra option is
> probably the best possibility, as i'm storing my dictionary there
> anyway, but I'd like to hear from you about latency and performance for
> this options in ZK.
> Thanks
> Claudio
> --
> Claudio Martella
> Digital Technologies
> Unit Research & Development - Analyst
> TIS innovation park
> Via Siemens 19 | Siemensstr. 19
> 39100 Bolzano | 39100 Bozen
> Tel. +39 0471 068 123
> Fax  +39 0471 068 129
> claudio.martella@tis.bz.it http://www.tis.bz.it
> Short information regarding use of personal data. According to Section 13
> of Italian Legislative Decree no. 196 of 30 June 2003, we inform you that we
> process your personal data in order to fulfil contractual and fiscal
> obligations and also to send you information regarding our services and
> events. Your personal data are processed with and without electronic means
> and by respecting data subjects' rights, fundamental freedoms and dignity,
> particularly with regard to confidentiality, personal identity and the right
> to personal data protection. At any time and without formalities you can
> write an e-mail to privacy@tis.bz.it in order to object the processing of
> your personal data for the purpose of sending advertising materials and also
> to exercise the right to access personal data and other rights referred to
> in Section 7 of Decree 196/2003. The data controller is TIS Techno
> Innovation Alto Adige, Siemens Street n. 19, Bolzano. You can find the
> complete information on the web site www.tis.bz.it.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message