7. SO WE NEED TO BE ABLE
TO DISPATCH THE WORK
SCALE OUT
SCALE UP
• Many workers
doing the same
thing
• 1 Fat instance
• 1 Fat application
• No SPOF
• SPOF (single point
of failure)
• Growing is more
easy
• Hard to maintain
• Introduce best
practice
• Always has a limit
• Short term
meaning
16. DATASTORE CHOICES
ARE DRIVEN BY USAGE
Do I mostly
read or
write ?
Do I need
relational ?
Do I need
concurrent
access ?
Do I need
atomicity of
requests ?
Do I need
big storage
capacity ?
Make
decisions
based on
needs
Do I need
high
availability ?
17. USE ONLINE
DATABASE / BE
READY TO TEST
IN JUST A FEW
MINUTES
NO NEED TO TRASH YOUR COMPUTER
19. DO NOT USE THE FILE
SYSTEM AS A DATASTORE
File system are POSIX compliant
•
•
•
•
•
POSIX is ACID
POSIX is powerful but is a bottleneck
File System is the nightmare of ops
File System creates coupling (host provider/OS/language)
SPOF-free multi tenant File System is a unicorn
STORE IN DATABASE, OR IN A DATASTORE LIKE
S3/RIAKCS DEDICATED TO FILE MANAGEMENT
21. USE STREAMING I/O TO
STREAM DATA DIRECTLY
TO DATABASE
HTTP Post data
Temporarily
store as file
or in memory
Store it into
your storage
backend
Say OK to
client
22. USE STREAMING I/O TO
STREAM DATA DIRECTLY
TO DATABASE
HTTP Post data
Directly stream
your data to
Storage
backend
Say OK to
client
23. DO NOT USE
MEMORY AS
DATABASE
LIKE : SHARED / GLOBAL VARIABLE,
CACHE “IN THE CODE”, INTENSIVE
SESSION USAGE…
24. DO NOT USE A VARIABLE
FOR MORE THAN ONE
REQUEST
25. F(X) = X * 2
F(2) = 4
^ WE ASSUME THAT
FOR SAME INPUT, SAME OUTPUT
26. IT’S LIKE MATH FUNCTION
You have to understand that : you’re functional programing addicts ;-)