I have a a simple ordered list that could contain 1 million or more items. There are only a few actions that are done with this list:
- lookup in a value exist
- find the index for a value
- find value for index
- add a value
- get number of items in the list
Once a value is added to the list, it never changes. I append items to the list, no insert or delete.
I need to manipulate this big list, and store it persistently. Right now I am using a database Int => String to represent the list, but I think there should me a more efficient way to do that.
I could use memcached, but I think 2 functions are missing:
- persistent storage
- find the index for a value