Skip to content

Instantly share code, notes, and snippets.

View darach's full-sized avatar

Darach Ennis darach

  • Squircle Systems Ltd
  • London, UK
View GitHub Profile
use "collections"
use "time"
use "lib:portaudio_sink"
use "lib:portaudio"
type Buffer is (Array[F32], Array[U8])
class StopTimer is TimerNotify
var _a: Main
new iso create(a: Main) =>
@postspectacular
postspectacular / instructions.md
Last active December 2, 2015 22:44 — forked from darach/instructions.md
Pony on the Odroid C1

Instructions

The following instructions assume a debian jessie based distribution

0. Prerequisites

Install dependent tools and libraries

$ sudo apt-get update
@pbailis
pbailis / rapgenius-balancing.md
Last active July 23, 2019 12:57
Randomized load balancing comparison

RapGenius has an interesting post about Heroku's randomized load balancing, complaining about how random placement degrades performance compared to prior omniscient approaches. RapGenius ran some simulations, including an experiments with a "Choice of Two" method:

Choice of two routing is the naive method from before, with the twist that when you assign a request to a random dyno, if that dyno is already busy then you reassign the request to a second random dyno, with no regard for whether the second dyno is busy

This differs subtly but substantially from the standard "Power of Two Choices" randomized load balancing:

each [request] is placed in the least loaded of d >= 2 [Dynos] chosen independently and uniformly at random

Take a look at the difference in queue lengths below, for 200 Dynos, 100

@coltrane
coltrane / test-child-process-signals.js
Created May 5, 2012 04:51
Tests the response of node.js child processes to various posix signals.
var child_process = require('child_process'),
assert = require('assert')
var isChild = !!(process.send),
isMaster = ((!isChild) && (process.argv.length > 2)),
isTopLevel = (!isMaster && !isChild)
if( isTopLevel ) {