RailsConf – Day 3 – Introduction to Cassandra and CassandraObject

June 9th, 2010 by Brian filed in work has no comments

Introduction to Cassandra and CassandraObjectMichael Koziarski (Koziarski Software Limited)

Scales linearly – increases not only read access, but also write access

A ColumnFamily per query

CassandraObject
- Mostly AR compatible
- In flux
- taking patches

Tags: , ,

RailsConf – Day 3 – Redis, Rails and Resque

June 9th, 2010 by Brian filed in work has no comments

Redis, Rails, and Resque – Background Job BlissChris Wanstrath (GitHub)
redis is a key value store for data structures

redis is not use for everything because entire dataset used to have to fit into RAM – would have to shard across machines

github – uses redis for routing, can add, remove.modify routes quickly & easily – can determine what server to put new users on, etc

Old – HAProxy sending to mongrels
New – Unicorn – instead of receiving requests, it asks for one using ‘select’, pooled, forks similar to passenger

Used 6 or 7 different bg – SQS, DelayedJob
Used Delayed job for 2 years

resque is built on redis, jobs are serialized to json and workers can be in any language http://github.com/defunkt/resque

resque has a plugin API – 15 or so plugins already exist – http://wiki.github.com/defunkt/resque/plugins

has admin interface

github has 35 types of background jobs

Notes: lightning fast talker! Lots of good information though. I’d have a beer with this guy!

Tags: , ,

RailsConf – Day 3 – Million Dollar Mongo

June 9th, 2010 by Brian filed in work has no comments

Million Dollar Mongo - Obie Fernandez (Hashrocket), Durran Jordan (Hashrocket)
mongo was a good choice because only one patient record was worked on at a time

get entire object graph in a single query
previously did 35 joins and took 20 minutes to return

comparison between mongo, couch & cassandra
big selling point was dynamic queries – nice happy medium when coming from relational databases
“I don’t want to write any more ****** XML, so goodbye Cassandra”

No universal agreement that a NOSQL solution was the right idea

“Easiest database to install ever (except maybe Redis)”
No schema migrations

Forked MongoMapper -> Monoid
- MongoMapper was very young

Mongoid
- Prefers Embedding Documents
- Atomic Operations by Default, based on attribute changes
- rich criteria api
- master/slave suppor
- simple versioning
- is NOT ActiveRecord (and should be treated as such)
- Features always have performance in mind

mongo – can index in background as of 1.4
regex queries on fields
Denormalization is acceptable, embed as much as possible (no FK constraints)

Hybrid DB model
- Hierarchical Data Stored in MongoDB
- Relational Data stored in MySQL
- Data that required transactions stored in MySQL
- Simple Data in Redis
- Favor suitability over simplicity

It’s ok to use more than one datastore

Working without transactions
- Atomic updates generally cover you
- fairly easy to roll your own optimistic locking
- need to do manual rollback in integration tests
- selenium tests can run in a separate process

in production
- deployed on engine yard cloud / ec2
- 0.5 TB of data
- put mongodb on it’s own utility space
- feed it lots of ram, lots of disk space
- chef scripts easy due to simple installation

Tags: ,

RailsConf – Day 2 – MongoDB Metamorphosis

June 8th, 2010 by Brian filed in work has no comments

The MongoDB Metamorphosis: Data as DocumentsKyle Banker (10gen)

http://try.mongodb.com – mini tutorial

MongoDB tries to fit between key-value stores & relational databases

Data as Documents – documents are in BSON (binary json)

mongoDB operates on documents using special syntax

update() takes a query and an update (what to do) .. the update is applied to the results of the query

Embedded documents – i.e. Comments become embedded within Posts
Or you can normalize – Post id within each comment
Decisions to be made on what makes most sense for how you need to access the data

Embedded – fast queries, document always appears with parent

Hash is the object used to represent MongoDB objects

MongoMapper

Very informational, I want to try using this!

Tags: ,

RailsConf – Day 2 – Beyond git push heroku

June 8th, 2010 by Brian filed in work has no comments

Beyond Git Push Heroku: Battle Stories from Cloud SamuraisOren Teich (Heroku), Morten Bagai (Heroku)
heroic had down time this morning, so we’ll talk about that for a bit then resume our normal schedule
use something similar to nagios
problem was occurring somewhere in http stack
form hypothesis & find a way to test it quickly and in a non-disruptive manner – don’t want to make the problem worse
disabled misbehaving systems – took them out of the cluster – didn’t turn off, wanted to diagnose

2 of the 3 cofounders here in room
Do one thing well – deploy a rails application onto the web
$git push heroku master
let developers use tools to deploy that they are already using
“No step 1″

heroku stacks – let’s you target a version of a vm & libraries that you want to target – linux version, ruby, etc

http://docs.heroku.com/rails3

http://www.scvngr.com

http://www.syphir.com

http://getcloudapp.com

pandastream – cloud based video encoding

Anything can be a cloud service as long as it’s deployed in the same infrastructure – memcached, monogohq, etc

Tags: ,