Posts Tagged ‘railsconf’

RailsConf – Day 3 – Lightning talks

June 9th, 2010 by Brian | No Comments | Filed in work

Brian C – DNC

http://github/dnclabs

- client_side_validations – gem that does client side validation for rails
- takes AR validations – serves them via json – used by jquery.validate

how to kill rails
github.com/michel
bad practices by a few rails developers
Don’t reduce yourself to $20/hr, stick to your price, delivery quality
Communication is important!

Democracy.com
Raimond Garcia
Revolutionize Democracy
Parsed Congress web page – created a prototype on heroku in 48 hours
legal palitical party in spain – “partido de internet”

What’s new in RSpec-2
David Chelimsky
in beta right now
Old rspec won’t work with Rails 3
doesn’t work with rails < 3 (yet)

http://github.com/rspec

$rspec spec
modularized, rspec-core is built on micronaut

(more…)

Tags: ,

RailsConf – Day 3 – Persistence Smoothie

June 9th, 2010 by Brian | No Comments | Filed in work

Persistence Smoothie – Blending SQL & NoSQLFlip Sasser (Intridea, Inc.)
@flipsasser

http://github.com/flipsasser/Persistence-Smoothie

NoSQL means no ACID
Keep what you know – don’t throw out your MySQL

DataMapper is the swiss army knife of ORM
- can point different models to different datastores
- Have a lot of refactoring to do

Sample Store App
- Authentication – keep in Reational DB
- Products – store metadata
- Purchases – keep it in RDB
- Activity Stream – denormalize with key/value store

mongofy – gem for moving data from mysql to mongo

Drawbacks
- DataPortability is lowered
- Lot more moving parts
- Say goodbye to all your fun AR mixins

Tags: , , ,

RailsConf – Day 3 – Introduction to Cassandra and CassandraObject

June 9th, 2010 by Brian | No Comments | Filed in work

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 | No Comments | Filed in work

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 | No Comments | Filed in work

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: ,