Skip to content

Instantly share code, notes, and snippets.

View gstark's full-sized avatar

Gavin Stark gstark

View GitHub Profile
@gstark
gstark / workflow.md
Created January 26, 2010 20:42 — forked from zaach/workflow.md

Semantic Versioning

Details: http://semver.org/, http://apr.apache.org/versioning.html

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

Patch level changes could also be for correcting incorrect APIs. In this case, the previous patch release may be incompatible, but because of bugs.

Minor versions may introduce new features, but do not alter any of the previous API.

[gstark@tpaw03:jruby-1.5.0.dev] uname -a
Linux tpaw03 2.6.16.27-0.9-smp #1 SMP Tue Feb 13 09:35:18 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
[gstark@tpaw03:jruby-1.5.0.dev] ./bin/jruby -d -e "require 'syslog'"
[gstark@tpaw03:jruby-1.5.0.dev] java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

Tests to do:

Create an environment with 4 (at least >2) servers each running a single process with 40 writing threads. Each writing thread should insert a new document at some prescribed rate (maybe make the threads and the document insertion a configuration parameter?)

Have each of these servers writing to one or more of the nosql "servers" (depending on architecture) -- maybe run one test where all the writes are going to one server, and another where they are spread.

Then lets see how long it takes for each of the servers in a cluster to "catch up" (e.g. what is the lag time average and std dev -- if thats even possible to compute) before a new document is replicated around.

Once we have a feel for this, lets repeat the test but pull one server out of the replication environment. We should do this test twice, once where we remove the server gracefully and once violently. In both cases we'll leave the server "offline" for several tens-of-minutes or hours. Then lets compute the number of documents th

$ rvm rbx ruby -S mspec
info: rbx-1.0.0-20100514: rubinius 1.0.0 (1.8.7 release 2010-05-14 JI) [x86_64-apple-darwin10.3.0]
rubinius 1.0.0 (1.8.7 release 2010-05-14 JI) [x86_64-apple-darwin10.3.0]
mspec run [options] (FILE|DIRECTORY|GLOB)+
Ask yourself:
1. What specs to run?
2. How to modify the execution?
$ rvm use rbx
info: Using rbx 1.0.0 20100514
$ mspec
rubinius 1.0.0 (1.8.7 release 2010-05-14 JI) [x86_64-apple-darwin10.3.0]
mspec run [options] (FILE|DIRECTORY|GLOB)+
Ask yourself:
From 9ec8d502ea63809c01a86eb68e6a905a6321ad78 Mon Sep 17 00:00:00 2001
From: Gavin Stark <g.stark@realdigitalmedia.com>
Date: Sat, 12 Jun 2010 01:10:23 -0400
Subject: [PATCH] Dir#new should call #to_str under 1.8 and #to_path under 1.9
---
kernel/bootstrap/dir.rb | 4 ++--
kernel/common/dir.rb | 6 ++++++
spec/ruby/core/dir/dir_spec.rb | 29 +++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 2 deletions(-)
From ca8e700b8d9ccd0d6a462908a84caaf588d42639 Mon Sep 17 00:00:00 2001
From: Gavin Stark <g.stark@realdigitalmedia.com>
Date: Sat, 12 Jun 2010 16:25:40 -0400
Subject: [PATCH] Filling in Kernel.chomp specs based on String specs
---
spec/ruby/core/kernel/chomp_spec.rb | 180 ++++++++++++++++++++++++++++++++++-
1 files changed, 176 insertions(+), 4 deletions(-)
diff --git a/spec/ruby/core/kernel/chomp_spec.rb b/spec/ruby/core/kernel/chomp_spec.rb
From 37e55a1ce715bdb8dfea59782edb8bad03c7fbc9 Mon Sep 17 00:00:00 2001
From: Gavin Stark <g.stark@realdigitalmedia.com>
Date: Sat, 12 Jun 2010 17:25:04 -0400
Subject: [PATCH] Fix instructions for commands that are either deprecated or now take slightly different options. Also add some suggestion given in the IRC channel as to how to create tickets/patches.
---
doc/contributing.txt | 11 +++++++----
doc/howto/fix_a_failing_spec.txt | 17 +++++++++++------
2 files changed, 18 insertions(+), 10 deletions(-)
From a49caebabb688fc83b01a03e3e970a0228de6f8a Mon Sep 17 00:00:00 2001
From: Gavin Stark <g.stark@realdigitalmedia.com>
Date: Sun, 13 Jun 2010 00:54:50 -0400
Subject: [PATCH 1/2] Fixing Hash constructor to not rehash keys.
---
kernel/common/hash.rb | 48 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 38 insertions(+), 10 deletions(-)
diff --git a/kernel/common/hash.rb b/kernel/common/hash.rb
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
require File.expand_path('../../string/fixtures/classes', __FILE__)
# FIXME: These methods exist on 1.9 only when the -n or -p option is passed to
# ruby, but we currently don't have a way of specifying that.
ruby_version_is ""..."1.9" do
describe "Kernel#chomp" do
it "is a private method" do
Kernel.should have_private_instance_method(:chomp)