Skip to content

Instantly share code, notes, and snippets.

View russelldb's full-sized avatar

Russell Brown russelldb

View GitHub Profile
@pozorvlak
pozorvlak / crdt.md
Last active February 7, 2021 01:36
CvRDTs are almost as general as they can be.

CvRDTs are (almost?) as general as they can be

What are you talking about, and why should I care?

Now that we live in the Big Data, Web 3.14159 era, lots of people want to build databases that are too big to fit on a single machine. But there's a problem in the form of the CAP theorem, which states that if your network ever partitions (a machine goes down, or part of the network loses its connection to the rest) then you can keep consistency (all machines return the same answer to

@angrycub
angrycub / force-remove.md
Created September 12, 2013 13:08
`riak-admin force-remove` should not exist.

riak-admin force-remove should not exist.

It's Friday evening, almost time to head out of the office for a nice long weekend. Your Riak cluster has been running along, everything fine. All of a sudden, the SSD in one of your Riak nodes decides to go up in a ball of flames. So you, being the good sysadmin that you are, immediately hop on the phone with your hardware vendor and order a new SSD. They tell you that you'll have it on Monday morning. Clearly you can't leave a broken node in your Riak environment, so you'll want to remove it from the cluster. You sit down at your terminal, hop on to a working Riak node and type

riak-admin force-remove [email protected]

NOOOOOOOOOOOOOOOOOOOOOOOOO!!!!

@pozorvlak
pozorvlak / sitrep.md
Last active January 17, 2016 23:54
CRDT/Semilattice SITREP

Here's where I understand the state of the art to be:

  • In this INRIA tech report, Shapiro, Preguiça, Baquero and Zawirski (SPBZ) prove, amongst other things, that a sufficient condition for CRDTs to achieve eventual consistency on networks which may reorder and duplicate packets (which I'll call flaky networks, henceforth) is that
    1. the underlying datatype forms a semilattice,
    2. messages are full states,
    3. incoming messages are combined with the node's current state using the least-upper-bound operation in the semilattice.
  • It's possible to relax condition 2 and still achieve eventual consistency over flaky networks by fragmenting the state into independent parts and transmitting updates to each part separately. For instance, in the G-Set CRDT (an add-only bitset) one can transmit only the index of the element to be added.
  • In [these slides from a talk at Dagstuhl](http://www.dagstuhl.de/mat/Files/13/13081/13081.BaqueroCarlos.Sl
@bsparrow435
bsparrow435 / get_put_code.md
Last active December 30, 2024 17:25
Get/Put path walk through
@bsparrow435
bsparrow435 / riak_metrics.escript
Last active August 21, 2017 09:06
Escript to query various in-VM metrics on a Riak node not currently available from stats.
-module(riak_metrics).
-compile(export_all).
main([NodeName0, Cookie, Length, Command]) ->
LocalName = '[email protected]',
NodeName = list_to_atom(NodeName0),
case net_kernel:start([LocalName]) of
{ok, _} ->
erlang:set_cookie(node(), list_to_atom(Cookie)),
case net_kernel:hidden_connect_node(NodeName) of
@lenary
lenary / 00-intro.md
Last active August 29, 2015 13:56
Guidance Notes for CRDT Performance Issues

I've had one question about subpar performance in Riak 2.0's CRDTs. I thought I'd write this so that people can more easily diagnose these issues, without the CRDT team having to step in every time.

An Example: A Client was having problems with the performance fetching and updating sets. The issue manifested itself with poor fetch performance.

So, how do you go about debugging/diagnosing this?

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

@mguenther
mguenther / fj.erl
Last active May 10, 2018 08:19
fork/join with parallel quicksort as example (Erlang)
-module(fj).
-export([parallel/2]).
%%%-----------------------------------------------------------------------------
%%% @doc Executes the given function on every task in tasks in parallel.
%%% @spec parallel(Function, Tasks) -> Results
%%% where Results is a list matching the arity of input list Tasks
%%% but contains the result of invoking Function on those tasks
%%% @end