I need a data structure to store 500k keys, each one with some associated data. 150 Threads will be running concurrently & accessing the keys. Once in a day I need to update the data structure since there may be some manipulation operation, say the key is deleted, new key is added or the data is changed. When the data structure updation is in progress I can not block any of the 150 threads from accessing it. I don't want to use current hash implementations like memcache or redis since the number of keys may grow in future & I want in-memory access for faster lookup? Instead will prefer some data structure implementation in C/C++.
The Userspace RCU library contains a set of concurrent data structures implemented with the help of RCU. Among those a lock-free resizable hash table based on the articles
For more information you can see the comments in the implementation at http://git.lttng.org/?p=userspace-rcu.git;a=blob;f=rculfhash.c