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.)