You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Aklin_81 <as...@gmail.com> on 2011/11/13 21:32:33 UTC

Fast lookups for userId to username and vice versa

I need to create mapping from <userId>(s) to <username>(s) which need to
provide for fast lookups service ?
Also I need to provide a mapping from <username> to <userId> inorder to
implement search functionality in my application.

What could be a good strategy to implement this ? (I would welcome
suggestions to use any new technologies if they are really worth for my
case.)

Re: Fast lookups for userId to username and vice versa

Posted by Boris Yen <yu...@gmail.com>.
I think secondary index could do the trick.

However, if you need to provide the pagination function, I will go for
Konstantin's
solution.


On Wed, Nov 16, 2011 at 10:27 PM, Konstantin Naryshkin <konstantinn@a-bb.net
> wrote:

> Or just have two column families to do it: A CF idToName that has the
> userIds as keys and the userName as the only column and a CF nameToId
> that has the userNames as keys and the userId as the only column
>
> On Mon, Nov 14, 2011 at 03:50, chovatia jaydeep
> <ch...@yahoo.co.in> wrote:
> > Check if Cassandra secondary index meets your requirement.
> >
> > Thank you,
> > Jaydeep
> > ________________________________
> > From: Aklin_81 <as...@gmail.com>
> > To: user <us...@cassandra.apache.org>
> > Sent: Sunday, 13 November 2011 12:32 PM
> > Subject: Fast lookups for userId to username and vice versa
> >
> > I need to create mapping from <userId>(s) to <username>(s) which need to
> > provide for fast lookups service ?
> > Also I need to provide a mapping from <username> to <userId> inorder to
> > implement search functionality in my application.
> >
> > What could be a good strategy to implement this ? (I would welcome
> > suggestions to use any new technologies if they are really worth for my
> > case.)
> >
> >
>

Re: Fast lookups for userId to username and vice versa

Posted by Konstantin Naryshkin <ko...@a-bb.net>.
Or just have two column families to do it: A CF idToName that has the
userIds as keys and the userName as the only column and a CF nameToId
that has the userNames as keys and the userId as the only column

On Mon, Nov 14, 2011 at 03:50, chovatia jaydeep
<ch...@yahoo.co.in> wrote:
> Check if Cassandra secondary index meets your requirement.
>
> Thank you,
> Jaydeep
> ________________________________
> From: Aklin_81 <as...@gmail.com>
> To: user <us...@cassandra.apache.org>
> Sent: Sunday, 13 November 2011 12:32 PM
> Subject: Fast lookups for userId to username and vice versa
>
> I need to create mapping from <userId>(s) to <username>(s) which need to
> provide for fast lookups service ?
> Also I need to provide a mapping from <username> to <userId> inorder to
> implement search functionality in my application.
>
> What could be a good strategy to implement this ? (I would welcome
> suggestions to use any new technologies if they are really worth for my
> case.)
>
>

Re: Fast lookups for userId to username and vice versa

Posted by chovatia jaydeep <ch...@yahoo.co.in>.
Check if Cassandra secondary index meets your requirement.


Thank you,
Jaydeep

________________________________
From: Aklin_81 <as...@gmail.com>
To: user <us...@cassandra.apache.org>
Sent: Sunday, 13 November 2011 12:32 PM
Subject: Fast lookups for userId to username and vice versa


I need to create mapping from <userId>(s) to <username>(s) which need to provide for fast lookups service ?
Also I need to provide a mapping from <username> to <userId> inorder to implement search functionality in my application.


What could be a good strategy to implement this ? (I would welcome suggestions to use any new technologies if they are really worth for my case.)