about summary refs log tree commit diff
path: root/usth/ICT2.7/P3L1 Software Architecture Subtitles/21 - Types of Architectural Styles - lang_en_vs5.srt
blob: 05011c7ade0e28d515bc8990de55b7f0fede591b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
1
00:00:00,130 --> 00:00:02,410
So what does it mean to know architectural styles? There

2
00:00:02,410 --> 00:00:06,390
are many many, many architectural styles. So we cannot cover them

3
00:00:06,390 --> 00:00:08,730
all here. What I want to do instead is, I want to

4
00:00:08,730 --> 00:00:10,960
mention a few of those. And then I want to go in

5
00:00:10,960 --> 00:00:13,300
more depth, on one of them. So the first item I

6
00:00:13,300 --> 00:00:17,420
want to mention is pipes and filters. And pipes and filters indicate

7
00:00:17,420 --> 00:00:21,110
an architectural style in which a chain of processing elements, which

8
00:00:21,110 --> 00:00:25,410
can be processes, threads, co-routines, is arranged so that the output

9
00:00:25,410 --> 00:00:28,420
of each element is the input of the next one

10
00:00:28,420 --> 00:00:31,840
and usually with some buffering in between consecutive elements. A

11
00:00:31,840 --> 00:00:34,120
typical example of this, if you're familiar with Unix are

12
00:00:34,120 --> 00:00:37,900
Unix pipes, that you can use to concatenate Unix commands.

13
00:00:37,900 --> 00:00:40,310
Another style I want to mention is the event driven

14
00:00:40,310 --> 00:00:43,540
one. An event driven system typically consists of event

15
00:00:43,540 --> 00:00:46,590
emittors, like the alarm over here, and event consumers, like

16
00:00:46,590 --> 00:00:50,720
the fire truck, down here, and consumers are notified when events

17
00:00:50,720 --> 00:00:53,810
of interest occurr and have the responsibility of reacting

18
00:00:53,810 --> 00:00:56,676
to those events. A typical example will be a GUI,

19
00:00:56,676 --> 00:00:59,950
in which widgets generate events and listeners listen to those

20
00:00:59,950 --> 00:01:02,550
events and react to them. For example, they react to

21
00:01:02,550 --> 00:01:05,060
the push of a button. A very commonly used

22
00:01:05,060 --> 00:01:09,250
architectural style is Publish-subscribe, represented by the paper boy. Over

23
00:01:09,250 --> 00:01:12,420
here. And this is an architectural style in which senders

24
00:01:12,420 --> 00:01:15,870
of messages, they're called publishers, do not send messages directly

25
00:01:15,870 --> 00:01:19,330
to specific recievers. Instead, they publish messages with one

26
00:01:19,330 --> 00:01:22,530
or more associated texts without knowledge of who will

27
00:01:22,530 --> 00:01:26,810
receive such messages. Similarly subscribers will express interest in

28
00:01:26,810 --> 00:01:29,340
one or more tags. And will only receive messages of

29
00:01:29,340 --> 00:01:32,095
interest according to such tags. A typical example of

30
00:01:32,095 --> 00:01:35,240
a publish-subscribe system, will be Twitter. And I'm pretty

31
00:01:35,240 --> 00:01:36,835
sure that most of you are familiar with the

32
00:01:36,835 --> 00:01:41,170
client-server architecture. In which computers in a network, assume one

33
00:01:41,170 --> 00:01:43,930
of two roles. The server provides the resources and

34
00:01:43,930 --> 00:01:47,630
functionality. And the client initiates contact with the server,

35
00:01:47,630 --> 00:01:50,920
and requests the use of those resources and functionality.

36
00:01:50,920 --> 00:01:53,340
Also in this case, a typical example would be

37
00:01:53,340 --> 00:01:56,470
email, in which an email server provides email storage

38
00:01:56,470 --> 00:01:59,390
and management capabilities, and an email client will use

39
00:01:59,390 --> 00:02:02,580
those capabilities. You may also be familiar with peer-to-peer,

40
00:02:02,580 --> 00:02:06,530
or P2P, systems. A P2P system is a type

41
00:02:06,530 --> 00:02:10,850
of decentralized and distributed network system in which individual nodes

42
00:02:10,850 --> 00:02:14,220
in the network, that are called peers, act as independent

43
00:02:14,220 --> 00:02:17,940
agents that are both suppliers and consumers of resources. This

44
00:02:17,940 --> 00:02:20,700
is in contrast to the centralized client-server model, where client

45
00:02:20,700 --> 00:02:23,660
nodes interact with the central authority. And I'm not going to

46
00:02:23,660 --> 00:02:26,030
say anything more about peer-to-peer, because I'm going to show you

47
00:02:26,030 --> 00:02:28,940
two examples, of peer-to-peer systems in the rest of the

48
00:02:28,940 --> 00:02:32,040
lesson. And you probably have at least heard of rest.

49
00:02:32,040 --> 00:02:33,990
Which in this case is not an invitation to

50
00:02:33,990 --> 00:02:36,970
relax as the graphic might indicate. But rather stands for

51
00:02:36,970 --> 00:02:41,400
Representational State Transfer. REST is a hybrid architectural style

52
00:02:41,400 --> 00:02:45,150
for distributed hypermedia systems, that is derived from several other

53
00:02:45,150 --> 00:02:48,210
network based architectural styles. And that is characterized by

54
00:02:48,210 --> 00:02:51,970
uniform connector interface, and even if I'm not going to say

55
00:02:51,970 --> 00:02:54,230
anything else about the rest, I wanted to mention

56
00:02:54,230 --> 00:02:57,440
it, because it is an extremely well known architectural style.

57
00:02:57,440 --> 00:02:59,300
And the reason for this is that REST is

58
00:02:59,300 --> 00:03:03,310
very widely used, because it is basically the architectural style

59
00:03:03,310 --> 00:03:06,050
that governs the world wide web. So we use it

60
00:03:06,050 --> 00:03:08,330
all the time when we browse the internet, for instance.