I hereby claim:
- I am iconara on github.
- I am iconara (https://keybase.io/iconara) on keybase.
- I have a public key whose fingerprint is 89E2 D758 F1B0 5851 90C3 AB85 3DD6 2FEB B09D 0BF2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": true}}' | |
sudo service elasticsearch restart | |
# ... wait for the host to start ... | |
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": false}}' |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> | |
<false/> | |
</dict> | |
<key>Label</key> |
require 'grape' | |
class ResponseHijack | |
BODY_KEY = 'response_hijack.body'.freeze | |
CONTENT_TYPE_KEY = 'response_hijack.content_type'.freeze | |
def initialize(app) | |
@app = app | |
end |
require 'json' | |
require 'set' | |
class ProfileConverter | |
def initialize(profile, io=$stdout, time_threshold=0.01) | |
@profile = profile | |
@io = io | |
@time_threshold = time_threshold | |
end |
INFO [FlushWriter:5624] 2013-12-11 19:23:05,972 Memtable.java (line 366) Completed flushing /media/ephemeral0/cassandra/data/system/compactions_in_progress/system-compactions_in_progress-jb-30877-Data.db (176 bytes) for commitlog position ReplayPosition(segmentId=1385401494930, position=18377928) | |
INFO [CompactionExecutor:21719] 2013-12-11 19:23:05,974 CompactionTask.java (line 115) Compacting [SSTableReader(path='/media/ephemeral0/cassandra/data/system/compactions_in_progress/system-compactions_in_progress-jb-30877-Data.db'), SSTableReader(path='/media/ephemeral0/cassandra/data/system/compactions_in_progress/system-compactions_in_progress-jb-30876-Data.db'), SSTableReader(path='/media/ephemeral0/cassandra/data/system/compactions_in_progress/system-compactions_in_progress-jb-30875-Data.db'), SSTableReader(path='/media/ephemeral0/cassandra/data/system/compactions_in_progress/system-compactions_in_progress-jb-30874-Data.db')] | |
INFO [CompactionExecutor:21717] 2013-12-11 19:23:05,974 CompactionTask.java (line 11 |
For fun I'm writing a MessagePack encoder/decoder in pure Ruby to see how close to the speed of the native C and Java implementations I can get. Currently it's just 20% slower than the native C extension for decoding (haven't implemented encoding yet), and twice as slow as native Java, when running in the latest Java 1.7.
Below are some benchmarks run in both MRI and JRuby, comparing the native decoders for both platforms with my pure Ruby implementation with and without InvokeDynamic in JRuby.
The MessagePack decoder code is here: https://github.com/iconara/msgpack-pure-ruby/blob/647bcf74f8b059e5e31cc620f81eeb39b73393a4/lib/msgpack.rb
The benchmark code is here: https://github.com/iconara/msgpack-pure-ruby/blob/647bcf74f8b059e5e31cc620f81eeb39b73393a4/spec/benchmark.rb
The benchmark outputs start with the output of java -version
and then runs a series of benchmarks with one million repetitions of decoding the same chunk of bytes. The lines beginning with *
show the Ruby version used and additional in
#!/bin/bash | |
# Usage: clusterctl start|stop | |
# | |
# Launches a local RabbitMQ cluster | |
# | |
# The name returned by `hostname -s` must resolve to 127.0.0.1 | |
CLUSTER_SIZE=4 | |
NODENAME_PREFIX='rmq' |
class MyHandler | |
include Webbit::HttpHandler | |
def handleHttpRequest(request, response, control) | |
request.content("I'm a teapot").status(418).end | |
end | |
end | |
class Server | |
def run |
require 'aws' | |
require 'pry' | |
require 'open-uri' | |
require 'base64' | |
class Starter | |
def initialize(ec2) | |
@ec2 = ec2 | |
end |