1
1

00:00:00,179  -->  00:00:02,760
<v Instructor>SOA and microservices.</v>
2

2

00:00:02,760  -->  00:00:04,500
In this lesson, we're going to start talking
3

3

00:00:04,500  -->  00:00:07,080
about the way systems are designed these days
4

4

00:00:07,080  -->  00:00:10,650
by using service-oriented architecture and microservices.
5

5

00:00:10,650  -->  00:00:13,320
Now, in the old days, the legacy way of doing things,
6

6

00:00:13,320  -->  00:00:15,930
we would build these huge monolithic networks
7

7

00:00:15,930  -->  00:00:17,190
and we'd have to get our routing
8

8

00:00:17,190  -->  00:00:19,140
and our security and our servers.
9

9

00:00:19,140  -->  00:00:20,550
We'd put all this stuff together
10

10

00:00:20,550  -->  00:00:23,610
to build these huge networks to perform one function.
11

11

00:00:23,610  -->  00:00:25,710
Everything was very tightly coupled
12

12

00:00:25,710  -->  00:00:26,970
and so when something went wrong,
13

13

00:00:26,970  -->  00:00:29,610
we had to identify exactly what it was.
14

14

00:00:29,610  -->  00:00:32,040
Well, these days, it becomes a lot easier
15

15

00:00:32,040  -->  00:00:34,230
for us to build things because we're using a lot more
16

16

00:00:34,230  -->  00:00:36,630
of this service-oriented architecture.
17

17

00:00:36,630  -->  00:00:38,850
When we talk about service-oriented architecture,
18

18

00:00:38,850  -->  00:00:40,440
this is the combination of lots
19

19

00:00:40,440  -->  00:00:42,720
of different little pieces, like the system,
20

20

00:00:42,720  -->  00:00:45,480
the service, the platform, the practice, the people,
21

21

00:00:45,480  -->  00:00:48,180
the architecture, the process, and the integration
22

22

00:00:48,180  -->  00:00:50,250
and each of these can be operated individually
23

23

00:00:50,250  -->  00:00:52,140
so they're not tightly coupled anymore.
24

24

00:00:52,140  -->  00:00:54,780
Instead, we call this a loose coupling.
25

25

00:00:54,780  -->  00:00:55,613
Now, when I talk
26

26

00:00:55,613  -->  00:00:58,500
about service-oriented architecture or SOA,
27

27

00:00:58,500  -->  00:01:01,260
this is a software architecture where the components
28

28

00:01:01,260  -->  00:01:04,500
of the solution are conceived as loosely coupled services,
29

29

00:01:04,500  -->  00:01:07,950
not dependent on a single platform type or technology.
30

30

00:01:07,950  -->  00:01:10,590
By doing this, each individual piece can be built
31

31

00:01:10,590  -->  00:01:13,260
on its own and tested on its own and that way,
32

32

00:01:13,260  -->  00:01:15,630
there's no dependencies existing between these.
33

33

00:01:15,630  -->  00:01:16,860
It makes it a lot easier
34

34

00:01:16,860  -->  00:01:20,220
for us to build applications and reuse components.
35

35

00:01:20,220  -->  00:01:22,800
Now, each service is going to take defined inputs
36

36

00:01:22,800  -->  00:01:24,600
and produce defined outputs.
37

37

00:01:24,600  -->  00:01:25,890
Essentially, we call this
38

38

00:01:25,890  -->  00:01:28,530
like a black box type of architecture.
39

39

00:01:28,530  -->  00:01:31,170
I'm going to say this thing does this function
40

40

00:01:31,170  -->  00:01:32,910
and it takes these things as inputs,
41

41

00:01:32,910  -->  00:01:35,340
and it's going to give you that thing as the output.
42

42

00:01:35,340  -->  00:01:38,280
So if I have this box, it's going to do some math problem,
43

43

00:01:38,280  -->  00:01:39,720
you're going to give it two inputs
44

44

00:01:39,720  -->  00:01:41,070
and it's going to add those things together
45

45

00:01:41,070  -->  00:01:42,180
and give you an output.
46

46

00:01:42,180  -->  00:01:43,290
That would be an example
47

47

00:01:43,290  -->  00:01:46,890
of a very basic service-oriented architecture example.
48

48

00:01:46,890  -->  00:01:48,150
Now, when we start dealing
49

49

00:01:48,150  -->  00:01:50,010
with service-oriented architecture,
50

50

00:01:50,010  -->  00:01:51,990
we use this idea of decoupling.
51

51

00:01:51,990  -->  00:01:55,020
We decouple these services into these different layers.
52

52

00:01:55,020  -->  00:01:56,490
Now, everything is connected together
53

53

00:01:56,490  -->  00:01:58,680
by providing a specific type of input
54

54

00:01:58,680  -->  00:02:01,050
and they're going to provide you with a particular structure
55

55

00:02:01,050  -->  00:02:03,090
for that output that you're expecting.
56

56

00:02:03,090  -->  00:02:05,490
Everything in between is really a black box.
57

57

00:02:05,490  -->  00:02:06,990
We don't really care what happens as long
58

58

00:02:06,990  -->  00:02:08,340
as we get what we want.
59

59

00:02:08,340  -->  00:02:10,290
This allows us to essentially have a bunch
60

60

00:02:10,290  -->  00:02:13,350
of building blocks that we can use at these different layers
61

61

00:02:13,350  -->  00:02:15,090
and to do these different functions.
62

62

00:02:15,090  -->  00:02:17,910
For example, we have a presentation layer at the top
63

63

00:02:17,910  -->  00:02:20,220
or we have a business process layer underneath that.
64

64

00:02:20,220  -->  00:02:21,510
We have service component layers.
65

65

00:02:21,510  -->  00:02:23,550
We have messaging layers that have a connection
66

66

00:02:23,550  -->  00:02:25,590
to legacy systems, all the way down
67

67

00:02:25,590  -->  00:02:28,890
to the underlying enterprise information technology systems.
68

68

00:02:28,890  -->  00:02:30,900
And each of these can be designed, built
69

69

00:02:30,900  -->  00:02:34,320
and tested individually in a decoupled manner.
70

70

00:02:34,320  -->  00:02:36,660
When we look at these services, they're going to be defined
71

71

00:02:36,660  -->  00:02:39,480
within the scope of functional business requirements
72

72

00:02:39,480  -->  00:02:42,480
and these things can then be reused for different purposes.
73

73

00:02:42,480  -->  00:02:43,980
As you look at these different services,
74

74

00:02:43,980  -->  00:02:45,180
you're going to look at them and go,
75

75

00:02:45,180  -->  00:02:48,180
this service is going to be used for this function.
76

76

00:02:48,180  -->  00:02:49,980
This is a SMS program.
77

77

00:02:49,980  -->  00:02:53,160
It's going to take some message and send it out as a text.
78

78

00:02:53,160  -->  00:02:55,500
This program might be something that's going to get things
79

79

00:02:55,500  -->  00:02:56,370
in through email
80

80

00:02:56,370  -->  00:02:58,980
and then it's going to output it in this other format.
81

81

00:02:58,980  -->  00:03:00,810
Whatever it is you're actually going to build,
82

82

00:03:00,810  -->  00:03:03,360
it's all based on your functional business requirements
83

83

00:03:03,360  -->  00:03:06,060
and allows you to reuse them time and time again.
84

84

00:03:06,060  -->  00:03:07,770
Now, one of the things we have to consider
85

85

00:03:07,770  -->  00:03:09,630
is that if we have all of these services
86

86

00:03:09,630  -->  00:03:11,730
that are being built in a decoupled manner,
87

87

00:03:11,730  -->  00:03:13,890
how do we get them to communicate together?
88

88

00:03:13,890  -->  00:03:15,270
Well, we're going to use something known
89

89

00:03:15,270  -->  00:03:18,300
as the Enterprise Service Bus or ESB.
90

90

00:03:18,300  -->  00:03:21,120
This is a common component of SOA architectures
91

91

00:03:21,120  -->  00:03:23,310
that helps us facilitate this decoupled service
92

92

00:03:23,310  -->  00:03:25,260
to service communication.
93

93

00:03:25,260  -->  00:03:27,600
When you look at service-oriented architecture,
94

94

00:03:27,600  -->  00:03:30,750
it is going to be looked at from an overall design architecture
95

95

00:03:30,750  -->  00:03:33,030
and it's a way for us to map the business workflows
96

96

00:03:33,030  -->  00:03:35,220
to the IT systems to support them.
97

97

00:03:35,220  -->  00:03:37,440
Again, our whole function here is to figure out
98

98

00:03:37,440  -->  00:03:39,270
what is the process we're going to do?
99

99

00:03:39,270  -->  00:03:41,670
What is the business process that we need to mimic
100

100

00:03:41,670  -->  00:03:43,620
and based on that business process and workflow,
101

101

00:03:43,620  -->  00:03:45,690
we can then pull all these different pieces
102

102

00:03:45,690  -->  00:03:47,008
and services together
103

103

00:03:47,008  -->  00:03:50,550
with those IT systems that will support those services.
104

104

00:03:50,550  -->  00:03:52,050
Now, one of the things that really helps us
105

105

00:03:52,050  -->  00:03:54,660
with this is the idea of microservices.
106

106

00:03:54,660  -->  00:03:57,120
Microservices are software architectures
107

107

00:03:57,120  -->  00:03:59,160
where the components of the solution are conceived
108

108

00:03:59,160  -->  00:04:00,990
as a highly decoupled service,
109

109

00:04:00,990  -->  00:04:04,523
not dependent on a single platform type or technology.
110

110

00:04:04,523  -->  00:04:07,050
Again, by using these microservices
111

111

00:04:07,050  -->  00:04:08,940
and designing our systems in this way,
112

112

00:04:08,940  -->  00:04:10,740
we are actually having a paradigm shift.
113

113

00:04:10,740  -->  00:04:12,840
We're thinking about doing things differently
114

114

00:04:12,840  -->  00:04:15,420
in terms of application development.
115

115

00:04:15,420  -->  00:04:18,090
When you're using a microservice architecture,
116

116

00:04:18,090  -->  00:04:18,990
it's going to have some
117

117

00:04:18,990  -->  00:04:21,660
of the same general principles as SOA.
118

118

00:04:21,660  -->  00:04:23,580
It sounds a lot alike, doesn't it?
119

119

00:04:23,580  -->  00:04:25,380
Now, when we look at these, they're going to contain things
120

120

00:04:25,380  -->  00:04:27,360
like self-contained service modules,
121

121

00:04:27,360  -->  00:04:29,250
each one performing a single function
122

122

00:04:29,250  -->  00:04:31,320
with clearly defined inputs and outputs.
123

123

00:04:31,320  -->  00:04:33,150
Sounds a lot like SOA, right?
124

124

00:04:33,150  -->  00:04:34,890
We're also going to then take those services
125

125

00:04:34,890  -->  00:04:37,650
and apply them to the design of network applications,
126

126

00:04:37,650  -->  00:04:39,330
such as an order processing system,
127

127

00:04:39,330  -->  00:04:40,800
a video streaming service,
128

128

00:04:40,800  -->  00:04:44,400
a messaging system, an email system, a file support system.
129

129

00:04:44,400  -->  00:04:46,230
Whatever those things are, we can take them,
130

130

00:04:46,230  -->  00:04:49,140
network them together, and create a larger service.
131

131

00:04:49,140  -->  00:04:52,110
So you may be asking yourself, what's really the difference
132

132

00:04:52,110  -->  00:04:54,450
between SOA and microservices
133

133

00:04:54,450  -->  00:04:57,210
because they sound very, very similar.
134

134

00:04:57,210  -->  00:05:00,420
Well, when you see SOA, I want you to remember that SOA,
135

135

00:05:00,420  -->  00:05:02,100
it allows applications to be built
136

136

00:05:02,100  -->  00:05:05,010
from services with some interdependencies.
137

137

00:05:05,010  -->  00:05:06,990
Now, when you start dealing with microservices,
138

138

00:05:06,990  -->  00:05:07,920
on the other hand,
139

139

00:05:07,920  -->  00:05:09,900
you're going to have microservices that are capable
140

140

00:05:09,900  -->  00:05:13,230
of being developed, tested, and deployed independently.
141

141

00:05:13,230  -->  00:05:15,870
These microservices are more easily scalable
142

142

00:05:15,870  -->  00:05:17,640
than a big monolithic app
143

143

00:05:17,640  -->  00:05:20,400
because only the necessary service modules you need
144

144

00:05:20,400  -->  00:05:22,170
will need to be scaled up to support it
145

145

00:05:22,170  -->  00:05:24,480
rather than having to provision additional resources
146

146

00:05:24,480  -->  00:05:27,150
for the entire application infrastructure.
147

147

00:05:27,150  -->  00:05:29,610
So when it comes down to what is the difference
148

148

00:05:29,610  -->  00:05:32,220
between SOA and microservices, remember,
149

149

00:05:32,220  -->  00:05:34,530
if we take services and we put them all together
150

150

00:05:34,530  -->  00:05:35,850
in some kind of business process
151

151

00:05:35,850  -->  00:05:39,300
and we create interdependencies, that is SOA,
152

152

00:05:39,300  -->  00:05:41,070
that is a service-oriented architecture
153

153

00:05:41,070  -->  00:05:43,620
where everything that runs that is a service
154

154

00:05:43,620  -->  00:05:45,180
and we connect them all together.
155

155

00:05:45,180  -->  00:05:46,710
When we start dealing with microservices,
156

156

00:05:46,710  -->  00:05:47,970
they're independent.
157

157

00:05:47,970  -->  00:05:51,420
They are one individual thing that's going to be developed,
158

158

00:05:51,420  -->  00:05:53,010
tested, and deployed.
159

159

00:05:53,010  -->  00:05:55,230
And so really, it's all about interdependency.
160

160

00:05:55,230  -->  00:05:57,930
When you're dealing with SOA, you have those connections.
161

161

00:05:57,930  -->  00:06:00,413
When you're dealing with microservices, you don't.
