Software And The Taste Of Mayo - Marco Tabini - Presentation Transcript
1
SOFTWARE
and the Taste of Mayo
Marco Tabini
php|architect
marcot@tabini.ca
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
Marco Tabini
1
2
What is Mayo?
2
3
3
4
4
4
5
5
5
5
WTF????
5
6
6
Where did they get this guy?
7
What does this have to do with
SOFTWARE???
8
9
CODE
9
CODE
+
DATA
9
CODE
+
DATA
+
INTERFACE
9
CODE
+
DATA
+
INTERFACE
=
APP
9
CODE
10
CODE
10
CODE
HARDWARE
10
CODE
FIRMWARE
HARDWARE
10
CODE
O/S
FIRMWARE
HARDWARE
10
CODE
WEB O/S
SERVER
FIRMWARE
HARDWARE
10
CODE
PHP
WEB O/S
SERVER
FIRMWARE
HARDWARE
10
CODE
FRAMEWORK
WEBPHP
SERVER
O/S
FIRMWARE
HARDWARE
10
CODE
YOUR CODE
FRAMEWORK
PHP
WEB SERVER
O/S
FIRMWARE
HARDWARE
10
11
Hello, World!
11
Hello, World!
11
Hello, World!
Language System Calls
C 46
Shell (TCSH) 37
PHP (CLI) 362
PHP (Apache) 881
11
Hello, World!
Language System Calls
C 46
Shell (TCSH) 37
PHP (CLI) 362
PHP (Apache) 881
11
Hello, World!
Language System Calls
C 46
Shell (TCSH) 37
PHP (CLI) 362
PHP (Apache) 881
11
Hello, World!
Language System Calls
C 46
Shell (TCSH) 37
PHP (CLI) 362
PHP (Apache) 881
11
Hello, World!
Language System Calls
C 46
Shell (TCSH) 37
PHP (CLI) 362
PHP (Apache) 881
11
Hello, World!
Language System Calls
Once
C 47
Language
C
System Calls
46 Shell (TCSH) 146
Shell (TCSH) 37
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881
PHP (Apache) 887
11
Hello, World!
Language System Calls
Once
C 47
Language
C
System Calls
46 Shell (TCSH) 146
Shell (TCSH) 37
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881
PHP (Apache) 887
11
Hello, World!
Language System Calls
Once
C 47
Language
C
System Calls
46 Shell (TCSH) 146
Shell (TCSH) 37
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881
PHP (Apache) 887
11
Hello, World!
Language System Calls
Once
C 47
Language
C
System Calls
46 Shell (TCSH) 146
Shell (TCSH) 37
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881
PHP (Apache) 887
11
Hello, World!
Language System Calls
Once
C 47
Language
C
System Calls
46 Shell (TCSH) 146
Shell (TCSH) 37
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881
PHP (Apache) 887
11
Hello, World!
Once Twice
Language System Calls Language System Calls
C 46 C 47
Shell (TCSH) 37 Shell (TCSH) 146
PHP (CLI) 362 PHP (CLI) 368
PHP (Apache) 881 PHP (Apache) 887
11
12
Language Time
C 2.5hrs
Erlang 1.8hrs
PHP (CLI) N/A*
12
Language Time
C 2.5hrs
Erlang 1.8hrs
PHP (CLI) N/A*
12
Language Time
C 2.5hrs
Erlang 1.8hrs
PHP (CLI) N/A*
12
Language Time
C 2.5hrs
Erlang 1.8hrs
PHP (CLI) N/A*
* Sorry, had to catch flight to Amsterdam
12
Ease of use Performance
13
Ease of use Performance
ASM C PHP Rails
13
Ease of use Performance
ASM C PHP Rails
13
Ease of use Performance
ASM C PHP Rails
13
Ease of use Performance
ASM C PHP Rails
13
Ease of use Performance
ASM C PHP Rails
13
Single or double quotes?
14
Single or double quotes?
vs.
file_get_contents(‘3gb_file.txt’)
14
for? foreach? while?
15
for? foreach? while?
vs.
select * from
gigantic_unindexed_table
inner join
world_population_database
inner join
i_should_be_growing_plants_instead_of_coding
15
CODE
SCALABILITY
16
INFRA CODE DATA
STRUCTURE SCALABILITY SCALABILITY
COST
SOURCE IT
OF
PERFORMANCE ORGANIZATION
OWNERSHIP
16
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Profit Density
(Profit / Pages)
Revenue Density Page Impressions
17
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
18
Cost Density
(Cost / Pages)
19
Cost Density
(Cost / Pages)
19
Cost Density
(Cost / Pages)
19
Cost Density
(Cost / Pages)
19
Cost Density
(Cost / Pages)
FAIL!
19
Cost Density
(Cost / Pages)
Bad Good
20
Cost Density
(Cost / Pages)
Bad Good
20
Cost Density Problems
• Wrong scalability strategy
Database • Wrong database type
• Wrong database use
21
Cost Density Problems
• Architecture not scalable
• No use of parallelization
• No use of queuing
22
Solving your infrastructure
problems
(let someone else deal with them)
23
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 4.5
Data Transfer S3 30
Data Requests S3 1
DB Storage SimpleDB 45
DB CPU Usage SimpleDB 55
Server Usage EC2 144
TOTALS 279.5
25
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
Example: AWS
Item Service Cost/mo
Storage S3 150
Data Transfer S3 4,300
Data Requests S3 9,000
DB Storage SimpleDB 1,500
DB CPU Usage SimpleDB 3,800
Server Usage EC2 2,500
TOTALS 21,250
28
0 comments
Post a comment