Skip to content

Instantly share code, notes, and snippets.

View mathieuravaux's full-sized avatar

Mathieu Ravaux mathieuravaux

  • Paris
View GitHub Profile

Overview

Logplex is the Heroku logging multiplexor. Components throughout the Heroku platform publish syslog packets that are received and processed by a grid of logplex nodes. Users may retrieve their logs through requests to the logplex API.

Logplex relies on channel, token, drain and session objects. This data is stored in redis, but also cached for fast lookups in a normalized format in ETS tables. When logplex boots, all of the keys are loaded from redis and cached in ETS. When an object is created or deleted through the logplex API, other logplex nodes are notified of the change (via Erlang rpc calls) so that they may update their local ETS cache. We would like to explore the possibility of using nsync to manage replicating the dataset into ETS. This would speed up logplex boot times and save us from making Erlang RPC calls to update local caches on remote nodes.

To get started, fork logplex on github and follow the directions below to get logplex running locally.

Once you are up and runni

@shayarnett
shayarnett / README
Created May 10, 2012 13:13
Snippet generator for RubyMotion ctags
Generate ctags with `rake ctags`
Run snipper.rb
Put resulting ruby.snippets file where your snippet plugin can pick it up. (I'm using snipmate)
@jboner
jboner / latency.txt
Last active August 1, 2025 22:01
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@sfate
sfate / vim-on-heroku.sh
Created June 7, 2012 14:39 — forked from naaman/vim-on-heroku.sh
vim on heroku
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
705696364586003 93566 enc/encdb.so
705696365603476 19532 enc/encdb.so
705696365698893 89233 enc/trans/transdb.so
705696366174494 102380 rubygems.rb
705696369476830 118348 rubygems/defaults
705696369880115 59824 rbconfig
705696372745657 73832 rubygems/deprecate
705696373318504 61119 rubygems/exceptions
705696373838301 96976 rubygems/defaults/operating_system
705696373947581 85294 rubygems/defaults/ruby
@rubiii
rubiii / how_it_works.md
Created December 2, 2012 11:14
MacVim-Formatter for RSpec
$ rspec --format MacVimFormatter --color spec
anonymous
anonymous / gen_event_caster.erl
Created January 7, 2013 12:59
-module(gen_event_caster).
-author('Fernando Benavides <[email protected]>').
-behaviour(gen_event).
-export([start/2]).
-export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]).
-type receiver() :: atom() | pid().
@ryandotsmith
ryandotsmith / hack-reactor.md
Last active November 24, 2022 07:01
Hack Reactor Talk

Tales From a Heroku User

Here are some things I have learned along the way.

Last Updated: 2013-02-08

Original Audience: Hack Reactor

About

@skierkowski
skierkowski / deploy-to-heroku-without-git.rb
Created February 18, 2013 05:30
Very basic example of deploying to Heroku without git
require 'json'
require 'rest-client'
require 'heroku'
require "heroku/command/base"
require "anvil"
require "anvil/engine"
require "uri"
class Cisaurus
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 22, 2025 10:47
Backend Architectures Keywords and References