Overview
Syllabus
Intro
Philadelphia Emerging Technology For The ENTERPRISE
Aaron Patterson @tenderlove
Rails Core Team
enterprise gem
Expense Reports
Rube Goldberg Expense Reporting System
Interfaces & Adapters
Exploring the internals of Active Record
I love my cat!
Disrupt Space
Disrupt the Space of Space Disruption
SEO Optimization
Leif Erikson (Later invented Cell Phones)
Release Date: September 2012
Problems.
Too Many Open Questions.
minitest/spec
Action Controller::Live
Streaming / Polling (with timeout)
Pitfalls
Webserver
Long Responses
Client Disconnect
Use Polling
Where is the bottleneck?
Time Breakdown
How do the test tasks work?
You app can have custom Rake tasks lib/tasks
Multiple Loads
Challenges
Switching Environments
Your app is a singleton
Change the env before app load
loading schema.rb
Real Solution: Remove Singleton
Connection Pooling
Pool limit =~ Server threads
Threads Pool Size is Just FineTM
Thread Safety
Is XXX Library Thread Safe?
Everything is Thread Safe, if you know the rules.
DB Connections ARE NOT Thread Safe
No locks around socket operations
AR Objects ARE NOT Thread Safe
No locks around read / write ops
Underlying DS is a hash with no locks
Split Work by Type
SQL Construction
Statement Cache
Query Cache: Same Statement Same Results
Saves Parse Time
Saves Bandwidth
Memory Increase
Cache Size Limit
Cache all invariants
Mamba Time
Health Walk.
Questions?
Taught by
ChariotSolutions