Skip to content

Instantly share code, notes, and snippets.

@kellymclaughlin
Created September 7, 2011 18:56
Show Gist options
  • Save kellymclaughlin/1201389 to your computer and use it in GitHub Desktop.
Save kellymclaughlin/1201389 to your computer and use it in GitHub Desktop.
async_refactor.md

Folding

  • General buffer behavior

    • API same as riak_kv_fold_buffer.
    • Allow for expected set of operations without awareness of internal details
    • Then have a fold_buffer or kv_buffer that handles kv tasks such as key listing
    • Handoff buffer can handle dealing properly with accumulating handoff results
      • {Socket, ParentPid, Module, TcpMod, ?ACK_COUNT, Total, Err}
  • No explicit flush fun specification. Flush function is determined when buffer is created only.

  • Factor out shared code of fold fun wrapping for list_keys, list_buckets, index_query, and legacy key listing functions.

Multi Backend

  • Restore async capability - usort of capabilities from composing backends
  • For mixed case of sync and asyc, wrap sync results in fun that can be returned by async worker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment