I am developing a key value store abstraction layer, much like JDBC or ActiveRecord, and I would like to provide varying levels of API, such that at its most basic it is:
get Key
set Key, Value
exists Key
delete Key
However, I also want to provide another API which provides lower level details which can be used with CAP theorem datastores such as:
get Key, Number_of_nodes_to_read_from
set Key, Value, Number_of_nodes_to_write_to
exists Key, Number_of_nodes_to_check
delete Key, Number_of_nodes_to_check, timeout_in_milliseconds
: And to make things really complicated I would also like an API where value added things can be added such as map reducers, indexes, records with fields, searching.
Anyway, my question is whether I should make one huge list of functions, or should I split up the API, bearing in mind that I may wish to add to the API in the future.
Thanks
Zubair
Note: The original question I had is here:
http://stackoverflow.com/questions/2321650/is-this-api-too-simple