Skip to content

Instantly share code, notes, and snippets.

@ryansmith3136
ryansmith3136 / process-partitioning.md
Created April 13, 2012 06:40
Process Partitioning

Process Partitioning

The Problem

When working with large, high volume, low latency systems, it is often the case that processing data sequentially becomes detrimental to the system's health. If we only allow 1 process to work on our data we run into several challenges:

  • Our process may fall behind resulting in a situation which it is impossible for our process to catch up.
  • Our singleton process could crash and leave our system in a degraded state.
  • The average latency of data processing could be dramatically affected by outlying cases.
@ryansmith3136
ryansmith3136 / worker-pattern.md
Created April 11, 2012 20:15
The Work Pattern

The Worker Pattern

2011-05-22

Introduction

This article is the accumulation of a tutorial that was given as a training session at Red Dirt Ruby Conf (2011) and a formal talk given at Rails Conf (2011). To understand the theory behind The Worker Pattern, read over the slides and the slide notes. From there, you can follow the instructions in the Tutorial

@ryansmith3136
ryansmith3136 / getting_a_job.md
Created April 10, 2012 23:37
Getting a Job: How I transition from college to career.

Getting a Job

May 25 2010

I recently graduated from University with a B.S. in Mathematics and a minor in Computer Science. I love to write code and so naturally I began applying for computer engineering jobs. The keyword is computer engineering, NOT tech support, web ninja or css guru. What I found in the job market was shocking!

YOUR DEGREE DOES NOT MATTER. that much

@ryansmith3136
ryansmith3136 / instruments.rb
Created April 6, 2012 07:09
Sequel & Sinatra Instrumentation
module Instruments
def self.set_logger(l, m)
@logger = l
@method = m
end
def self.logger
@logger
end
@ryansmith3136
ryansmith3136 / query.sql
Created February 28, 2012 20:11
select array aggregates
-- This will give us a table that has a row for each resource but includes all of the events related to the
-- resource on the row. Calling array_agg will load all of the data in memory which means that I can do math
-- on the set really quickly. Also, callers of this query will be able to get all of the data for the invoice
-- in one shot.
create view invoice as
select
a.resource_id,
sum(a.qty) as qty,
array_agg(hstore(a.*)) as events_collection
@ryansmith3136
ryansmith3136 / event_buffering.md
Created February 14, 2012 04:10
event buffering

Event Buffering

Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.

The Problem

@ryansmith3136
ryansmith3136 / event_ordering.md
Created February 11, 2012 00:38
an event ordering schema

An Event Ordering Schema

Shushu receives events in no particular order and long after the event originated in the client's system. Therefore, it is generally desired to depend on Shushu not caring about the order or time in which it receives events. The following text examines thoughts on how to address such issues.

The Problem

Shushu provides a resources-group-membership API that takes a resource

@ryansmith3136
ryansmith3136 / fonts.conf
Created February 7, 2012 21:13
Setting this in my home dir drastically improved font rendering.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
@ryansmith3136
ryansmith3136 / fdp.md
Created February 2, 2012 00:46
Financial Data Processing Model

WIP

This document is still a work in process. Please email: [email protected] for ideas and contributions.

Financial Data Processing Model

The PAAS revolution has paved a way for a new class of internet business. Platform services like: Heroku, WebSolr & Joyent are breaking barriers for application developers by removing the burden of server management.

@ryansmith3136
ryansmith3136 / worker-pattern.md
Created January 23, 2012 05:03
The Worker Pattern

The Worker Pattern

Contents

  • Introduction
  • Definition
  • Examples
  • Links

Introduction