@hpoom 31
asyncCall().then(function(data1){
// do something...
return anotherAsyncCall();
}).then(function(data2){
// do something...
return oneMoreAsyncCall();
}).then(function(data3){
// the third and final async response
}).fail(function(err) {
// handle any error from any of the above calls
}).done();
Slide 32
Slide 32 text
@hpoom
HTTP
baked in
32
Slide 33
Slide 33 text
@hpoom
NPM
33
Slide 34
Slide 34 text
@hpoom 34
www.modulecounts.com
Slide 35
Slide 35 text
@hpoom
Front End
Tooling
35
Slide 36
Slide 36 text
@hpoom
Challenges
36
Slide 37
Slide 37 text
@hpoom
Single
Instance
37
Slide 38
Slide 38 text
@hpoom 38
var express = require('express');
var app = express();
var globalCount = 0;
app.get('/', function (req, res) {
var localCount = 0;
globalCount++;
localCount++;
res.send('You visited #' + localCount + ' times!
Total visits #' + globalCount);
});
app.listen(8080);
Slide 39
Slide 39 text
@hpoom 39
You visited #1 times! Total visits #1
You visited #1 times! Total visits #2
You visited #1 times! Total visits #3
You visited #1 times! Total visits #4
You visited #1 times! Total visits #5
Slide 40
Slide 40 text
@hpoom
Exit On
Error
40
Slide 41
Slide 41 text
@hpoom 41
1.Close the server to stop accepting new
connections.
2.Wait for existing connections to finish and
close normally.
3.Only exit the process once all clients have
finished and disconnected happily.
4.Failsafe: before starting the shutdown, it’s
advisable to set an exit time limit. If the
shutdown hangs or takes too long, something else
is probably wrong so exit the process anyway.
Slide 42
Slide 42 text
@hpoom
Single
Threaded
42
Slide 43
Slide 43 text
/
@hpoom
PM2 pm2.keymetrics.io
Slide 44
Slide 44 text
@hpoom
No Web
Server
44
Slide 45
Slide 45 text
@hpoom
Memory
Management
45
Slide 46
Slide 46 text
@hpoom 46
Slide 47
Slide 47 text
@hpoom 47
Slide 48
Slide 48 text
@hpoom
IO js
48
Slide 49
Slide 49 text
@hpoom 49
Slide 50
Slide 50 text
@hpoom 50
Slide 51
Slide 51 text
@hpoom
Questions?
please contact me if you have any questions
Twitter: @hpoom
logo
51
By Simon Wood
Slide 52
Slide 52 text
@hpoom
What are
Microservices
52
Slide 53
Slide 53 text
”
@hpoom
Small Autonomous
services that
work together,
modelled around
a business domain.
Sam Newman
"Sam Newman" by Gavin Bell. Licensed under Creative Commons.- https://flic.kr/p/LEwhq
Slide 54
Slide 54 text
@hpoom
How
small is micro?
54
Slide 55
Slide 55 text
@hpoom
Single
Responsibility
55
Slide 56
Slide 56 text
@hpoom
Growing
Popular
56
Slide 57
Slide 57 text
@hpoom 57
Slide 58
Slide 58 text
@hpoom
Pros
Cons
58
&
Slide 59
Slide 59 text
/
@hpoom
pros
59
• Independently Scaleable
• High Testability
• Technology Diversity
• Independently Deployable
• Less People Dependency
Slide 60
Slide 60 text
/
@hpoom
cons
60
• Increased Complexity
• Operational Challenges
• Performance Hit
• Eventual Consistency
• Service Discovery Essential
Slide 61
Slide 61 text
/
@hpoom
When to use
61
https://www.martinfowler.com/bliki/MicroservicePremium.html
Slide 62
Slide 62 text
/
@hpoom
When not to use
62
Slide 63
Slide 63 text
@hpoom
Why?
63
Slide 64
Slide 64 text
@hpoom
Engineering
Culture
64
Slide 65
Slide 65 text
”
@hpoom
Any organization that designs
a system … will inevitably
produce a design whose
structure is a copy
of the organization's
communication structure.
Melvin Conway
Slide 66
Slide 66 text
@hpoom 66
Slide 67
Slide 67 text
@hpoom 67
Slide 68
Slide 68 text
”
@hpoom
If you can’t feed
a team with
two pizzas,
it’s too large.
Jeff Bezos
"Etech05: Jeff" by James Duncan Davidson. Licensed under Creative Commons.- https://flic.kr/p/zYCD
”
@hpoom
If Engineering at Etsy has a
religion, it’s the Church of
Graphs. If it moves, we track it.
Sometimes we’ll draw a graph
of something that isn’t
moving yet, just in case it
decides to make a run for it.
Code as Craft
"Etsy" by KnitSpirit. Licensed under Creative Commons.- https://flic.kr/p/btwyFm
”
@hpoom
We want to empower
developers to repeatedly
deploy fast and often at
scale. Removing the need for
IT Infrastructure setup to get
code into production.
Andy Britcliffe
Slide 87
Slide 87 text
/
@hpoom
Docker docker.com
Slide 88
Slide 88 text
/
@hpoom
Convox convox.com
Slide 89
Slide 89 text
@hpoom
Site reliability
engineering
89
Slide 90
Slide 90 text
@hpoom
Infrastructure
as Code
90
Slide 91
Slide 91 text
@hpoom
Automate
All the things
91
Slide 92
Slide 92 text
@hpoom
APIs
92
Aggregate
Slide 93
Slide 93 text
@hpoom 93
Website Mobile App Affiliates
Slide 94
Slide 94 text
@hpoom 94
Website Mobile App Affiliates
API
Slide 95
Slide 95 text
@hpoom 95
Website Mobile App Affiliates
API
Cache
Slide 96
Slide 96 text
/
@hpoom
GraphQL graphql.org
Slide 97
Slide 97 text
/
@hpoom
Size: 162KB Content Download: 268ms
97
Slide 98
Slide 98 text
/
@hpoom
Size: 76KB Content Download: 214ms
98
Slide 99
Slide 99 text
@hpoom 99
Slide 100
Slide 100 text
/
@hpoom
backends for frontENDs
100
Slide 101
Slide 101 text
@hpoom
Tooling is
Essential
101
Slide 102
Slide 102 text
@hpoom
Developer
Experience
102
Slide 103
Slide 103 text
”
@hpoom
We want to empower
our engineers to deliver
software consistently,
reliably and with
minimal friction.
Uber
Slide 104
Slide 104 text
@hpoom 104
Slide 105
Slide 105 text
@hpoom 105
Slide 106
Slide 106 text
@hpoom 106
Slide 107
Slide 107 text
/
@hpoom
GRPC grpc.io
Slide 108
Slide 108 text
@hpoom
Data
108
Slide 109
Slide 109 text
”
@hpoom
When stitched together and
analysed appropriately, a deluge
of data suddenly becomes
actionable knowledge and insight
that marketers can act upon to
maintain a personal connection
with their customers.
Lisa Gilbert
"Virginia Tech - data center" by Christopher Bowns. Licensed under Creative Commons.- https://flic.kr/p/4Fnm8M
Slide 110
Slide 110 text
/
@hpoom
Data Pipeline concept
110
Slide 111
Slide 111 text
/
@hpoom
Snowplow snowplowanalytics.com
Slide 112
Slide 112 text
@hpoom
Where are
we heading next
112
Slide 113
Slide 113 text
@hpoom 113
We are Hiring!
Slide 114
Slide 114 text
@hpoom
Thank you
please contact me if you have any questions
Twitter: @hpoom
logo
114
By Simon Wood