-
Notifications
You must be signed in to change notification settings - Fork 1
/
lecture2.html
530 lines (486 loc) · 17.7 KB
/
lecture2.html
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
<!DOCTYPE html>
<!--
Middleware and Web Services, CTU course slides
(cc) 2010-2023 Tomas Vitvar, http://vitvar.com
written for Humla, an open source HTML5 presentation environment
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="course" content="Middleware Architectures 1" />
<meta name="lecture" content="Lecture 2" />
<meta name="keywords" content="SOA, service concepts, service technologies, integration patterns" />
<link type="text/css" rel="stylesheet" href="css/meta.css">
</link>
<link type="text/css" rel="stylesheet" href="css/ctu-fit.css">
</link>
<link type="text/css" rel="stylesheet" href="humla/lib/core/humla.css">
</link>
<script type="text/javascript" src="humla/lib/humla.js"></script>
<title>Service Architectures</title>
</head>
<body>
<footer>
<p><b>#META_LECTURE#: #TITLE#</b>, <span class="meta_semester" />,
<span class="meta_twitter" />
</p>
<p><b>‒ #SLIDE_NO# ‒</b></p>
</footer>
<div class="slide intro">
<hgroup>
<h1><span class="meta_course" /></h1>
<h2>#META_LECTURE#: #TITLE#</h2>
</hgroup>
<div class="author">
<p class="meta_author" />
<p><span class="meta_email" /> • <span class="meta_twitter" /> •
<span class="meta_web" />
</p>
</div>
<center>
<div class="meta_logo"></div>
</center>
<div class="org">
<p class="meta_org" />
<p><span class="meta_orgfac" /> • <span class="meta_field" />
• <span class="meta_orgweb" /></p>
</div>
<div class="etc">
<div class="text-info">
Modified: #LAST_MODIFIED#<br />
Humla v#HUMLA_VERSION#
</div>
<a href="http://creativecommons.org/licenses/by-sa/3.0/">
<div class="license"></div>
</a>
<div class="oppa"></div>
</div>
</div>
<div class="slide outline"></div>
<section>
<header>Service Definition</header>
<div class="slide" id="service-definition">
<hgroup>
<h1>Service Views</h1>
</hgroup>
<ul class="xx-small">
<li>Business view</li>
<ul>
<li>A service realizes an effect that brings a business value
to a service consumer</li>
<ul>
<li>for example, to pay for and deliver a book</li>
</ul>
</ul>
<li>Conceptual view</li>
<ul>
<li>encapsulation, reusability, loose coupling, contracting,
abstraction,</br> discoverability, composability</li>
</ul>
<li>Logical view</li>
<ul>
<li>service interface, description and implementation</li>
<li>message-oriented and resource-oriented</li>
</ul>
<li>Software architecture view</li>
<ul>
<li>business service (also application service)</li>
<ul>
<li>external, exposed functionality of an application</li>
</ul>
<li>middleware service</li>
<ul>
<li>internal/technical, supports processing of requests</li>
</ul>
</ul>
<li>Technology architecture view</li>
<ul>
<li>REST/RESTful, GraphQL</li>
<li>XML-RPC/SOAP, RMI, gRPC</li>
<li>WebSocket, WebRTC, SSE</li>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Interface, Description and Implementation</h1>
</hgroup>
<div class="h-drawing" style="height: 240px" id="1i1A6rM7K34IVVLrJK_ETV7-shOTl9fuzPYjOfpUMrwY"></div>
<ul class="x-small">
<li>Terminology clarification</li>
<ul>
<li>service ~ service interface + service implementation</li>
<li>WSDL service ~ service description in WSDL language</li>
<li>SOAP service ~ a service interface is possible to access through SOAP protocol;
there is a WSDL description usually available too.</li>
<li>REST/RESTful service ~ service interface that conforms to REST architectural style and HTTP protocol</li>
<li>Microservice ~ a set of services that realize an app's capability
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Service Interface</h1>
</hgroup>
<ul class="x-small">
<li>Service interface components</li>
<ul>
<li>Data</li>
<ul>
<li>Data model definition used by the service</li>
<li>for example, input and output messages, representation of resources</li>
</ul>
<li>Functions</li>
<ul>
<li>operations and input and output data used by operations</li>
</ul>
<li>Process</li>
<ul>
<li>public process: how to consume the service's functionality</li>
</ul>
<li>Technical</li>
<ul>
<li>security, usage aspects (SLA-Service Level Agreement)</li>
<li>other technical details such as IP addresses, ports, protocols, etc.</li>
</ul>
</ul>
</ul>
</div>
<div class="slide" id="effects">
<hgroup>
<h1>Public Process</h1>
</hgroup>
<ul class="x-small">
<li>A state diagram</li>
<ul>
<li>operation of a service defines a <b>state transition</b> between two states.</li>
</ul>
</ul>
<div class="h-drawing" style="height: 415px" id="1I1OVuy4H_wJ9Bxt0ZlC-Zy7pznXeub9QYHgEcqdAqz4"></div>
</div>
<div class="slide" id="service-characteristics">
<hgroup>
<h1>Service Characteristics</h1>
</hgroup>
<div class="h-drawing" id="1z7ZDZ2Eh-B_4H3DszyzTmaAdvTdUCy6Ig2PCRynUgmg" style="height: 420px; margin-top: 40px">
</div>
</div>
</section>
<div class="slide outline"></div>
<section>
<header>Integrating Applications</header>
<div class="slide">
<hgroup>
<h1>Integration and Interoperability</h1>
</hgroup>
<ul class="small spacing">
<li>Integration</li>
<ul>
<li>A process of connecting applications so that they can
exchange and share capabilities, that is — information and functionalities.</li>
<li>Includes methodological approaches as well as technologies</li>
</ul>
<li>Interoperability</li>
<ul>
<li>Ability of two or more applications to understand each other</li>
<li>Interoperability levels</li>
<ul>
<li>Data – syntax/structure and semantics</li>
<li>Functions/Processes – syntax and semantics</li>
<li>Technical aspects – protocols, network addresses, etc.</li>
</ul>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Service Oriented Architecture</h1>
</hgroup>
<center>
<div class="h-drawing" id="1IOWIHKsD9qfPJ-eaXZc-hcL_4_gFO9AY5-ftDuZ1n3s" style="margin-top: 20px; width: 600px">
</div>
</center>
<ul class="x-small">
<li>SOA supports two core business strategies</li>
<ul>
<li>Growing top-line revenue</li>
<ul>
<li>Enterprise reacts quickly to requirements from the market</li>
<li>Business processes can be reconfigured rather than reimplemented</li>
</ul>
<li>Improving bottom-line profit</li>
<ul>
<li>Saving development costs by resuing existing services</li>
</ul>
</ul>
<li>Pre-integrated solutions</li>
<ul>
<li>Out-of-the-box applications and integration solutions among them</li>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>One-to-One Service Integration</h1>
</hgroup>
<ul class="x-small">
<li>Direct integration of applications</li>
<ul>
<li>Multiple protocols problem, multiple vendor problem</li>
<li>Replication of integration functionalities such as interoperability solutions</li>
</ul>
<div class="h-drawing" style="height: 340px" id="123tDQFo3Zq0LEzzhquKp1xJX4YZ6YiWC0GDNGGK1UA0"
alt="One to One Spaghetti Integration"></div>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Many-to-Many Service Integration</h1>
</hgroup>
<ul class="x-small">
<li>Enterprise Service Bus – central integration technology</li>
<ul>
<li>Realizes so called Service Oriented Architecture (SOA)</li>
<li>Contains various integration components such as process server, mediators, messaging middleware,
identity management, etc.</li>
</ul>
</ul>
<div class="h-drawing" style="height: 360px" id="1-uHnuWoYea9KZgEBRkGmdpbKDT5THls9dn56XolZ1Lg"
alt="SOA Integration"></div>
</div>
<div class="slide">
<hgroup>
<h1>Integration Approaches Overview</h1>
</hgroup>
<div id="1i5jXogsSgaBZzCMpgtnXdTYaJ_rjbj_AeXEvkH9ljBI" class="h-drawing" style="height: 480px"></div>
</div>
<div class="slide">
<hgroup>
<h1>Data-oriented Integration</h1>
</hgroup>
<div class="h-drawing" style="height: 140px" id="103hhb19k8lNgnHJ4ul5kpR7cUb7L1tmVFnoXtq15M5A"></div>
<ul class="x-small">
<li>Third-party database access</li>
<ul>
<li>Application D accesses a database of application B directly
by using SQL and a knowledge of database B structure and constraints</li>
<li>In the past: monolithic and two-tier client/server architectures</li>
<li>Today: ETL (Extract, Transform, Load) technologies</li>
</ul>
<li>Problems</li>
<ul>
<li>App D must understand complex structures and constraints</li>
<ul>
<li>Data – very complex, includes structure and integrity constraints</li>
<li>Functions/processes – hidden in integrity constraints</li>
<li>Technical – access mechanisms can vary</li>
</ul>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Service-oriented Integration</h1>
</hgroup>
<div class="h-drawing" style="height: 120px" id="1gqZkpqGJixejTLWZrZCE45iZo-2j3_rDgaRs3Qq4rN4"></div>
<ul class="x-small">
<li>Integration at the application layer</li>
<ul>
<li>Application exposes services that other applications consume</li>
<li>Services hide implementation details but only define interfaces for integration</li>
</ul>
<li>Problems</li>
<ul>
<li>Can become unmanageable if not properly designed</li>
<li>Interoperability</li>
<ul>
<li>Data – limited to input and output messages only</li>
<li>Functions/processes – limited to semantics of services</li>
<li>Technical – access mechanisms can vary</li>
</ul>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Integration and Types of Data</h1>
</hgroup>
<ul class="x-small">
<li>Real-time data – Web services</li>
<ul>
<li>Service-oriented integration</li>
<li>online, realtime communication between a client and a service</li>
<li>Usually small data and small amount of service invocation in a process</li>
</ul>
<li>Bulk data – ETL</li>
<ul>
<li>Data-oriented integration</li>
<li>processing of large amount of data in batches</li>
<li>Sometimes required for reconciliation across apps</li>
<ul>
<li>when real-time integration fails and there is poor error handling</li>
</ul>
</ul>
<li><b>SOA provides both Web service and ETL capabilities</b></li>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Enterprise Service Bus</h1>
</hgroup>
<ul class="x-small">
<li>ESB is a central intermediary in SOA</li>
<ul>
<li>Types of services: shared and infrastructure</li>
<li>Types of processes: Technical and Business</li>
</ul>
<li>ESB Application</li>
<ul>
<li>Application running on an application server</li>
<li>Exposes functionality via Web service interface</li>
<li>Allows to communicate with various messaging protocols</li>
</ul>
<li>Middlware Integration Patterns</li>
<ul>
<li>Technical-level interoperability – message broker</li>
<li>Location transparency</li>
<li>Dynamic routing</li>
<li>Session pooling</li>
<li>Message enrichment</li>
<li>Data transformation</li>
<li>Key mapping</li>
</ul>
</ul>
</div>
</section>
<div class="slide outline"></div>
<section>
<header>Integration Patterns</header>
<section>
<header>Synchronous and Asynchronous Integration</header>
<div class="slide" id="sync-async-comm">
<hgroup>
<h1>Synchronous and Asynchronous Integration</h1>
</hgroup>
<div class="h-drawing" style="height: 220px" id="14daki2YQxkRxkpg_RW16-Efihlxzhep8AWXb226NaQA"></div>
<ul class="x-small">
<li>Synchronous</li>
<ul>
<li>one socket, |t<sub>req</sub> – t<sub>res</sub>| is small</li>
<li>easy to implement and deploy, only standard firewall config</li>
<li>only the server defines endpoint</li>
</ul>
<li>Asynchronous</li>
<ul>
<li>request, response each has socket, client and server define endpoints</li>
<li>|t<sub>req</sub> – t<sub>res</sub>| can be large (hours, even days)</li>
<li>harder to do across network elements (private/public networks issue)</li>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Asynchronous via Intermediary</h1>
</hgroup>
<div class="h-drawing" style="height: 220px" id="1mh4fk7kNmLyqVT1Cks4rRFRpGjFcU1yStOYQw2uiew8"></div>
<ul class="x-small">
<li>Intermediary</li>
<ul>
<li>A component that decouples a client-server communication</li>
<li>It increases reliability and performance</li>
<ul>
<li>The server may not be available when a client sends a request</li>
<li>There can be multiple servers that can handle the request</li>
</ul>
</ul>
<li>Further Concepts</li>
<ul>
<li>Message Queues (MQ) – queue-based communication</li>
<li>Publish/Subscribe (P/S) – event-driven communication</li>
</ul>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Asynchronous via Polling</h1>
</hgroup>
<div class="h-drawing" style="height: 220px" id="1F3GsWbkka-hDU75qAzFl1OlhtMMHt_gfxE9m3CcvlAk"></div>
<ul class="x-small">
<li>Polling – only clients open sockets</li>
<ul>
<li>A client performs multiple request-response interactions</li>
<ul>
<li>The first interaction initiates a process on the server</li>
<li>Subsequent interactions check for the processing status</li>
<li>The last interaction retrieves the processing result</li>
</ul>
</ul>
<li>Properties of environments</li>
<ul>
<li>A server cannot open a socket with the client (network restrictions)</li>
<li>Typically on the Web (a client runs in a browser)</li>
</ul>
</ul>
</div>
</section>
<div class="slide outline"></div>
<section>
<header>Microservices Architecture</header>
<div class="slide">
<hgroup>
<h1>The Scale Cube</h1>
</hgroup>
<ul class="x-small">
<li>Three-dimensional scalability model</li>
<ul>
<li>X-Axis scaling requests across multiple instances</li>
<li><b>Y-Axis scaling decomposes an application into micro-services</b></li>
<li>Z-Axis scaling requests across "data partitioned" instances</li>
</ul>
<img src="img/scale-cube.png" style="zoom: 0.9"></img>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Overview</h1>
</hgroup>
<ul>
<li>Emerging software architecture</li>
<ul>
<li>monolithic vs. decoupled applications</li>
<li>applications as independenly deployable services</li>
</ul>
<img src="img/microservices.png" style="zoom: 0.7"></img>
</ul>
</div>
<div class="slide">
<hgroup>
<h1>Major Characteristics</h1>
</hgroup>
<ul>
<li>Loosely coupled</li>
<ul>
<li>Integrated using well-defined interfaces</li>
</ul>
<li>Technology-agnostic protocols</li>
<ul>
<li>HTTP, they use REST architecture</li>
</ul>
<li>Independently deployable and easy to replace</li>
<ul>
<li>A change in small part requires to redeploy only that part</li>
</ul>
<li>Organized around capabilities</li>
<ul>
<li>such as accounting, billing, recommendation, etc.</li>
</ul>
<li>Impplemented using different technologies</li>
<ul>
<li>polyglot – programming languages, databases</li>
</ul>
<li>Owned by a small team</li>
</ul>
</div>
</section>
</body>
</html>