Skip to content

Instantly share code, notes, and snippets.

Context: I was asked for a list of interesting reading relating to "distributed databases, behavior under partitions and failures, failure detection." Here's what I came up with in about an hour.

For textbooks, "Introduction to Reliable and Secure Distributed Programming" is a superb introduction to distributed computing from a formal perspective; it's really not about "programming" or "engineering" but about distributed system fundamentals like consensus, distributed registers, and broadcast. Used in Berkeley's Distributed Computing course (and HT to @lalithsuresh) Book Site

Notes from courses like Lorenzo Alvisi's Distributed Computing class can be great.

There are a bunch of classics on causality, [Paxos](ht

@mcroydon
mcroydon / fingure.clj
Last active December 10, 2015 10:48 — forked from anonymous/fingure.clj
(ns fingure.core
(:gen-class))
(use 'lamina.core 'aleph.tcp 'gloss.core)
(defn response [query]
(println (str "Received a request for " (if (clojure.string/blank? query) "index" query) "."))
(if (clojure.string/blank? query)
"Greetings from the fingure finger daemon."
(str "Greetings from the fingure finger daemon.\r\nNo information about " query " found.")))
@mcroydon
mcroydon / s3up.py
Created November 11, 2011 06:10 — forked from ryansch/s3up.py
Command-line s3 uploader that uses the MultiPart (chunked) S3 upload functionality to parallelize and speed up large file uploads.
#!/usr/bin/env python
# coding=utf-8
#
# s3up.py
# 2010-2011, Mike Tigas
# https://mike.tig.as/
#
# Usage:
# s3up filename
# Uploads the given file to the DEFAULT_BUCKET (see below)
350 BackendOpen b scni_daniel 10.0.0.15 59005 10.0.0.69 8256
350 TxRequest b GET
350 TxURL b /news/2009/dec/30/wolves-sunk-at-buzzer/
350 TxProtocol b HTTP/1.1
350 TxHeader b Host: www.gwinnettdailypost.com
350 TxHeader b User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mo
bile/7A341 Safari/528.16
350 TxHeader b Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
350 TxHeader b Accept-Language: en-us,en;q=0.5
350 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
package com.mypackage.benchmark
import com.mypackage.util.Logging
import net.lag.configgy.Configgy
import scala.collection.mutable
import scala.collection.JavaConversions._
import java.net.InetSocketAddress
import java.nio.charset.Charset
import java.util.concurrent._
<!DOCTYPE html>
<html>
<head>
<title>My Whisper Blog</title>
</head>
<body>
<section>
<header><a href='/'>My Whisper Blog</a></header>
{{error}}
votes CF
"back in black" => { 201005211200 => '1', 201005201159 => '1', 201005201157 => '1', 201005011900 => '1', 201004190600 => '1' },
"black album" => { 201005021800 => '1', 201005010600 => '1' },
"black star" => { 201005011000 => '1' }
cached_counts CF
"back in black" => { 'cached_count' => 2, 'counted_until' => 201005011931 },
"black album" => { 'cached_count' => 1, 'counted_until' => 201005010600 }
# chl, 2010-04-27
# http://blog.tech.stylefeeder.com/2008/05/27/generating-primary-keys/
import math
NUM = "0123456789"
LOWER = "abcdefghijklmnopqrstuvwxyz"
UPPER = LOWER.upper()
ALPHANUM = NUM + LOWER + UPPER
ASCII_94 = [chr(33 + x) for x in xrange(94)]
Biscuits
2 C flour
2 tsp baking powder
1/2 tsp baking soda
1 T sugar
1/2 tsp salt
2 T vegan butter
1 C plain non-dairy milk
Gravy