Skip to content

Instantly share code, notes, and snippets.

View jasonpincin's full-sized avatar
🌎

Jason Pincin jasonpincin

🌎
View GitHub Profile
@jasonpincin
jasonpincin / server.js
Last active August 29, 2015 13:57
rpc server using dnode, shoe, node-static
var http = require('http')
var shoe = require('shoe')
var dnode = require('dnode')
var static = require('node-static')
var content = new static.Server(__dirname+'/static')
var server = http.createServer(content.serve.bind(content))
var socket = shoe(function (connection) {
// expose two methods: getTime and square
var api = dnode({
@jasonpincin
jasonpincin / client.js
Last active August 29, 2015 13:57
rpc client using dnode, shoe
var shoe = require('shoe')
var dnode = require('dnode')
var document = require('global/document')
var onTime = function (err, time) {
document.getElementById('time').innerHTML = time
}
var onSquare = function (err, val) {
document.getElementById('square').innerHTML = val
}
@jasonpincin
jasonpincin / index.html
Created March 18, 2014 05:00
sample index.html for rpc demo
<html>
<head>
<title>RPC Example</title>
<script type="text/javascript" src="bundle.js"></script>
</head>
<body>
<div id="time" />
<div id="square" />
</body>
</html>
@jasonpincin
jasonpincin / Makefile
Created May 11, 2014 17:39
package factory
.PHONY: pkg
all: help
help:
@echo
@echo "pkgname=name pkgdesc='desc' make pkg"
@echo
pkg:
### Keybase proof
I hereby claim:
* I am jasonpincin on github.
* I am jasonpincin (https://keybase.io/jasonpincin) on keybase.
* I have a public key whose fingerprint is CDF6 117D E5B7 FC5E 63D1 158A A944 A205 59C9 52A1
To claim this, I am signing this object:

Anivia

Anivia is Walmart's mobile analytics platform. It collects user-interaction metrics from mobile devices -- iPhone, iPad, Android, and mWeb. It also processes logging and other metrics from a bunch of mobile services. Anivia allows the business to have real-time insight and reporting into what is going on in the mobile business and provides vital capabilities for developers and ops folks to monitor the health of their services.

Anivia is built on Node.js, Hapi, RabbitMQ, and a multitude of downstream systems including Splunk and Omniture. Anivia is taking in 7,000 events per second on average (as of this writing), which after some fan-out and demuxing comes out to around 20,000 messages per second in flight. These rates are expected to soar leading up to and including Black Friday. The platform has grown in recent months to over 1,000 node processes spanning multiple data centers, gaining features such as link resiliency in the process.

A few of Anivia's functionalities

  • __Timestamp Correc
@jasonpincin
jasonpincin / mdb.md
Last active August 29, 2015 14:17 — forked from tjfontaine/mdb.md

MDB is unlike most debuggers you've experienced.

It is not a source level debugger like gdb or lldb or even Node's builtin debugger

Generally used for postmortem analysis.

Postmortem is for Production and Development

We operate mostly on core files, though you can attach to running processes as well.

@jasonpincin
jasonpincin / vmid
Last active December 12, 2015 12:28
Get UUID of a SmartOS VM given it's alias
#!/usr/bin/sh
#
# Given a SmartOS VM alias, returns the UUID.
#
# Usage:
#
# vmid <alias>
#
# vmadm get `vmid <alias>`
#
@jasonpincin
jasonpincin / import-image
Last active December 13, 2015 18:49
Helper utility for smartos-image-server (https://github.com/nshalman/smartos-image-server) that makes publishing new images a one-line breeze! For the global-zone companion script, see: https://gist.github.com/jasonpincin/4958099
#!/usr/bin/bash
#
# import-image (https://gist.github.com/jasonpincin/4958050)
#
# Helper utility for smartos-image-server
# https://github.com/nshalman/smartos-image-server
#
# Global-zone companion script available:
# https://gist.github.com/jasonpincin/4958099
#
@jasonpincin
jasonpincin / mkimg
Last active December 13, 2015 18:49
Companion script to import-image script (https://gist.github.com/jasonpincin/4958050), this script is intended for running against VM's in the global zone. It will snapshot them, and send them off to the image server (equipped with the import-image script).
#!/usr/bin/bash
# Creates an image from a VM
# WARNING: You should run sm-prepare-image inside the zone
# BEFORE running this script!
#
# This script requires the smartos-image-server to be
# equipped with the import-image script:
# https://gist.github.com/jasonpincin/4958050
#