Professional Documents
Culture Documents
Cal Henderson
O HAI
DjangoCon 2008 2
My happy face
DjangoCon 2008 3
DjangoCon 2008 4
2.8 billion photos
DjangoCon 2008 5
2.8 billion photos
>2m photos/min
DjangoCon 2008 7
Many thousand pages/sec
DjangoCon 2008 8
Scale nerd
DjangoCon 2008 9
Serious Language
DjangoCon 2008 10
Wordpress
Yahoo
Mediawiki Facebook
DjangoCon 2008 11
Wordpress
Yahoo
Delicious
Digg
Mediawiki Facebook
DjangoCon 2008 12
Flamework
Serious Toolset
DjangoCon 2008 13
Flamework Flink
Flint Flotos
Flinderbox Flictionary
Flaux Flops
Flag Fleng
DjangoCon 2008 14
Why hate Django?
DjangoCon 2008 15
What does he even know
about Django?
DjangoCon 2008 16
Pownce
DjangoCon 2008 17
A fucking blogging engine
DjangoCon 2008 18
Why all the hate?
DjangoCon 2008 19
DjangoCon 2008 20
DjangoCon 2008 21
DjangoCon 2008 22
DjangoCon 2008 23
An attack on several fronts
DjangoCon 2008 24
An attack on several fronts
The team
Python
Frameworks
DjangoCon 2008 25
Django itself
Performance
Scalability
Maintainability
DjangoCon 2008 26
The Team
DjangoCon 2008 27
Frameworks
DjangoCon 2008 28
Struts
DjangoCon 2008 29
Craig McClanahan
DjangoCon 2008 30
DjangoCon 2008 31
Exhibit A : Beard
DjangoCon 2008 32
But Struts is for suits!
DjangoCon 2008 33
The Hot Shit
DjangoCon 2008 34
DjangoCon 2008 35
Rails = Badass
DjangoCon 2008 36
Instead?
A boy band?
DjangoCon 2008 37
DjangoCore
The Album
DjangoCon 2008 38
DjangoCon 2008 39
Also, a wizard
Google!
DjangoCon 2008 42
But not that trendy
DjangoCon 2008 43
But not that trendy
It’s no ruby
DjangoCon 2008 44
But not that trendy
It’s no ruby
Or Haskell
DjangoCon 2008 45
But not that trendy
It’s no ruby
Or Haskell
Or Erlang
DjangoCon 2008 46
But not that trendy
It’s no ruby
Or Haskell
Or Erlang
DjangoCon 2008
Or Scala 47
Significant Whitespace
DjangoCon 2008 48
DjangoCon 2008 49
Salmon
DjangoCon 2008 50
Universe of marshy force. Field sense
shallows the hatchery saying Hello,. World!.
Hydro. Power spring sometimes; snowmelt
powers snowmelt always.
DjangoCon 2008 51
DjangoCon 2008 52
No quantum
superpositions
DjangoCon 2008 53
DjangoCon 2008 54
“-”.join(array)
DjangoCon 2008 55
Restarting the server?
WTF!?
DjangoCon 2008 56
WSGIReloadMechanism
DjangoCon 2008 57
“I buy my eggs at the cheese shop”
- Aaron Straup Cope
DjangoCon 2008 58
“I buy my eggs at the cheese shop”
- Aaron Straup Cope
E ]
A G
G U
AN
L
ON
O
[M
DjangoCon 2008 59
DjangoCon 2008 60
__import__()
DjangoCon 2008 61
Basically, for hippies
Scared of real
OO languages
DjangoCon 2008 62
Frameworks
DjangoCon 2008 63
Flamework is a framework
DjangoCon 2008 64
Make common tasks:
easier
faster
error-free
DjangoCon 2008 65
Show a list of photos
DjangoCon 2008 66
Front-tier frameworks
Act as glue
DjangoCon 2008 67
Other
Services Data store
Data Model
Business
Logic
Request Interaction
Templates
Dispatcher Logic
Framework
Users
DjangoCon 2008 68
Great for getting started
Scalable
Flexible
DjangoCon 2008 73
Large scale
DjangoCon 2008 75
Regular houses
DjangoCon 2008 76
Just build!
DjangoCon 2008 77
DjangoCon 2008 78
DjangoCon 2008 79
DjangoCon 2008 80
Everything here is possible!
DjangoCon 2008 83
Manual partitioning
DjangoCon 2008 84
No multiple hosts per DB
DjangoCon 2008 85
Where do we read from?
DjangoCon 2008 86
How about now?
DjangoCon 2008 87
How about now ?
DjangoCon 2008 88
Read/write consistency
DjangoCon 2008 89
Read/write consistency
LAG!!1
DjangoCon 2008 90
Good for non-writing users
(logged out)
DjangoCon 2008 91
Non time-sensitive data
Feeds
Read-only APIs
DjangoCon 2008 92
DjangoCon 2008 93
Cool kids use
master/master pairs
DjangoCon 2008 94
Consistent read/write
1. Write to side A
3. Replication occurs
4. FAIL
DjangoCon 2008 95
Consistent read/write
1. Write to side A
3. ???
4. PROFIT!!
DjangoCon 2008 96
Then we can start to get fancy!
DjangoCon 2008 97
Where do we read/write?
DjangoCon 2008 98
Abstraction FTW
db_query($cluster_name, $sql)
DjangoCon 2008 99
No sharding
DjangoCon 2008 100
WTF is sharding?
‘impossible’
No shard walking
DjangoCon 2008 104
DjangoCon 2008 105
Django knows our models
It’s possible
DjangoCon 2008 106
If we accept constraints
master/master
shards
DjangoCon 2008 109
No automatic denormalization
WHERE bar != 1
DjangoCon 2008 129
foo.filter(bar = false)
WHERE bar = 0
Indexable!
<h1>{$foo.bar}</h1>
3 extra characters!
DjangoCon 2008 134
<h1>{{ foo.bar }}</h1>
<h1>{$foo.bar|e}</h1>
Well almost…
DjangoCon 2008 135
{% if edit_mode %}
woo
{% endif %}
{if $edit_mode}
woo
9 extra! {/if}
DjangoCon 2008 136
Verbose template syntax
makes people cry
Enough data to
choke a whale
DjangoCon 2008 147
Not smug enough
scared of joins
DjangoCon 2008 156
Actually,
DjangoCon 2008
JOINs are evil 157
DjangoCon 2008 158
Low version number
(Probably broken)
dmigrations
iamcal.com/talks