basho/riak_kv — pull request #291 by slfritchie (2012-02-23 22:13:47+00:00)
Title: Add the riak_kv_yessir_backend.erl storage manager for simulation purposes

%% @doc riak_kv_yessir_backend is a backend for benchmarking Riak without
%% any disk I/O or RAM constraints.
%%
%% Riak: "Store this key/value pair."
%% Backend: "Yes, sir!"
%% Riak: "Get me that key/value pair."
%% Backend: "Yes, sir!"
%%
%% This backend uses zero disk resources and uses constant memory.
%%
%% * All put requests are immediately acknowledged 'ok'. No
%% data about the put request is stored.
%% * All get requests are fulfilled by creating a constant binary for
%% the value. No attempt is made to correlate get keys with
%% previously-put keys or to correlate get values with previously-put
%% values.
%% - Get operation keys that are formatted in with the convention
%% <<"integer.anything">> will use integer as the returned binary's
%% Size.
%%
%% This backend is the Riak storage manager equivalent of:
%%
%% * cat > /dev/null
%% * cat < /dev/zero