cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan King <r...@twitter.com>
Subject Re: Using a synchronized counter that keeps track of no of users on the application & using it to allot UserIds/ keys to the new users after sign up
Date Thu, 03 Feb 2011 19:39:21 GMT
You could also consider snowflake:

http://github.com/twitter/snowflake

which gives you ids that roughly sort by time (but aren't sequential).

-ryan

On Thu, Feb 3, 2011 at 11:13 AM, Matthew E. Kennedy
<matt.kennedy@spadac.com> wrote:
> Unless you need your user identifiers to be sequential for some reason, I would save
yourself the headache of this kind of complexity and just use UUIDs if you have to generate
an identifier.
>
> On Feb 3, 2011, at 2:03 PM, Aklin_81 wrote:
>
>> Hi all,
>> To generate new keys/ UserIds for new users on my application, I am
>> thinking of using a simple synchronized counter that can keep track of
>> the no. of users registered on my application and when a new user
>> signs up, he can be allotted the next available id.
>>
>> Since Cassandra is eventually consistent, Is this advisable to
>> implement with Cassandra, but then I could also use stronger
>> consistency level like quorum or all for this purpose.
>>
>>
>> Please let me know your thoughts and suggesttions..
>>
>> Regards
>> Asil
>
>



-- 
@rk

Mime
View raw message