WEBVTT

1
00:00:02.555 --> 00:00:05.905
<00:00:02.555>Great, <00:00:02.730>then <00:00:02.905>thanks <00:00:03.080>a <00:00:03.255>lot <00:00:03.430>from <00:00:03.605>my <00:00:03.780>side, <00:00:03.955>too.

2
00:00:06.125 --> 00:00:10.745
<00:00:06.125>And, <00:00:06.280>uh, <00:00:06.436>yes, <00:00:06.591>also, <00:00:06.747>welcome <00:00:06.902>to <00:00:07.058>my <00:00:07.213>talk <00:00:07.369>about, <00:00:07.525>uh,

3
00:00:10.775 --> 00:00:14.465
<00:00:10.775>concurrency <00:00:11.241>with <00:00:11.708>Go <00:00:12.175>Go

4
00:00:14.725 --> 00:00:18.655
<00:00:14.725>as <00:00:15.004>a <00:00:15.285>programming <00:00:15.565>language <00:00:15.844>has <00:00:16.125>one,

5
00:00:19.555 --> 00:00:21.655
<00:00:19.555>in <00:00:19.835>my <00:00:20.115>opinion, <00:00:20.395>very <00:00:20.675>special <00:00:20.955>feature.

6
00:00:22.555 --> 00:00:26.775
<00:00:22.555>Um, <00:00:22.695>and <00:00:22.835>this <00:00:22.975>is <00:00:23.115>the <00:00:23.255>way <00:00:23.395>how <00:00:23.535>it <00:00:23.675>does, <00:00:23.814>uh, <00:00:23.955>concurrency.

7
00:00:28.765 --> 00:00:31.695
<00:00:28.765>This <00:00:28.940>leads <00:00:29.115>in <00:00:29.290>my <00:00:29.465>eyes <00:00:29.640>to, <00:00:29.815>to <00:00:29.990>a <00:00:30.165>kind

8
00:00:31.695 --> 00:00:33.815
<00:00:31.695>of <00:00:32.045>natural <00:00:32.395>design <00:00:32.744>of <00:00:33.095>software.

9
00:00:34.435 --> 00:00:39.015
<00:00:34.435>And <00:00:34.542>I <00:00:34.650>hope <00:00:34.758>I <00:00:34.865>can <00:00:34.973>show <00:00:35.081>you <00:00:35.188>a <00:00:35.296>bit <00:00:35.404>why <00:00:35.511>I <00:00:35.619>do <00:00:35.727>think <00:00:35.835>so

10
00:00:39.315 --> 00:00:40.975
<00:00:39.315>and <00:00:39.595>how <00:00:39.875>it <00:00:40.155>can <00:00:40.434>be <00:00:40.714>done.

11
00:00:41.275 --> 00:00:43.735
<00:00:41.275>So <00:00:41.508>let <00:00:41.741>me <00:00:41.975>introduce <00:00:42.208>myself <00:00:42.441>a <00:00:42.675>bit.

12
00:00:44.355 --> 00:00:47.295
<00:00:44.355>Um, <00:00:44.588>as <00:00:44.821>said, <00:00:45.055>my <00:00:45.288>name <00:00:45.521>is <00:00:45.754>Frank.

13
00:00:47.835 --> 00:00:52.255
<00:00:47.835>I'm <00:00:47.990>from <00:00:48.146>Berg <00:00:48.301>in <00:00:48.457>Germany, <00:00:48.612>uh, <00:00:48.768>here <00:00:48.923>in <00:00:49.079>the <00:00:49.235>Northwestern.

14
00:00:53.355 --> 00:00:58.095
<00:00:53.355>Uh, <00:00:53.482>I'm <00:00:53.609>born <00:00:53.736>1965, <00:00:53.864>so <00:00:53.991>I'm <00:00:54.118>a <00:00:54.245>bit <00:00:54.373>older <00:00:54.500>working <00:00:54.627>at <00:00:54.754>the,

15
00:00:58.195 --> 00:01:02.415
<00:00:58.195>uh, <00:00:58.428>company <00:00:58.661>Matic, <00:00:58.895>which <00:00:59.128>has <00:00:59.361>head, <00:00:59.595>uh,

16
00:01:02.605 --> 00:01:04.575
<00:01:02.605>headquarter <00:01:03.071>in, <00:01:03.538>in <00:01:04.004>Hamburg.

17
00:01:05.445 --> 00:01:08.815
<00:01:05.444>Here <00:01:05.572>I'm <00:01:05.699>acting <00:01:05.826>as <00:01:05.954>a <00:01:06.081>team <00:01:06.208>lead <00:01:06.335>development <00:01:06.463>with <00:01:06.590>a <00:01:06.717>small <00:01:06.845>team

18
00:01:08.915 --> 00:01:12.655
<00:01:08.914>around, <00:01:09.148>uh, <00:01:09.381>um, <00:01:09.615>operator <00:01:09.848>development <00:01:10.081>for <00:01:10.315>Kubernetes.

19
00:01:13.435 --> 00:01:17.655
<00:01:13.435>And <00:01:13.562>you <00:01:13.689>find <00:01:13.816>me <00:01:13.944>everywhere <00:01:14.071>in <00:01:14.198>the <00:01:14.325>network, <00:01:14.453>um, <00:01:14.580>with <00:01:14.707>a, <00:01:14.835>uh,

20
00:01:18.195 --> 00:01:22.455
<00:01:18.195>little <00:01:18.428>id <00:01:18.661>the <00:01:18.895>new, <00:01:19.128>um, <00:01:19.361>this <00:01:19.595>is

21
00:01:22.755 --> 00:01:26.575
<00:01:22.755>for <00:01:22.929>example <00:01:23.104>on <00:01:23.280>Twitter <00:01:23.455>or <00:01:23.630>on <00:01:23.804>GitHub, <00:01:23.979>almost <00:01:24.155>everywhere.

22
00:01:28.435 --> 00:01:33.135
<00:01:28.435>So <00:01:28.668>let's <00:01:28.901>dive <00:01:29.135>into <00:01:29.368>the <00:01:29.601>concurrent <00:01:29.835>world.

23
00:01:33.935 --> 00:01:37.575
<00:01:33.935>I <00:01:34.075>think <00:01:34.215>our <00:01:34.355>world <00:01:34.495>as <00:01:34.635>a, <00:01:34.775>as <00:01:34.915>a <00:01:35.055>word <00:01:35.195>is <00:01:35.335>concurrent.

24
00:01:38.325 --> 00:01:42.335
<00:01:38.325>It's, <00:01:38.452>is <00:01:38.579>that <00:01:38.706>we <00:01:38.834>have <00:01:38.961>so <00:01:39.088>many <00:01:39.215>things <00:01:39.343>that <00:01:39.470>are <00:01:39.597>happening, <00:01:39.725>uh,

25
00:01:42.515 --> 00:01:45.895
<00:01:42.515>the <00:01:42.715>whole <00:01:42.915>time, <00:01:43.115>um, <00:01:43.315>concurrent <00:01:43.515>to <00:01:43.715>each <00:01:43.915>other.

26
00:01:46.405 --> 00:01:47.895
<00:01:46.405>Some <00:01:46.673>parts <00:01:46.941>are <00:01:47.209>with <00:01:47.477>each <00:01:47.746>other,

27
00:01:48.285 --> 00:01:50.615
<00:01:48.285>some <00:01:48.518>are <00:01:48.751>more <00:01:48.985>independent <00:01:49.218>of <00:01:49.451>each <00:01:49.685>other.

28
00:01:51.475 --> 00:01:54.415
<00:01:51.475>So, <00:01:51.708>um, <00:01:51.941>it's <00:01:52.175>a <00:01:52.408>very <00:01:52.641>natural <00:01:52.875>principle.

29
00:01:54.915 --> 00:01:59.145
<00:01:54.914>The <00:01:55.195>individuals, <00:01:55.475>regardless <00:01:55.755>if, <00:01:56.035>if <00:01:56.315>animals

30
00:01:59.325 --> 00:02:04.025
<00:01:59.325>as <00:01:59.465>plants <00:01:59.605>or <00:01:59.745>if, <00:01:59.885>if <00:02:00.025>human <00:02:00.165>beings, <00:02:00.305>um, <00:02:00.445>populate <00:02:00.585>this <00:02:00.725>world.

31
00:02:04.325 --> 00:02:08.025
<00:02:04.325>And, <00:02:04.558>um, <00:02:04.791>as <00:02:05.025>mentioned, <00:02:05.258>we <00:02:05.491>act <00:02:05.725>together.

32
00:02:08.565 --> 00:02:11.385
<00:02:08.565>We <00:02:08.914>act, <00:02:09.264>uh, <00:02:09.615>totally <00:02:09.965>independent.

33
00:02:11.925 --> 00:02:16.785
<00:02:11.925>Um, <00:02:12.100>and <00:02:12.275>we <00:02:12.450>act <00:02:12.625>also <00:02:12.800>dependent <00:02:12.975>so <00:02:13.150>that, <00:02:13.325>uh,

34
00:02:17.245 --> 00:02:19.185
<00:02:17.245>we <00:02:17.525>don't <00:02:17.805>wanna <00:02:18.085>really <00:02:18.365>work <00:02:18.645>together,

35
00:02:19.325 --> 00:02:23.105
<00:02:19.325>but <00:02:19.524>we <00:02:19.725>are, <00:02:19.924>have <00:02:20.125>dependencies <00:02:20.325>and <00:02:20.524>we <00:02:20.725>communicate

36
00:02:23.565 --> 00:02:28.345
<00:02:23.565>and, <00:02:23.740>uh, <00:02:23.915>send <00:02:24.090>signals <00:02:24.265>to, <00:02:24.440>to <00:02:24.615>enable <00:02:24.790>our <00:02:24.965>coexistence.

37
00:02:30.525 --> 00:02:33.385
<00:02:30.525>Um, <00:02:30.725>as <00:02:30.925>mentioned, <00:02:31.125>it's <00:02:31.325>a <00:02:31.525>world <00:02:31.725>of <00:02:31.925>plants.

38
00:02:34.495 --> 00:02:36.025
<00:02:34.495>It's <00:02:34.839>a <00:02:35.183>world <00:02:35.527>of <00:02:35.872>animals.

39
00:02:36.255 --> 00:02:38.945
<00:02:36.255>Here, <00:02:36.535>my <00:02:36.815>little <00:02:37.095>honey <00:02:37.375>beans, <00:02:37.655>um,

40
00:02:40.365 --> 00:02:43.905
<00:02:40.365>we <00:02:40.565>are <00:02:40.765>the <00:02:40.965>people <00:02:41.165>at <00:02:41.365>work <00:02:41.565>working <00:02:41.765>together.

41
00:02:45.085 --> 00:02:47.145
<00:02:45.085>We <00:02:45.365>are <00:02:45.645>the <00:02:45.925>people <00:02:46.205>doing <00:02:46.485>sports.

42
00:02:47.605 --> 00:02:50.985
<00:02:47.605>Um, <00:02:47.744>I <00:02:47.885>don't <00:02:48.024>know <00:02:48.165>how <00:02:48.304>many <00:02:48.445>people <00:02:48.584>here <00:02:48.725>doing <00:02:48.864>ice <00:02:49.005>hockey,

43
00:02:51.245 --> 00:02:53.505
<00:02:51.245>but <00:02:51.478>it's <00:02:51.711>a <00:02:51.945>kind <00:02:52.178>of <00:02:52.411>sport <00:02:52.645>too.

44
00:02:54.085 --> 00:02:56.745
<00:02:54.085>Uh, <00:02:54.365>I <00:02:54.645>should <00:02:54.925>have <00:02:55.205>taken <00:02:55.485>football

45
00:02:56.925 --> 00:03:00.685
<00:02:56.925>as <00:02:57.080>we <00:02:57.236>currently <00:02:57.391>have <00:02:57.547>the <00:02:57.702>World <00:02:57.858>Cup, <00:02:58.013>a <00:02:58.169>European <00:02:58.325>cup.

46
00:03:01.385 --> 00:03:04.665
<00:03:01.385>Um, <00:03:01.665>all <00:03:01.945>the <00:03:02.225>people <00:03:02.505>at <00:03:02.785>conferences

47
00:03:05.825 --> 00:03:08.105
<00:03:05.825>normally <00:03:06.058>listening <00:03:06.291>in <00:03:06.524>one <00:03:06.758>great <00:03:06.991>room <00:03:07.225>and,

48
00:03:08.205 --> 00:03:11.425
<00:03:08.205>and, <00:03:08.555>uh, <00:03:08.905>following <00:03:09.255>the <00:03:09.605>speaker,

49
00:03:13.505 --> 00:03:16.165
<00:03:13.505>the, <00:03:13.644>the <00:03:13.785>people <00:03:13.924>of <00:03:14.065>everyday <00:03:14.204>life <00:03:14.345>you <00:03:14.484>see <00:03:14.625>on <00:03:14.765>the <00:03:14.905>street,

50
00:03:16.585 --> 00:03:20.245
<00:03:16.585>you <00:03:16.785>see <00:03:16.985>in <00:03:17.185>the <00:03:17.385>markets, <00:03:17.585>what <00:03:17.785>they're <00:03:17.985>doing.

51
00:03:21.345 --> 00:03:24.765
<00:03:21.345>Um, <00:03:21.578>it's <00:03:21.811>our <00:03:22.045>daily <00:03:22.278>life <00:03:22.511>all <00:03:22.745>over

52
00:03:25.905 --> 00:03:30.335
<00:03:25.905>and <00:03:26.105>over <00:03:26.305>the <00:03:26.505>years, <00:03:26.705>um, <00:03:26.905>the <00:03:27.105>modern <00:03:27.305>systems

53
00:03:31.955 --> 00:03:33.055
<00:03:31.954>got <00:03:32.945>more

54
00:03:33.055 --> 00:03:37.055
<00:03:33.055>and <00:03:33.210>more <00:03:33.366>powerful <00:03:33.521>while <00:03:33.677>in <00:03:33.832>the, <00:03:33.988>in <00:03:34.143>the <00:03:34.299>very <00:03:34.455>early

55
00:03:37.815 --> 00:03:40.055
<00:03:37.815>computer <00:03:38.281>times, <00:03:38.748>uh, <00:03:39.215>yeah,

56
00:03:40.715 --> 00:03:45.055
<00:03:40.715>we <00:03:40.948>had <00:03:41.181>single <00:03:41.415>core <00:03:41.648>systems <00:03:41.881>quite <00:03:42.115>slow.

57
00:03:45.955 --> 00:03:50.455
<00:03:45.954>Um, <00:03:46.154>so <00:03:46.355>it <00:03:46.554>has <00:03:46.755>been <00:03:46.954>problem <00:03:47.154>to <00:03:47.355>create

58
00:03:51.045 --> 00:03:54.535
<00:03:51.045>real <00:03:51.511>complex <00:03:51.978>concurrent <00:03:52.445>systems.

59
00:03:55.575 --> 00:03:57.575
<00:03:55.575>It's <00:03:55.855>today <00:03:56.135>more <00:03:56.415>and <00:03:56.695>more <00:03:56.975>simple.

60
00:03:58.515 --> 00:04:03.055
<00:03:58.515>The <00:03:58.690>architectures <00:03:58.864>are <00:03:59.040>changing, <00:03:59.214>uh, <00:03:59.390>not <00:03:59.565>even <00:03:59.739>on, <00:03:59.915>on,

61
00:04:03.355 --> 00:04:07.485
<00:04:03.355>uh, <00:04:03.588>not <00:04:03.821>only <00:04:04.054>on <00:04:04.288>one, <00:04:04.521>um, <00:04:04.755>processor

62
00:04:07.515 --> 00:04:08.645
<00:04:07.515>with <00:04:08.023>multiple <00:04:08.532>core,

63
00:04:08.865 --> 00:04:11.125
<00:04:08.865>but <00:04:09.098>also <00:04:09.331>the <00:04:09.565>architectures <00:04:09.798>in <00:04:10.031>the <00:04:10.265>systems.

64
00:04:12.145 --> 00:04:13.965
<00:04:12.145>Uh, <00:04:12.495>so <00:04:12.845>we <00:04:13.195>have <00:04:13.545>more

65
00:04:14.085 --> 00:04:16.325
<00:04:14.085>and <00:04:14.435>more <00:04:14.785>CPUs <00:04:15.135>course, <00:04:15.485>uh,

66
00:04:16.465 --> 00:04:18.245
<00:04:16.464>inside <00:04:16.698>the <00:04:16.931>course <00:04:17.164>we <00:04:17.398>have <00:04:17.631>hyper <00:04:17.864>threats.

67
00:04:19.065 --> 00:04:23.765
<00:04:19.065>Um, <00:04:19.265>and <00:04:19.464>in <00:04:19.665>the <00:04:19.865>beginning <00:04:20.065>we <00:04:20.265>used <00:04:20.464>this

68
00:04:24.805 --> 00:04:26.365
<00:04:24.805>upcoming <00:04:25.271>power <00:04:25.738>via <00:04:26.205>threat.

69
00:04:26.545 --> 00:04:28.125
<00:04:26.545>But <00:04:27.011>this <00:04:27.478>is <00:04:27.945>complex.

70
00:04:28.345 --> 00:04:32.325
<00:04:28.345>You <00:04:28.485>have <00:04:28.625>to, <00:04:28.765>to <00:04:28.905>ensure <00:04:29.045>that <00:04:29.185>you <00:04:29.325>have, <00:04:29.465>uh, <00:04:29.605>summer <00:04:29.745>force

71
00:04:32.585 --> 00:04:35.965
<00:04:32.585>or <00:04:32.864>muts <00:04:33.145>and, <00:04:33.424>uh, <00:04:33.705>so <00:04:33.984>it's,

72
00:04:35.995 --> 00:04:37.765
<00:04:35.995>it's <00:04:36.345>very <00:04:36.695>often <00:04:37.045>error <00:04:37.395>prone.

73
00:04:37.875 --> 00:04:38.885
<00:04:37.875>It's, <00:04:38.329>it's <00:04:38.784>locking

74
00:04:39.945 --> 00:04:43.285
<00:04:39.945>and, <00:04:40.224>uh, <00:04:40.505>good <00:04:40.784>concurrent <00:04:41.065>runtime <00:04:41.344>environment.

75
00:04:43.825 --> 00:04:47.325
<00:04:43.825>Um, <00:04:43.965>and <00:04:44.104>this <00:04:44.245>is <00:04:44.385>not <00:04:44.525>only <00:04:44.664>go, <00:04:44.805>it's <00:04:44.945>also, <00:04:45.085>for <00:04:45.224>example,

76
00:04:48.905 --> 00:04:52.245
<00:04:48.905>um, <00:04:49.138>enables <00:04:49.371>a <00:04:49.604>fine, <00:04:49.838>fine-grained, <00:04:50.071>uh, <00:04:50.304>usage

77
00:04:53.835 --> 00:04:57.485
<00:04:53.835>with <00:04:54.010>a <00:04:54.185>bit <00:04:54.359>of <00:04:54.534>effort, <00:04:54.710>but <00:04:54.885>much <00:04:55.060>more <00:04:55.234>allergen.

78
00:04:58.505 --> 00:05:01.325
<00:04:58.505>Um, <00:04:58.705>so <00:04:58.905>we <00:04:59.105>have <00:04:59.305>a <00:04:59.505>lot <00:04:59.705>of <00:04:59.905>processes,

79
00:05:01.585 --> 00:05:03.925
<00:05:01.585>and <00:05:01.935>this <00:05:02.284>isn't <00:05:02.635>meant <00:05:02.984>especially

80
00:05:04.025 --> 00:05:06.125
<00:05:04.025>as <00:05:04.491>operating <00:05:04.958>system <00:05:05.424>processes.

81
00:05:06.665 --> 00:05:10.725
<00:05:06.665>It <00:05:06.865>also <00:05:07.065>can <00:05:07.265>be <00:05:07.465>those <00:05:07.665>processes <00:05:07.865>where <00:05:08.065>you

82
00:05:11.715 --> 00:05:16.405
<00:05:11.715>execute <00:05:11.890>some <00:05:12.065>kind <00:05:12.239>of, <00:05:12.414>of <00:05:12.590>work <00:05:12.765>of, <00:05:12.940>um, <00:05:13.114>operation.

83
00:05:17.025 --> 00:05:21.245
<00:05:17.025>It <00:05:17.224>can <00:05:17.424>be, <00:05:17.625>um, <00:05:17.825>what <00:05:18.025>we, <00:05:18.224>we <00:05:18.424>learn

84
00:05:21.345 --> 00:05:24.845
<00:05:21.345>as <00:05:21.545>a <00:05:21.745>smallest <00:05:21.945>computing <00:05:22.145>unit <00:05:22.345>in, <00:05:22.545>in <00:05:22.745>go,

85
00:05:24.985 --> 00:05:27.325
<00:05:24.985>but <00:05:25.218>also <00:05:25.451>it <00:05:25.685>could <00:05:25.918>be <00:05:26.151>a <00:05:26.385>threat

86
00:05:27.505 --> 00:05:30.085
<00:05:27.505>or <00:05:27.680>it <00:05:27.855>could <00:05:28.030>be <00:05:28.205>a <00:05:28.380>real <00:05:28.555>operating <00:05:28.730>system <00:05:28.905>process.

87
00:05:30.985 --> 00:05:34.165
<00:05:30.985>Uh, <00:05:31.125>we <00:05:31.265>have <00:05:31.405>a <00:05:31.545>runtime <00:05:31.685>environment, <00:05:31.825>which <00:05:31.965>could <00:05:32.105>be <00:05:32.245>on <00:05:32.385>one

88
00:05:34.845 --> 00:05:36.965
<00:05:34.845>computer, <00:05:35.125>but <00:05:35.405>also <00:05:35.685>on <00:05:35.965>multiple <00:05:36.245>computers.

89
00:05:37.105 --> 00:05:39.165
<00:05:37.105>And <00:05:37.571>this <00:05:38.038>runtime <00:05:38.505>environment

90
00:05:41.595 --> 00:05:45.765
<00:05:41.595>organizes <00:05:41.828>that <00:05:42.061>you <00:05:42.295>use <00:05:42.528>the, <00:05:42.761>the <00:05:42.995>different

91
00:05:46.305 --> 00:05:48.965
<00:05:46.305>course <00:05:47.005>below <00:05:47.705>optimally.

92
00:05:49.185 --> 00:05:54.165
<00:05:49.185>So, <00:05:49.385>um, <00:05:49.585>this <00:05:49.785>for <00:05:49.985>example, <00:05:50.185>is <00:05:50.385>one, <00:05:50.585>could,

93
00:05:54.165 --> 00:05:58.845
<00:05:54.165>could <00:05:54.281>you, <00:05:54.398>could <00:05:54.515>you <00:05:54.631>seen <00:05:54.748>as <00:05:54.865>one <00:05:54.981>image <00:05:55.098>of <00:05:55.215>a, <00:05:55.331>of <00:05:55.448>a <00:05:55.565>single,

94
00:05:59.385 --> 00:06:03.805
<00:05:59.385>um, <00:05:59.664>computer <00:05:59.945>running <00:06:00.224>a <00:06:00.505>GO <00:06:00.784>program

95
00:06:03.895 --> 00:06:06.405
<00:06:03.895>where <00:06:04.174>you <00:06:04.455>have <00:06:04.734>multiple <00:06:05.015>go <00:06:05.294>routines.

96
00:06:06.675 --> 00:06:08.205
<00:06:06.675>This <00:06:06.904>is <00:06:07.134>how <00:06:07.363>the <00:06:07.593>go, <00:06:07.822>uh, <00:06:08.051>uh,

97
00:06:08.445 --> 00:06:10.245
<00:06:08.445>internal <00:06:08.724>processes <00:06:09.005>are <00:06:09.284>called <00:06:09.565>and <00:06:09.844>go.

98
00:06:10.985 --> 00:06:15.565
<00:06:10.985>Um, <00:06:11.140>and <00:06:11.296>the <00:06:11.451>go <00:06:11.607>runtime, <00:06:11.762>which <00:06:11.918>is <00:06:12.073>inside <00:06:12.229>your <00:06:12.385>binary,

99
00:06:16.755 --> 00:06:19.045
<00:06:16.755>organizes <00:06:17.105>all <00:06:17.455>those <00:06:17.805>goal <00:06:18.155>routines

100
00:06:19.705 --> 00:06:23.605
<00:06:19.705>and <00:06:19.880>distributes <00:06:20.055>the <00:06:20.229>computing <00:06:20.405>power <00:06:20.580>on <00:06:20.755>the <00:06:20.930>different <00:06:21.104>course

101
00:06:23.715 --> 00:06:24.965
<00:06:23.715>your <00:06:24.277>system <00:06:24.840>provides.

102
00:06:27.815 --> 00:06:28.925
<00:06:27.815>These <00:06:28.814>processes,

103
00:06:29.375 --> 00:06:32.485
<00:06:29.375>which <00:06:29.530>I <00:06:29.686>have <00:06:29.841>shown <00:06:29.997>here <00:06:30.152>in <00:06:30.308>the <00:06:30.463>last <00:06:30.619>diagram, <00:06:30.775>uh,

104
00:06:32.985 --> 00:06:35.085
<00:06:32.985>can <00:06:33.451>work <00:06:33.918>totally <00:06:34.385>alone.

105
00:06:35.425 --> 00:06:39.805
<00:06:35.425>Or <00:06:35.580>here, <00:06:35.736>uh, <00:06:35.891>on <00:06:36.047>one <00:06:36.202>point <00:06:36.358>they, <00:06:36.513>they <00:06:36.669>have <00:06:36.825>contact,

106
00:06:40.025 --> 00:06:43.085
<00:06:40.025>but, <00:06:40.200>uh, <00:06:40.375>mostly <00:06:40.549>they <00:06:40.724>are <00:06:40.900>interested <00:06:41.075>in <00:06:41.250>working <00:06:41.424>alone,

107
00:06:43.665 --> 00:06:45.725
<00:06:43.665>but <00:06:43.898>they <00:06:44.131>also <00:06:44.365>can <00:06:44.598>have, <00:06:44.831>uh, <00:06:45.065>uh,

108
00:06:45.825 --> 00:06:47.805
<00:06:45.825>as <00:06:46.025>a <00:06:46.224>team <00:06:46.425>a <00:06:46.625>lot <00:06:46.825>of <00:06:47.025>power <00:06:47.224>together.

109
00:06:48.065 --> 00:06:53.045
<00:06:48.065>So, <00:06:48.172>um, <00:06:48.280>if <00:06:48.388>I <00:06:48.495>let <00:06:48.603>a <00:06:48.711>lot <00:06:48.818>of <00:06:48.926>them <00:06:49.034>work <00:06:49.141>on <00:06:49.249>the <00:06:49.357>same <00:06:49.465>stuff,

110
00:06:53.305 --> 00:06:56.085
<00:06:53.305>um, <00:06:53.585>they <00:06:53.865>can <00:06:54.145>act <00:06:54.425>very <00:06:54.705>powerful

111
00:06:56.505 --> 00:06:58.765
<00:06:56.505>and <00:06:56.855>use <00:06:57.205>your, <00:06:57.555>your <00:06:57.905>system.

112
00:07:00.955 --> 00:07:02.455
<00:07:00.955>Um, <00:07:01.405>but <00:07:01.854>more <00:07:02.305>important

113
00:07:03.065 --> 00:07:05.655
<00:07:03.065>motivation <00:07:03.344>than <00:07:03.625>hardware <00:07:03.905>is <00:07:04.185>the <00:07:04.465>structure.

114
00:07:06.445 --> 00:07:11.045
<00:07:06.445>It's <00:07:06.620>that, <00:07:06.795>uh, <00:07:06.969>as <00:07:07.145>I <00:07:07.320>told <00:07:07.495>in <00:07:07.670>the <00:07:07.844>beginning,

115
00:07:11.505 --> 00:07:15.205
<00:07:11.505>um, <00:07:11.738>we <00:07:11.971>have <00:07:12.205>our <00:07:12.438>individuals, <00:07:12.671>which <00:07:12.905>are

116
00:07:16.365 --> 00:07:19.535
<00:07:16.365>more <00:07:16.565>or <00:07:16.765>less <00:07:16.965>independent, <00:07:17.165>but <00:07:17.365>also <00:07:17.565>work <00:07:17.765>together.

117
00:07:20.205 --> 00:07:22.015
<00:07:20.205>They <00:07:20.905>are <00:07:21.604>communicate,

118
00:07:22.875 --> 00:07:26.455
<00:07:22.875>and <00:07:23.030>most <00:07:23.186>of <00:07:23.341>them <00:07:23.497>have <00:07:23.652>some <00:07:23.808>kind <00:07:23.963>of <00:07:24.119>internal <00:07:24.275>state.

119
00:07:26.675 --> 00:07:30.815
<00:07:26.675>So <00:07:26.955>we <00:07:27.235>have <00:07:27.515>the, <00:07:27.795>the <00:07:28.075>encapsulation

120
00:07:30.955 --> 00:07:33.295
<00:07:30.955>of <00:07:31.234>this <00:07:31.515>state <00:07:31.794>inside <00:07:32.075>the <00:07:32.354>process.

121
00:07:33.475 --> 00:07:36.935
<00:07:33.475>Inside <00:07:33.708>this <00:07:33.941>process <00:07:34.175>means, <00:07:34.408>uh, <00:07:34.641>um, <00:07:34.875>that

122
00:07:37.875 --> 00:07:42.735
<00:07:37.875>you <00:07:38.015>have <00:07:38.155>to <00:07:38.295>use <00:07:38.435>a <00:07:38.575>kind <00:07:38.715>of <00:07:38.855>fixed <00:07:38.995>defined <00:07:39.135>API <00:07:39.275>to

123
00:07:42.795 --> 00:07:47.375
<00:07:42.795>to <00:07:42.970>access <00:07:43.145>this, <00:07:43.320>this <00:07:43.495>state <00:07:43.670>and <00:07:43.845>manipulate <00:07:44.020>the <00:07:44.195>state.

124
00:07:48.235 --> 00:07:53.135
<00:07:48.235>And <00:07:48.375>to <00:07:48.515>do <00:07:48.655>this, <00:07:48.795>you, <00:07:48.935>uh, <00:07:49.075>are <00:07:49.215>using <00:07:49.355>messages <00:07:49.495>to <00:07:49.635>communicate

125
00:07:53.725 --> 00:07:55.335
<00:07:53.725>with <00:07:54.191>this, <00:07:54.658>uh, <00:07:55.125>process.

126
00:07:55.965 --> 00:08:00.295
<00:07:55.965>It's, <00:07:56.140>it's <00:07:56.315>messages, <00:07:56.490>not <00:07:56.665>in <00:07:56.840>the <00:07:57.015>sense <00:07:57.190>that <00:07:57.365>is

127
00:08:00.295 --> 00:08:02.935
<00:08:00.295>that <00:08:00.575>there's <00:08:00.855>a <00:08:01.135>type <00:08:01.415>message, <00:08:01.695>uh,

128
00:08:03.035 --> 00:08:07.935
<00:08:03.035>but <00:08:03.162>in <00:08:03.289>the <00:08:03.416>sense <00:08:03.544>of, <00:08:03.671>um, <00:08:03.798>that <00:08:03.925>this <00:08:04.053>kind <00:08:04.180>of <00:08:04.307>semantic <00:08:04.435>message,

129
00:08:08.225 --> 00:08:12.845
<00:08:08.225>which <00:08:08.458>is <00:08:08.691>communicating <00:08:08.925>with <00:08:09.158>the <00:08:09.391>backend, <00:08:09.625>the

130
00:08:13.515 --> 00:08:17.265
<00:08:13.515>type <00:08:13.794>itself, <00:08:14.075>the <00:08:14.354>process <00:08:14.635>itself <00:08:14.914>ensures

131
00:08:17.415 --> 00:08:20.705
<00:08:17.415>that <00:08:17.695>everything <00:08:17.975>internally <00:08:18.255>is <00:08:18.535>done <00:08:18.815>sequentially.

132
00:08:21.405 --> 00:08:26.345
<00:08:21.405>So, <00:08:21.580>um, <00:08:21.755>that <00:08:21.929>you <00:08:22.104>have <00:08:22.280>not <00:08:22.455>the <00:08:22.630>trouble <00:08:22.804>of,

133
00:08:26.605 --> 00:08:28.265
<00:08:26.605>of <00:08:27.305>when <00:08:28.005>A

134
00:08:28.405 --> 00:08:32.905
<00:08:28.405>and <00:08:28.560>B <00:08:28.716>from <00:08:28.871>external <00:08:29.027>side <00:08:29.182>access <00:08:29.338>at <00:08:29.493>the <00:08:29.649>same <00:08:29.804>time,

135
00:08:33.005 --> 00:08:36.225
<00:08:33.005>and <00:08:33.179>the <00:08:33.355>one <00:08:33.530>manipulates <00:08:33.705>and <00:08:33.880>the <00:08:34.054>other <00:08:34.230>one <00:08:34.405>reads.

136
00:08:36.965 --> 00:08:41.385
<00:08:36.965>And, <00:08:37.140>uh, <00:08:37.315>you <00:08:37.490>have <00:08:37.665>a, <00:08:37.840>a <00:08:38.015>not <00:08:38.190>done, <00:08:38.365>uh,

137
00:08:41.605 --> 00:08:45.465
<00:08:41.605>not <00:08:41.780>totally <00:08:41.955>done <00:08:42.130>manipulation, <00:08:42.305>that <00:08:42.480>the <00:08:42.655>reading <00:08:42.830>is <00:08:43.005>in,

138
00:08:45.485 --> 00:08:46.545
<00:08:45.485>uh, <00:08:46.439>inconsistent.

139
00:08:47.245 --> 00:08:50.745
<00:08:47.245>So <00:08:47.478>you <00:08:47.711>have <00:08:47.945>secretive <00:08:48.178>processing <00:08:48.411>as <00:08:48.645>well

140
00:08:50.745 --> 00:08:52.745
<00:08:50.745>as <00:08:51.211>atomic <00:08:51.678>state <00:08:52.145>changes.

141
00:08:53.725 --> 00:08:57.565
<00:08:53.725>So, <00:08:53.958>uh, <00:08:54.191>thinking <00:08:54.425>about <00:08:54.658>this <00:08:54.891>is, <00:08:55.125>um,

142
00:08:58.035 --> 00:08:59.445
<00:08:58.035>more <00:08:58.669>than <00:08:59.304>inheritance.

143
00:09:00.195 --> 00:09:02.965
<00:09:00.195>What <00:09:00.428>we <00:09:00.661>all <00:09:00.895>had, <00:09:01.128>uh, <00:09:01.361>have, <00:09:01.595>um,

144
00:09:03.305 --> 00:09:07.045
<00:09:03.305>as <00:09:03.479>a <00:09:03.655>real <00:09:03.829>benefit <00:09:04.005>of <00:09:04.180>OP <00:09:04.354>is <00:09:04.530>this <00:09:04.704>is

145
00:09:07.705 --> 00:09:08.725
<00:09:07.705>op <00:09:07.934>in <00:09:08.164>the <00:09:08.393>real <00:09:08.623>sense.

146
00:09:08.865 --> 00:09:11.805
<00:09:08.865>And, <00:09:09.065>uh, <00:09:09.265>this <00:09:09.465>is <00:09:09.665>not <00:09:09.865>my, <00:09:10.065>uh, <00:09:10.265>um,

147
00:09:13.145 --> 00:09:14.445
<00:09:13.145>or <00:09:13.379>these <00:09:13.613>are <00:09:13.847>not <00:09:14.081>my <00:09:14.315>words.

148
00:09:15.305 --> 00:09:17.365
<00:09:15.305>The, <00:09:15.584>this <00:09:15.864>is <00:09:16.145>something <00:09:16.425>that, <00:09:16.704>um,

149
00:09:18.145 --> 00:09:22.725
<00:09:18.145>and <00:09:18.300>Kay <00:09:18.456>once <00:09:18.611>said <00:09:18.767>when, <00:09:18.922>uh, <00:09:19.078>talking <00:09:19.233>about <00:09:19.389>the <00:09:19.545>ideas

150
00:09:22.985 --> 00:09:26.925
<00:09:22.985>of <00:09:23.265>actors <00:09:23.545>which <00:09:23.825>are <00:09:24.105>implemented, <00:09:24.385>uh,

151
00:09:27.705 --> 00:09:29.085
<00:09:27.705>in <00:09:28.119>ing, <00:09:28.533>for <00:09:28.947>example.

152
00:09:30.305 --> 00:09:33.365
<00:09:30.305>So <00:09:30.655>I <00:09:31.005>like <00:09:31.354>this <00:09:31.704>idea,

153
00:09:34.745 --> 00:09:38.925
<00:09:34.745>as <00:09:34.978>you <00:09:35.211>may <00:09:35.445>see, <00:09:35.678>um, <00:09:35.911>Rob <00:09:36.145>Pike,

154
00:09:39.265 --> 00:09:43.845
<00:09:39.265>who <00:09:39.439>is <00:09:39.615>one <00:09:39.790>of <00:09:39.965>the, <00:09:40.140>um, <00:09:40.314>designers <00:09:40.490>of <00:09:40.665>the,

155
00:09:43.945 --> 00:09:45.485
<00:09:43.945>of <00:09:44.291>the <00:09:44.638>Google <00:09:44.984>Go <00:09:45.331>team.

156
00:09:46.305 --> 00:09:50.845
<00:09:46.305>Um, <00:09:46.584>also <00:09:46.864>when <00:09:47.145>mentioned <00:09:47.425>that <00:09:47.704>people,

157
00:09:51.115 --> 00:09:53.445
<00:09:51.115>when <00:09:51.315>they <00:09:51.515>get <00:09:51.715>into <00:09:51.915>the <00:09:52.115>world <00:09:52.315>of <00:09:52.515>concurrency,

158
00:09:54.695 --> 00:09:57.805
<00:09:54.695>often <00:09:54.975>too <00:09:55.255>early, <00:09:55.535>think <00:09:55.815>about <00:09:56.095>parallelism.

159
00:09:58.545 --> 00:10:02.765
<00:09:58.545>Uh, <00:09:58.672>but <00:09:58.799>this <00:09:58.926>is <00:09:59.054>a <00:09:59.181>kind <00:09:59.308>of <00:09:59.435>programming <00:09:59.563>as, <00:09:59.690>as <00:09:59.817>a <00:09:59.944>simultaneous

160
00:10:03.315 --> 00:10:07.125
<00:10:03.315>execution <00:10:03.665>of <00:10:04.015>possibly <00:10:04.365>related <00:10:04.715>computation.

161
00:10:07.265 --> 00:10:11.765
<00:10:07.265>So, <00:10:07.731>um, <00:10:08.198>this <00:10:08.665>is

162
00:10:12.515 --> 00:10:16.985
<00:10:12.515>that, <00:10:12.715>that <00:10:12.915>there <00:10:13.115>are <00:10:13.314>parallel <00:10:13.515>streams <00:10:13.715>of <00:10:13.915>computation

163
00:10:17.115 --> 00:10:20.665
<00:10:17.115>where <00:10:17.315>what's, <00:10:17.515>which <00:10:17.715>may <00:10:17.915>work <00:10:18.115>on <00:10:18.315>one <00:10:18.515>task,

164
00:10:20.885 --> 00:10:25.835
<00:10:20.885>but <00:10:21.040>not, <00:10:21.196>so <00:10:21.351>it's <00:10:21.507>a <00:10:21.662>kind <00:10:21.818>of, <00:10:21.973>um, <00:10:22.129>other <00:10:22.285>idea.

165
00:10:25.905 --> 00:10:28.715
<00:10:25.905>It's <00:10:26.079>simply <00:10:26.255>that <00:10:26.430>they <00:10:26.605>are <00:10:26.780>working <00:10:26.954>side <00:10:27.130>by <00:10:27.305>side.

166
00:10:29.615 --> 00:10:33.355
<00:10:29.615>The <00:10:29.742>concurrency <00:10:29.869>part <00:10:29.996>is <00:10:30.124>more <00:10:30.251>that <00:10:30.378>the, <00:10:30.505>that <00:10:30.633>you <00:10:30.760>have <00:10:30.887>a <00:10:31.015>kind

167
00:10:33.355 --> 00:10:36.795
<00:10:33.355>of <00:10:33.588>programming <00:10:33.821>as <00:10:34.055>a <00:10:34.288>composition <00:10:34.521>of <00:10:34.755>independently

168
00:10:37.345 --> 00:10:38.555
<00:10:37.345>executing <00:10:38.434>processes.

169
00:10:38.735 --> 00:10:43.195
<00:10:38.735>So, <00:10:39.085>um, <00:10:39.435>these, <00:10:39.785>these, <00:10:40.135>uh,

170
00:10:44.165 --> 00:10:49.035
<00:10:44.165>parts, <00:10:44.365>you <00:10:44.564>create <00:10:44.765>these <00:10:44.964>processes, <00:10:45.165>you <00:10:45.365>create, <00:10:45.564>uh,

171
00:10:49.455 --> 00:10:53.805
<00:10:49.455>uh, <00:10:49.688>simply <00:10:49.921>technically <00:10:50.155>more <00:10:50.388>or <00:10:50.621>less <00:10:50.855>independent,

172
00:10:53.805 --> 00:10:56.885
<00:10:53.805>but <00:10:54.038>they, <00:10:54.271>you <00:10:54.505>compose <00:10:54.738>the, <00:10:54.971>uh, <00:10:55.204>um,

173
00:10:58.515 --> 00:11:01.445
<00:10:58.515>comp <00:10:58.748>compensate, <00:10:58.981>uh, <00:10:59.215>having <00:10:59.448>the <00:10:59.681>wrong <00:10:59.915>word,

174
00:11:01.825 --> 00:11:04.885
<00:11:01.825>but <00:11:02.058>you <00:11:02.291>create <00:11:02.525>your, <00:11:02.758>your <00:11:02.991>programming <00:11:03.225>world

175
00:11:04.985 --> 00:11:08.005
<00:11:04.985>or <00:11:05.185>your, <00:11:05.385>your <00:11:05.585>program <00:11:05.785>word <00:11:05.985>application <00:11:06.185>word <00:11:06.385>out

176
00:11:08.005 --> 00:11:09.485
<00:11:08.005>of <00:11:08.338>these <00:11:08.671>kind <00:11:09.004>of <00:11:09.337>processes.

177
00:11:13.575 --> 00:11:14.595
<00:11:13.575>The <00:11:14.493>idea

178
00:11:15.935 --> 00:11:19.675
<00:11:15.935>or <00:11:16.135>the <00:11:16.334>ideas <00:11:16.535>in <00:11:16.734>plural <00:11:16.935>for <00:11:17.135>this, <00:11:17.334>um,

179
00:11:20.705 --> 00:11:22.355
<00:11:20.705>concurrency <00:11:21.171>is <00:11:21.638>long <00:11:22.105>known.

180
00:11:23.185 --> 00:11:27.315
<00:11:23.185>It's, <00:11:23.324>uh, <00:11:23.464>the <00:11:23.604>actor <00:11:23.744>model <00:11:23.885>model, <00:11:24.025>I <00:11:24.165>already <00:11:24.305>told <00:11:24.444>about <00:11:24.584>it,

181
00:11:27.655 --> 00:11:31.955
<00:11:27.655>um, <00:11:27.888>which <00:11:28.121>has <00:11:28.355>been <00:11:28.588>invented <00:11:28.821>in <00:11:29.055>1,973.

182
00:11:32.895 --> 00:11:37.355
<00:11:32.895>Um, <00:11:33.128>and <00:11:33.361>one <00:11:33.595>of <00:11:33.828>the <00:11:34.061>most <00:11:34.295>known

183
00:11:37.955 --> 00:11:39.955
<00:11:37.955>languages <00:11:38.305>using <00:11:38.655>the <00:11:39.005>actor <00:11:39.355>model,

184
00:11:40.575 --> 00:11:43.035
<00:11:40.575>or <00:11:40.855>one <00:11:41.135>of <00:11:41.415>the <00:11:41.695>oldest <00:11:41.975>one

185
00:11:43.095 --> 00:11:46.955
<00:11:43.095>and <00:11:43.328>good <00:11:43.561>known <00:11:43.795>is <00:11:44.028>Lan, <00:11:44.261>LAN, <00:11:44.495>OTP.

186
00:11:47.335 --> 00:11:52.275
<00:11:47.335>And, <00:11:47.535>uh, <00:11:47.735>it's <00:11:47.935>a <00:11:48.135>very <00:11:48.335>powerful <00:11:48.535>language <00:11:48.735>mix

187
00:11:52.295 --> 00:11:54.605
<00:11:52.295>of <00:11:52.574>functional <00:11:52.854>language <00:11:53.135>and <00:11:53.415>concurrent <00:11:53.694>language

188
00:11:54.785 --> 00:11:58.405
<00:11:54.785>and, <00:11:54.985>uh, <00:11:55.185>with <00:11:55.385>the <00:11:55.584>syntax <00:11:55.785>of <00:11:55.985>prolo <00:11:56.185>prologue.

189
00:11:58.545 --> 00:12:00.805
<00:11:58.545>And <00:11:58.895>it's, <00:11:59.245>it's <00:11:59.594>very <00:11:59.944>nice.

190
00:12:00.825 --> 00:12:05.725
<00:12:00.825>And <00:12:01.058>here <00:12:01.291>you <00:12:01.525>indeed <00:12:01.758>send <00:12:01.991>messages <00:12:02.225>as

191
00:12:06.475 --> 00:12:10.705
<00:12:06.475>data <00:12:06.708>to <00:12:06.941>one <00:12:07.175>inbox <00:12:07.408>of <00:12:07.641>one <00:12:07.875>process.

192
00:12:11.085 --> 00:12:14.625
<00:12:11.085>And <00:12:11.318>this <00:12:11.551>is <00:12:11.785>then <00:12:12.018>processed <00:12:12.251>there, <00:12:12.485>um,

193
00:12:15.245 --> 00:12:17.505
<00:12:15.245>or <00:12:15.445>the <00:12:15.645>other <00:12:15.845>one <00:12:16.045>that <00:12:16.245>is, <00:12:16.445>uh, <00:12:16.645>the,

194
00:12:17.565 --> 00:12:19.065
<00:12:17.565>or <00:12:17.835>there <00:12:18.105>are <00:12:18.375>the <00:12:18.645>commun, <00:12:18.915>uh,

195
00:12:19.385 --> 00:12:23.465
<00:12:19.385>communicating <00:12:19.735>sequential <00:12:20.085>processes, <00:12:20.435>um, <00:12:20.785>invented

196
00:12:24.105 --> 00:12:27.185
<00:12:24.105>1,978 <00:12:24.571>by <00:12:25.038>Tony <00:12:25.505>Hall.

197
00:12:28.085 --> 00:12:32.745
<00:12:28.085>And, <00:12:28.285>um, <00:12:28.485>this <00:12:28.685>is <00:12:28.885>the <00:12:29.085>idea <00:12:29.285>that <00:12:29.485>that,

198
00:12:32.925 --> 00:12:37.385
<00:12:32.925>uh, <00:12:33.158>builds <00:12:33.391>the <00:12:33.625>foundation <00:12:33.858>of <00:12:34.091>go, <00:12:34.324>um,

199
00:12:38.015 --> 00:12:42.825
<00:12:38.015>that <00:12:38.155>you <00:12:38.295>have <00:12:38.435>your, <00:12:38.574>as <00:12:38.715>I <00:12:38.855>already <00:12:38.995>mentioned, <00:12:39.135>the <00:12:39.275>go <00:12:39.415>routines,

200
00:12:43.645 --> 00:12:47.705
<00:12:43.645>and <00:12:43.800>you <00:12:43.956>have <00:12:44.111>some <00:12:44.267>way <00:12:44.422>of <00:12:44.578>how <00:12:44.733>they <00:12:44.889>are, <00:12:45.045>uh,

201
00:12:48.785 --> 00:12:52.465
<00:12:48.785>communicate <00:12:49.135>and <00:12:49.485>act <00:12:49.834>then <00:12:50.185>sequentially,

202
00:12:53.485 --> 00:12:55.145
<00:12:53.485>um, <00:12:53.765>how <00:12:54.045>they <00:12:54.325>will <00:12:54.605>do <00:12:54.885>it.

203
00:12:55.375 --> 00:12:57.185
<00:12:55.375>That <00:12:55.575>is <00:12:55.775>something <00:12:55.975>I <00:12:56.175>will <00:12:56.375>show <00:12:56.575>you <00:12:56.775>later.

204
00:13:01.105 --> 00:13:05.005
<00:13:01.105>Um, <00:13:01.571>yes, <00:13:02.038>those <00:13:02.505>concurrent

205
00:13:05.875 --> 00:13:08.085
<00:13:05.875>processes <00:13:06.575>communicate, <00:13:07.275>um,

206
00:13:09.635 --> 00:13:10.925
<00:13:09.635>ingo <00:13:10.215>via <00:13:10.795>one.

207
00:13:11.665 --> 00:13:15.445
<00:13:11.665>So <00:13:11.820>you, <00:13:11.976>if <00:13:12.131>you <00:13:12.287>want <00:13:12.442>to <00:13:12.598>communicate <00:13:12.753>one <00:13:12.909>channel, <00:13:13.064>may,

208
00:13:15.625 --> 00:13:18.085
<00:13:15.625>may <00:13:15.905>be <00:13:16.185>enough <00:13:16.465>or <00:13:16.745>more <00:13:17.025>channels.

209
00:13:19.265 --> 00:13:22.925
<00:13:19.265>Um, <00:13:19.965>these <00:13:20.665>processes

210
00:13:23.785 --> 00:13:24.845
<00:13:23.785>are <00:13:24.739>anonymous.

211
00:13:25.305 --> 00:13:29.445
<00:13:25.305>So <00:13:25.505>while <00:13:25.704>you <00:13:25.905>can <00:13:26.104>address <00:13:26.305>channels, <00:13:26.505>you <00:13:26.704>have

212
00:13:29.965 --> 00:13:33.805
<00:13:29.965>variables <00:13:30.140>containing <00:13:30.315>those <00:13:30.490>channels <00:13:30.665>and <00:13:30.840>send <00:13:31.015>data <00:13:31.190>to <00:13:31.365>it

213
00:13:33.825 --> 00:13:38.685
<00:13:33.825>or <00:13:34.000>read <00:13:34.175>data <00:13:34.350>from <00:13:34.525>it, <00:13:34.700>um, <00:13:34.875>the <00:13:35.050>processes <00:13:35.225>themself,

214
00:13:39.735 --> 00:13:41.995
<00:13:39.735>uh, <00:13:39.968>have <00:13:40.201>no, <00:13:40.435>or <00:13:40.668>have <00:13:40.901>no <00:13:41.135>name.

215
00:13:43.425 --> 00:13:47.675
<00:13:43.425>Data <00:13:43.552>is <00:13:43.679>not <00:13:43.806>sent <00:13:43.934>until <00:13:44.061>the <00:13:44.188>receiver <00:13:44.315>is <00:13:44.443>ready <00:13:44.570>to <00:13:44.697>receive <00:13:44.824>it.

216
00:13:47.785 --> 00:13:49.195
<00:13:47.785>This <00:13:48.208>is <00:13:48.631>very <00:13:49.054>important.

217
00:13:49.575 --> 00:13:51.635
<00:13:49.575>You <00:13:50.041>try <00:13:50.508>to <00:13:50.975>send,

218
00:13:52.375 --> 00:13:54.835
<00:13:52.375>but <00:13:52.655>your <00:13:52.935>sending <00:13:53.215>process <00:13:53.495>is <00:13:53.775>blocking

219
00:13:55.645 --> 00:13:57.995
<00:13:55.645>until <00:13:55.845>the <00:13:56.045>receiver <00:13:56.245>says, <00:13:56.444>okay, <00:13:56.645>I <00:13:56.845>got <00:13:57.045>it.

220
00:13:59.255 --> 00:14:03.995
<00:13:59.255>Um, <00:13:59.488>there <00:13:59.721>is <00:13:59.955>one <00:14:00.188>little <00:14:00.421>trick <00:14:00.655>buffering.

221
00:14:04.655 --> 00:14:08.555
<00:14:04.655>Um, <00:14:04.810>so <00:14:04.966>as <00:14:05.121>long <00:14:05.277>as <00:14:05.432>the <00:14:05.588>buffer <00:14:05.743>buffer <00:14:05.899>isn't <00:14:06.055>full,

222
00:14:08.855 --> 00:14:10.315
<00:14:08.855>you <00:14:09.117>can <00:14:09.380>write <00:14:09.643>into <00:14:09.906>the <00:14:10.169>buffer.

223
00:14:11.215 --> 00:14:15.875
<00:14:11.215>Um, <00:14:11.355>but <00:14:11.495>that's <00:14:11.635>not <00:14:11.775>the <00:14:11.915>same <00:14:12.055>as <00:14:12.195>a <00:14:12.335>real <00:14:12.475>elastic <00:14:12.615>queue.

224
00:14:17.175 --> 00:14:21.715
<00:14:17.175>And <00:14:17.330>then <00:14:17.486>the <00:14:17.641>incoming <00:14:17.797>data <00:14:17.952>is <00:14:18.108>processed <00:14:18.263>se <00:14:18.419>really, <00:14:18.574>so,

225
00:14:22.095 --> 00:14:26.715
<00:14:22.095>uh, <00:14:22.375>in <00:14:22.655>the <00:14:22.935>way <00:14:23.215>the <00:14:23.495>language,

226
00:14:26.825 --> 00:14:30.715
<00:14:26.825>whether <00:14:27.000>it's <00:14:27.175>typically <00:14:27.350>done <00:14:27.525>in <00:14:27.700>the <00:14:27.875>language <00:14:28.050>to, <00:14:28.225>um,

227
00:14:30.985 --> 00:14:35.195
<00:14:30.985>process <00:14:31.140>the <00:14:31.296>data <00:14:31.451>is <00:14:31.607>yeah, <00:14:31.762>you <00:14:31.918>we'll <00:14:32.073>find <00:14:32.229>a <00:14:32.385>way.

228
00:14:35.675 --> 00:14:39.755
<00:14:35.675>I <00:14:35.782>will <00:14:35.890>show <00:14:35.998>you <00:14:36.105>a <00:14:36.213>way <00:14:36.321>on, <00:14:36.428>on <00:14:36.536>how <00:14:36.644>it <00:14:36.751>is, <00:14:36.859>uh, <00:14:36.967>processed, <00:14:37.074>uh,

229
00:14:39.755 --> 00:14:43.555
<00:14:39.755>sequentially <00:14:40.035>and <00:14:40.314>not, <00:14:40.595>for <00:14:40.875>example, <00:14:41.155>totally

230
00:14:44.075 --> 00:14:47.755
<00:14:44.075>randomly <00:14:44.541>parallelly <00:14:45.008>somehow <00:14:45.475>else.

231
00:14:49.215 --> 00:14:51.365
<00:14:49.215>Um, <00:14:50.615>yes,

232
00:14:51.625 --> 00:14:56.485
<00:14:51.625>and <00:14:51.741>what <00:14:51.858>we <00:14:51.975>have <00:14:52.091>here <00:14:52.208>is <00:14:52.325>a <00:14:52.441>little <00:14:52.558>example <00:14:52.675>of <00:14:52.791>how <00:14:52.908>such <00:14:53.025>a,

233
00:14:56.675 --> 00:15:01.245
<00:14:56.675>such <00:14:56.802>a <00:14:56.929>world <00:14:57.056>could, <00:14:57.184>could <00:14:57.311>look <00:14:57.438>like, <00:14:57.565>so <00:14:57.693>that <00:14:57.820>we <00:14:57.947>have, <00:14:58.074>um,

234
00:15:01.515 --> 00:15:05.925
<00:15:01.515>different, <00:15:01.748>uh, <00:15:01.981>processes <00:15:02.215>which <00:15:02.448>have, <00:15:02.681>um, <00:15:02.915>there

235
00:15:06.645 --> 00:15:08.325
<00:15:06.645>channels <00:15:07.111>between <00:15:07.578>each <00:15:08.045>other.

236
00:15:08.945 --> 00:15:11.805
<00:15:08.945>And <00:15:09.145>some <00:15:09.345>are <00:15:09.545>only <00:15:09.745>sending <00:15:09.945>here <00:15:10.145>from <00:15:10.345>the

237
00:15:11.805 --> 00:15:13.125
<00:15:11.805>left <00:15:12.102>to <00:15:12.399>the <00:15:12.696>right <00:15:12.992>side.

238
00:15:13.465 --> 00:15:15.725
<00:15:13.465>The <00:15:13.745>the <00:15:14.025>first <00:15:14.305>three <00:15:14.585>ones, <00:15:14.865>uh,

239
00:15:16.625 --> 00:15:20.405
<00:15:16.625>the <00:15:16.765>first <00:15:16.905>two <00:15:17.045>are <00:15:17.185>only <00:15:17.325>sending, <00:15:17.465>the <00:15:17.605>bottom <00:15:17.745>one <00:15:17.885>is <00:15:18.025>sending,

240
00:15:20.505 --> 00:15:21.725
<00:15:20.505>but <00:15:21.054>also <00:15:21.603>receiving.

241
00:15:23.395 --> 00:15:27.085
<00:15:23.395>Some <00:15:23.595>are <00:15:23.795>only <00:15:23.995>communicating <00:15:24.194>with <00:15:24.395>one <00:15:24.595>others, <00:15:24.795>uh,

242
00:15:27.445 --> 00:15:28.765
<00:15:27.445>communicating <00:15:27.841>with <00:15:28.237>many <00:15:28.633>others.

243
00:15:29.225 --> 00:15:33.485
<00:15:29.225>So <00:15:29.458>this, <00:15:29.691>um, <00:15:29.925>how <00:15:30.158>this <00:15:30.391>work, <00:15:30.625>uh,

244
00:15:33.545 --> 00:15:37.005
<00:15:33.545>or <00:15:33.719>how <00:15:33.895>it's <00:15:34.069>working, <00:15:34.245>um, <00:15:34.420>depends <00:15:34.594>on <00:15:34.770>your <00:15:34.944>tasks.

245
00:15:37.235 --> 00:15:41.085
<00:15:37.235>There's <00:15:37.390>lots <00:15:37.546>of <00:15:37.701>freedom <00:15:37.857>in, <00:15:38.012>in <00:15:38.168>the, <00:15:38.323>uh, <00:15:38.479>way <00:15:38.635>on,

246
00:15:41.105 --> 00:15:42.325
<00:15:41.105>on <00:15:41.379>how <00:15:41.654>to <00:15:41.928>program <00:15:42.203>it.

247
00:15:42.585 --> 00:15:47.085
<00:15:42.585>And, <00:15:42.725>uh, <00:15:42.865>yeah, <00:15:43.005>you <00:15:43.145>have <00:15:43.285>to <00:15:43.425>control <00:15:43.565>what <00:15:43.705>you <00:15:43.845>want <00:15:43.985>to

248
00:15:47.655 --> 00:15:48.885
<00:15:47.655>solve <00:15:48.208>for <00:15:48.762>problem.

249
00:15:49.665 --> 00:15:53.445
<00:15:49.665>And <00:15:49.820>the <00:15:49.976>examples <00:15:50.131>I <00:15:50.287>will <00:15:50.442>show <00:15:50.598>you <00:15:50.753>later, <00:15:50.909>um, <00:15:51.064>yeah,

250
00:15:53.695 --> 00:15:55.605
<00:15:53.695>we'll <00:15:53.870>give <00:15:54.045>an <00:15:54.220>example <00:15:54.395>on <00:15:54.570>how <00:15:54.745>to <00:15:54.920>do <00:15:55.095>it.

251
00:15:57.775 --> 00:16:02.625
<00:15:57.775>So <00:15:58.055>these <00:15:58.334>technologies, <00:15:58.615>um, <00:15:58.895>existed <00:15:59.175>already,

252
00:16:02.815 --> 00:16:04.025
<00:16:02.815>yeah, <00:16:03.178>a <00:16:03.541>longer <00:16:03.904>time,

253
00:16:05.445 --> 00:16:08.465
<00:16:05.445>but, <00:16:05.678>um, <00:16:05.911>they <00:16:06.145>need <00:16:06.378>a <00:16:06.611>long <00:16:06.845>time

254
00:16:08.715 --> 00:16:12.065
<00:16:08.715>until <00:16:08.915>they <00:16:09.115>are <00:16:09.315>really <00:16:09.515>on <00:16:09.715>the <00:16:09.915>market, <00:16:10.115>uh,

255
00:16:12.205 --> 00:16:15.225
<00:16:12.205>or <00:16:12.380>until <00:16:12.555>there's <00:16:12.730>a <00:16:12.905>first <00:16:13.080>kind <00:16:13.255>of <00:16:13.430>of <00:16:13.605>release.

256
00:16:15.525 --> 00:16:19.385
<00:16:15.525>And <00:16:15.665>then <00:16:15.805>until, <00:16:15.944>uh, <00:16:16.084>they <00:16:16.225>have <00:16:16.365>their <00:16:16.505>position <00:16:16.645>on <00:16:16.785>the <00:16:16.925>market.

257
00:16:20.045 --> 00:16:23.675
<00:16:20.045>Um, <00:16:20.511>early <00:16:20.978>has <00:16:21.444>been

258
00:16:24.665 --> 00:16:27.235
<00:16:24.665>somewhere <00:16:25.015>in <00:16:25.365>the <00:16:25.714>eighties, <00:16:26.064>so

259
00:16:28.135 --> 00:16:32.195
<00:16:28.135>it <00:16:28.275>needed <00:16:28.415>the <00:16:28.555>actor <00:16:28.694>model <00:16:28.835>needed <00:16:28.975>10, <00:16:29.115>10 <00:16:29.255>to <00:16:29.395>15 <00:16:29.535>years.

260
00:16:32.455 --> 00:16:33.635
<00:16:32.455>I'm <00:16:32.809>not <00:16:33.163>totally <00:16:33.517>sure.

261
00:16:34.535 --> 00:16:38.715
<00:16:34.535>Um, <00:16:34.768>and, <00:16:35.001>uh, <00:16:35.235>CSP, <00:16:35.468>there <00:16:35.701>are <00:16:35.935>some

262
00:16:39.235 --> 00:16:43.875
<00:16:39.235>languages <00:16:39.435>which, <00:16:39.635>uh, <00:16:39.835>used <00:16:40.035>parts <00:16:40.235>of <00:16:40.435>the <00:16:40.635>CSP

263
00:16:43.975 --> 00:16:45.155
<00:16:43.975>before <00:16:45.037>already.

264
00:16:46.835 --> 00:16:51.035
<00:16:46.835>Ada, <00:16:47.068>no, <00:16:47.301>not <00:16:47.535>Ada, <00:16:47.768>ADA <00:16:48.001>had <00:16:48.235>concurrency.

265
00:16:51.505 --> 00:16:52.715
<00:16:51.505>Okay, <00:16:51.777>that's <00:16:52.049>a <00:16:52.321>different <00:16:52.594>topic,

266
00:16:52.855 --> 00:16:54.675
<00:16:52.855>but <00:16:53.135>there <00:16:53.415>are <00:16:53.695>other <00:16:53.975>languages <00:16:54.255>too.

267
00:16:55.055 --> 00:16:58.475
<00:16:55.055>Uh, <00:16:55.194>but <00:16:55.334>until <00:16:55.474>it's, <00:16:55.614>it's <00:16:55.755>really <00:16:55.895>a <00:16:56.035>technology <00:16:56.175>that <00:16:56.314>is <00:16:56.454>used,

268
00:16:58.775 --> 00:17:00.355
<00:16:58.775>uh, <00:16:59.125>by, <00:16:59.475>by <00:16:59.824>many <00:17:00.175>people

269
00:17:00.575 --> 00:17:02.875
<00:17:00.575>and <00:17:00.808>access, <00:17:01.041>uh, <00:17:01.275>accepted <00:17:01.508>by <00:17:01.741>many <00:17:01.975>people

270
00:17:03.345 --> 00:17:04.675
<00:17:03.345>that <00:17:03.644>needs <00:17:03.943>their <00:17:04.242>time <00:17:04.541>and,

271
00:17:04.775 --> 00:17:08.435
<00:17:04.775>and, <00:17:05.055>uh, <00:17:05.335>so, <00:17:05.615>uh, <00:17:05.895>also <00:17:06.175>go

272
00:17:08.845 --> 00:17:12.035
<00:17:08.845>until <00:17:09.078>go <00:17:09.311>existed, <00:17:09.545>um, <00:17:09.778>on <00:17:10.011>the <00:17:10.245>market

273
00:17:12.255 --> 00:17:15.675
<00:17:12.255>and <00:17:12.488>has <00:17:12.721>been <00:17:12.955>established, <00:17:13.188>needed <00:17:13.421>some <00:17:13.655>time.

274
00:17:17.815 --> 00:17:22.795
<00:17:17.815>Um, <00:17:17.955>yeah, <00:17:18.095>some <00:17:18.235>examples <00:17:18.375>on <00:17:18.515>how <00:17:18.655>to <00:17:18.795>use, <00:17:18.935>um, <00:17:19.075>kind <00:17:19.215>of

275
00:17:23.765 --> 00:17:26.995
<00:17:23.765>concurrent <00:17:23.998>patterns, <00:17:24.231>uh, <00:17:24.465>not <00:17:24.698>yet <00:17:24.931>in <00:17:25.165>go,

276
00:17:27.175 --> 00:17:30.995
<00:17:27.175>but <00:17:27.330>already <00:17:27.486>on <00:17:27.641>what <00:17:27.797>to <00:17:27.952>solve <00:17:28.108>with <00:17:28.263>it <00:17:28.419>is, <00:17:28.575>um,

277
00:17:32.295 --> 00:17:35.155
<00:17:32.295>for <00:17:32.495>example, <00:17:32.695>that <00:17:32.895>you <00:17:33.095>have <00:17:33.295>a, <00:17:33.495>a <00:17:33.695>process

278
00:17:35.985 --> 00:17:38.155
<00:17:35.985>that <00:17:36.451>provides <00:17:36.918>a <00:17:37.385>service

279
00:17:39.845 --> 00:17:44.555
<00:17:39.845>where <00:17:40.000>it <00:17:40.156>internally <00:17:40.311>has <00:17:40.467>a <00:17:40.622>kind <00:17:40.778>of <00:17:40.933>state <00:17:41.089>to <00:17:41.245>different

280
00:17:45.185 --> 00:17:49.035
<00:17:45.185>processes <00:17:45.360>in <00:17:45.534>your <00:17:45.710>application, <00:17:45.885>which <00:17:46.060>are <00:17:46.235>the <00:17:46.409>clients <00:17:46.585>then.

281
00:17:49.345 --> 00:17:53.965
<00:17:49.345>So, <00:17:49.520>um, <00:17:49.695>you <00:17:49.870>have <00:17:50.045>to <00:17:50.220>ensure <00:17:50.395>that <00:17:50.570>all <00:17:50.745>these,

282
00:17:54.805 --> 00:17:58.445
<00:17:54.805>I <00:17:55.085>call <00:17:55.365>them <00:17:55.645>client, <00:17:55.925>um, <00:17:56.205>needs

283
00:17:58.625 --> 00:18:03.605
<00:17:58.625>or <00:17:58.780>yeah, <00:17:58.936>have <00:17:59.091>to <00:17:59.247>have <00:17:59.402>a <00:17:59.558>safe <00:17:59.713>access <00:17:59.869>to <00:18:00.025>this

284
00:18:04.115 --> 00:18:07.965
<00:18:04.115>service <00:18:04.255>data, <00:18:04.395>have <00:18:04.535>to <00:18:04.675>have <00:18:04.815>a <00:18:04.955>safe <00:18:05.095>access <00:18:05.235>to, <00:18:05.375>to <00:18:05.515>changes.

285
00:18:08.825 --> 00:18:13.445
<00:18:08.825>And <00:18:08.980>so <00:18:09.136>you <00:18:09.291>have <00:18:09.447>this <00:18:09.602>service <00:18:09.758>provider <00:18:09.913>organizing <00:18:10.069>all <00:18:10.225>this

286
00:18:13.615 --> 00:18:18.045
<00:18:13.615>state <00:18:13.848>and <00:18:14.081>the <00:18:14.315>sequential <00:18:14.548>processing <00:18:14.781>while <00:18:15.015>the,

287
00:18:18.585 --> 00:18:22.165
<00:18:18.585>the <00:18:18.785>clients, <00:18:18.985>yeah, <00:18:19.185>there's <00:18:19.385>only <00:18:19.585>one <00:18:19.785>active <00:18:19.985>sending

288
00:18:22.425 --> 00:18:25.005
<00:18:22.425>or <00:18:22.774>active <00:18:23.125>gathering <00:18:23.475>some <00:18:23.825>data

289
00:18:25.185 --> 00:18:28.125
<00:18:25.185>or <00:18:25.465>active, <00:18:25.745>uh, <00:18:26.024>updating <00:18:26.304>some <00:18:26.585>data.

290
00:18:28.905 --> 00:18:33.605
<00:18:28.905>And <00:18:29.032>while <00:18:29.159>it <00:18:29.286>is <00:18:29.414>doing <00:18:29.541>those, <00:18:29.668>so <00:18:29.795>the <00:18:29.923>other <00:18:30.050>ones <00:18:30.177>can <00:18:30.305>try

291
00:18:33.625 --> 00:18:37.725
<00:18:33.625>to <00:18:33.752>do <00:18:33.879>the, <00:18:34.006>uh, <00:18:34.134>can <00:18:34.261>try <00:18:34.388>do <00:18:34.515>the <00:18:34.643>same <00:18:34.770>in <00:18:34.897>their <00:18:35.025>concurrent

292
00:18:37.735 --> 00:18:41.205
<00:18:37.735>world, <00:18:37.909>but <00:18:38.084>they <00:18:38.260>have <00:18:38.435>to <00:18:38.610>wait <00:18:38.784>in <00:18:38.959>this <00:18:39.135>moment.

293
00:18:41.435 --> 00:18:44.645
<00:18:41.435>They, <00:18:41.715>they <00:18:41.995>can't <00:18:42.274>manipulate <00:18:42.554>the <00:18:42.835>data

294
00:18:45.255 --> 00:18:48.365
<00:18:45.255>while <00:18:45.410>it <00:18:45.566>is <00:18:45.721>read <00:18:45.877>from <00:18:46.032>the, <00:18:46.188>from <00:18:46.343>the <00:18:46.499>other <00:18:46.655>client,

295
00:18:48.945 --> 00:18:53.845
<00:18:48.945>or <00:18:49.085>they <00:18:49.225>can't <00:18:49.365>read <00:18:49.504>it <00:18:49.645>while <00:18:49.784>the <00:18:49.925>update <00:18:50.064>process <00:18:50.205>isn't, <00:18:50.345>uh,

296
00:18:53.865 --> 00:18:57.205
<00:18:53.865>or <00:18:54.065>update <00:18:54.265>activity <00:18:54.465>isn't, <00:18:54.665>uh, <00:18:54.865>done <00:18:55.065>to <00:18:55.265>end.

297
00:18:57.425 --> 00:19:01.685
<00:18:57.425>So, <00:18:57.565>um, <00:18:57.705>this <00:18:57.845>is <00:18:57.985>mostly <00:18:58.125>like <00:18:58.264>a <00:18:58.405>kind <00:18:58.544>of <00:18:58.685>service <00:18:58.825>provider,

298
00:19:01.865 --> 00:19:04.485
<00:19:01.865>and <00:19:02.098>the <00:19:02.331>service <00:19:02.565>provider <00:19:02.798>itself <00:19:03.031>has <00:19:03.265>its

299
00:19:05.055 --> 00:19:06.645
<00:19:05.055>state <00:19:05.405>at <00:19:05.755>its <00:19:06.105>business <00:19:06.455>logic,

300
00:19:09.035 --> 00:19:11.215
<00:19:09.035>or <00:19:09.385>you <00:19:09.735>have <00:19:10.085>different <00:19:10.435>resources.

301
00:19:11.515 --> 00:19:15.415
<00:19:11.515>And, <00:19:11.655>uh, <00:19:11.795>these <00:19:11.935>resources <00:19:12.075>have <00:19:12.215>to, <00:19:12.355>to <00:19:12.495>be <00:19:12.635>organized <00:19:12.775>on, <00:19:12.915>on,

302
00:19:16.035 --> 00:19:19.455
<00:19:16.035>uh, <00:19:16.162>when <00:19:16.289>to <00:19:16.416>read <00:19:16.544>from <00:19:16.671>a <00:19:16.798>resource <00:19:16.925>or <00:19:17.053>write <00:19:17.180>to <00:19:17.307>a <00:19:17.435>resource

303
00:19:19.555 --> 00:19:21.095
<00:19:19.555>or <00:19:20.017>manipulate <00:19:20.479>a <00:19:20.941>resource.

304
00:19:21.755 --> 00:19:26.335
<00:19:21.755>Um, <00:19:21.930>and <00:19:22.105>you <00:19:22.280>don't <00:19:22.455>want <00:19:22.630>your <00:19:22.805>different <00:19:22.980>concurrent <00:19:23.155>running

305
00:19:26.435 --> 00:19:27.575
<00:19:26.435>client <00:19:27.461>processes.

306
00:19:28.155 --> 00:19:31.295
<00:19:28.155>And <00:19:28.330>here <00:19:28.504>as <00:19:28.680>client <00:19:28.855>processes, <00:19:29.030>which <00:19:29.205>are <00:19:29.379>running <00:19:29.555>parallelly,

307
00:19:31.795 --> 00:19:36.375
<00:19:31.795>for <00:19:31.935>example, <00:19:32.075>think <00:19:32.215>about <00:19:32.355>a <00:19:32.495>web <00:19:32.635>server <00:19:32.775>where <00:19:32.915>you <00:19:33.055>have, <00:19:33.195>uh,

308
00:19:36.955 --> 00:19:40.895
<00:19:36.955>the <00:19:37.188>front <00:19:37.421>end, <00:19:37.655>uh, <00:19:37.888>listener, <00:19:38.121>uh, <00:19:38.355>receiving

309
00:19:42.355 --> 00:19:44.795
<00:19:42.355>hundreds <00:19:42.635>of, <00:19:42.915>of <00:19:43.195>requests <00:19:43.475>per <00:19:43.755>second,

310
00:19:45.735 --> 00:19:47.875
<00:19:45.735>and <00:19:46.014>you <00:19:46.294>start <00:19:46.574>your <00:19:46.854>handle <00:19:47.135>loss,

311
00:19:48.655 --> 00:19:52.755
<00:19:48.655>and <00:19:48.855>they <00:19:49.055>are <00:19:49.254>all <00:19:49.455>working <00:19:49.655>concurrently <00:19:49.855>and <00:19:50.055>overlapping,

312
00:19:54.015 --> 00:19:56.115
<00:19:54.015>but <00:19:54.248>they <00:19:54.481>all <00:19:54.715>want <00:19:54.948>to <00:19:55.181>access <00:19:55.415>the

313
00:19:56.115 --> 00:19:57.635
<00:19:56.115>same <00:19:56.457>resources <00:19:56.799>in <00:19:57.141>the <00:19:57.483>backend.

314
00:19:57.935 --> 00:20:01.915
<00:19:57.935>So <00:19:58.051>you <00:19:58.168>have <00:19:58.284>to <00:19:58.401>need, <00:19:58.518>or <00:19:58.635>you <00:19:58.751>need <00:19:58.868>some <00:19:58.985>kind <00:19:59.101>of, <00:19:59.218>of <00:19:59.335>manager

315
00:20:02.255 --> 00:20:05.795
<00:20:02.255>for <00:20:02.430>these <00:20:02.605>resources <00:20:02.780>so <00:20:02.955>that <00:20:03.130>not <00:20:03.305>all, <00:20:03.480>uh, <00:20:03.655>uh,

316
00:20:06.145 --> 00:20:10.035
<00:20:06.145>have <00:20:06.345>this <00:20:06.545>trouble <00:20:06.745>of <00:20:06.945>synchronized <00:20:07.145>between <00:20:07.345>each <00:20:07.545>other

317
00:20:10.965 --> 00:20:14.235
<00:20:10.965>while <00:20:11.245>accessing, <00:20:11.524>uh, <00:20:11.804>the <00:20:12.084>different <00:20:12.365>resources

318
00:20:14.655 --> 00:20:17.515
<00:20:14.655>and <00:20:14.888>getting <00:20:15.121>some <00:20:15.355>kind <00:20:15.588>of <00:20:15.821>inconsistent <00:20:16.055>state.

319
00:20:17.815 --> 00:20:21.035
<00:20:17.815>So <00:20:17.970>this <00:20:18.126>is <00:20:18.281>something <00:20:18.437>you <00:20:18.592>can <00:20:18.748>create <00:20:18.903>with <00:20:19.059>this <00:20:19.215>model.

320
00:20:22.935 --> 00:20:27.755
<00:20:22.935>Um, <00:20:23.090>all <00:20:23.246>these <00:20:23.401>parallel <00:20:23.557>requests, <00:20:23.712>when <00:20:23.868>they <00:20:24.023>are <00:20:24.179>too <00:20:24.335>much,

321
00:20:28.105 --> 00:20:32.435
<00:20:28.105>that <00:20:28.245>is, <00:20:28.385>once <00:20:28.525>again <00:20:28.665>here, <00:20:28.805>the <00:20:28.945>clients <00:20:29.085>are, <00:20:29.225>uh, <00:20:29.365>red <00:20:29.505>showing

322
00:20:32.705 --> 00:20:37.475
<00:20:32.705>that <00:20:32.905>they <00:20:33.105>represent <00:20:33.304>a <00:20:33.504>kind <00:20:33.705>of <00:20:33.905>external <00:20:34.105>request.

323
00:20:38.105 --> 00:20:41.195
<00:20:38.105>Like, <00:20:38.338>once <00:20:38.571>again, <00:20:38.805>the <00:20:39.038>web <00:20:39.271>servers, <00:20:39.505>uh,

324
00:20:42.165 --> 00:20:46.715
<00:20:42.165>often <00:20:42.305>take <00:20:42.445>an <00:20:42.585>example, <00:20:42.725>um, <00:20:42.865>but <00:20:43.004>it <00:20:43.145>has <00:20:43.284>to <00:20:43.425>be <00:20:43.565>handled.

325
00:20:47.345 --> 00:20:51.525
<00:20:47.345>So, <00:20:47.545>uh, <00:20:47.745>you <00:20:47.945>simply <00:20:48.145>get <00:20:48.345>these <00:20:48.545>requests, <00:20:48.745>um,

326
00:20:51.745 --> 00:20:53.365
<00:20:51.745>the <00:20:52.094>master <00:20:52.445>is <00:20:52.794>organizing <00:20:53.145>them,

327
00:20:54.025 --> 00:20:57.045
<00:20:54.025>and <00:20:54.180>then <00:20:54.336>tell <00:20:54.491>the <00:20:54.647>kind <00:20:54.802>of <00:20:54.958>worker <00:20:55.113>to, <00:20:55.269>to, <00:20:55.425>uh,

328
00:20:58.395 --> 00:20:59.965
<00:20:58.395>perform <00:20:59.095>these <00:20:59.795>requests.

329
00:21:00.665 --> 00:21:04.805
<00:21:00.665>So <00:21:00.898>you <00:21:01.131>use <00:21:01.365>your, <00:21:01.598>um, <00:21:01.831>available, <00:21:02.065>um,

330
00:21:05.675 --> 00:21:08.965
<00:21:05.675>performance, <00:21:05.955>performance, <00:21:06.235>uh, <00:21:06.514>available <00:21:06.794>computing <00:21:07.075>power,

331
00:21:09.705 --> 00:21:13.205
<00:21:09.705>and <00:21:10.054>then, <00:21:10.405>um, <00:21:10.754>uh, <00:21:11.105>these

332
00:21:13.965 --> 00:21:15.765
<00:21:13.965>requests <00:21:14.314>can <00:21:14.665>be <00:21:15.014>handled <00:21:15.365>overlapping.

333
00:21:16.425 --> 00:21:18.885
<00:21:16.425>And <00:21:16.774>also <00:21:17.125>the <00:21:17.475>worker <00:21:17.825>itself

334
00:21:19.635 --> 00:21:22.685
<00:21:19.635>gets <00:21:19.868>all <00:21:20.101>needed <00:21:20.335>information <00:21:20.568>to <00:21:20.801>then <00:21:21.035>send

335
00:21:23.425 --> 00:21:28.165
<00:21:23.425>the <00:21:23.565>reply <00:21:23.705>direct <00:21:23.845>to <00:21:23.985>the <00:21:24.125>client, <00:21:24.264>for <00:21:24.405>example, <00:21:24.544>so <00:21:24.685>that, <00:21:24.825>uh,

336
00:21:29.185 --> 00:21:33.205
<00:21:29.185>the <00:21:29.312>master <00:21:29.439>in <00:21:29.566>the <00:21:29.694>middle <00:21:29.821>doesn't, <00:21:29.948>has <00:21:30.075>to, <00:21:30.203>to <00:21:30.330>handle <00:21:30.457>it, <00:21:30.585>um,

337
00:21:33.715 --> 00:21:35.085
<00:21:33.715>doesn't <00:21:33.961>have <00:21:34.208>to <00:21:34.454>care <00:21:34.701>for <00:21:34.948>it.

338
00:21:37.155 --> 00:21:41.125
<00:21:37.155>Yeah, <00:21:37.355>we <00:21:37.555>have <00:21:37.754>kind <00:21:37.955>of <00:21:38.155>event <00:21:38.355>management <00:21:38.555>system

339
00:21:41.705 --> 00:21:42.805
<00:21:41.705>is <00:21:42.200>also <00:21:42.695>possible.

340
00:21:43.305 --> 00:21:45.805
<00:21:43.305>So <00:21:43.505>we <00:21:43.705>have <00:21:43.905>different <00:21:44.105>kind <00:21:44.305>of <00:21:44.505>emitters <00:21:44.705>of,

341
00:21:45.865 --> 00:21:47.005
<00:21:45.865>of <00:21:46.378>different <00:21:46.891>events.

342
00:21:47.905 --> 00:21:51.645
<00:21:47.905>In <00:21:48.138>the <00:21:48.371>middle, <00:21:48.605>there's <00:21:48.838>an <00:21:49.071>event <00:21:49.305>manager

343
00:21:52.505 --> 00:21:57.325
<00:21:52.505>who <00:21:52.705>handles <00:21:52.905>subscriptions <00:21:53.105>on <00:21:53.305>which <00:21:53.505>subscriber <00:21:53.705>is <00:21:53.905>interested

344
00:21:57.505 --> 00:21:59.085
<00:21:57.505>in <00:21:57.855>which <00:21:58.205>kind <00:21:58.555>of <00:21:58.905>event.

345
00:22:00.185 --> 00:22:03.245
<00:22:00.185>And <00:22:00.340>then <00:22:00.496>in <00:22:00.651>the, <00:22:00.807>uh, <00:22:00.962>here <00:22:01.118>on <00:22:01.273>the <00:22:01.429>right <00:22:01.585>side,

346
00:22:03.245 --> 00:22:06.325
<00:22:03.245>you <00:22:03.524>have <00:22:03.804>your <00:22:04.084>different <00:22:04.364>subscribers, <00:22:04.645>uh,

347
00:22:06.455 --> 00:22:11.165
<00:22:06.455>which <00:22:06.610>are <00:22:06.766>then <00:22:06.921>getting <00:22:07.077>these, <00:22:07.232>um, <00:22:07.388>events <00:22:07.543>it <00:22:07.699>has <00:22:07.855>received

348
00:22:11.305 --> 00:22:16.085
<00:22:11.305>or <00:22:11.460>they <00:22:11.616>are <00:22:11.771>receiving <00:22:11.927>by <00:22:12.082>the, <00:22:12.238>um, <00:22:12.393>uh, <00:22:12.549>event <00:22:12.705>manager.

349
00:22:16.345 --> 00:22:21.325
<00:22:16.345>And <00:22:16.520>those <00:22:16.695>can <00:22:16.870>be, <00:22:17.045>yeah, <00:22:17.220>dependent <00:22:17.395>on, <00:22:17.570>on <00:22:17.745>any,

350
00:22:21.905 --> 00:22:25.085
<00:22:21.905>any, <00:22:22.254>um, <00:22:22.605>uh, <00:22:22.955>subscription <00:22:23.305>pattern.

351
00:22:25.745 --> 00:22:27.765
<00:22:25.745>Um, <00:22:26.094>it <00:22:26.445>could <00:22:26.794>be <00:22:27.145>that

352
00:22:28.565 --> 00:22:30.685
<00:22:28.565>multiple <00:22:28.845>subscribers <00:22:29.125>get <00:22:29.405>the <00:22:29.685>same <00:22:29.965>events

353
00:22:30.945 --> 00:22:34.325
<00:22:30.945>or <00:22:31.120>that <00:22:31.294>same <00:22:31.470>event <00:22:31.645>is <00:22:31.820>sent <00:22:31.995>to <00:22:32.169>all <00:22:32.345>subscribers,

354
00:22:34.505 --> 00:22:37.045
<00:22:34.505>or <00:22:34.705>that, <00:22:34.905>uh, <00:22:35.105>individual <00:22:35.305>events <00:22:35.505>are <00:22:35.705>only <00:22:35.905>sent

355
00:22:37.045 --> 00:22:38.085
<00:22:37.045>to <00:22:37.513>one <00:22:37.981>subscriber.

356
00:22:38.915 --> 00:22:41.525
<00:22:38.915>This <00:22:39.070>depends <00:22:39.226>then <00:22:39.381>on <00:22:39.537>the <00:22:39.692>power <00:22:39.848>of <00:22:40.003>the <00:22:40.159>event <00:22:40.315>manager

357
00:22:41.865 --> 00:22:44.965
<00:22:41.865>and, <00:22:42.098>uh, <00:22:42.331>your <00:22:42.565>internal <00:22:42.798>needs <00:22:43.031>of <00:22:43.265>logic.

358
00:22:48.065 --> 00:22:51.245
<00:22:48.065>Um, <00:22:48.345>all <00:22:48.625>also <00:22:48.905>need <00:22:49.185>is, <00:22:49.465>uh,

359
00:22:51.315 --> 00:22:53.085
<00:22:51.315>processes <00:22:51.665>can <00:22:52.015>monitor <00:22:52.365>each <00:22:52.715>other.

360
00:22:53.465 --> 00:22:57.885
<00:22:53.465>So, <00:22:53.665>um, <00:22:53.865>there's <00:22:54.064>a <00:22:54.264>supervisor <00:22:54.465>in <00:22:54.665>the <00:22:54.865>middle,

361
00:22:58.825 --> 00:23:02.045
<00:22:58.825>uh, <00:22:59.000>which <00:22:59.175>is <00:22:59.350>told <00:22:59.525>to <00:22:59.700>start <00:22:59.875>a <00:23:00.050>process <00:23:00.225>here.

362
00:23:02.195 --> 00:23:06.085
<00:23:02.195>It's <00:23:02.350>for <00:23:02.506>example, <00:23:02.661>the <00:23:02.817>process <00:23:02.972>A, <00:23:03.128>it <00:23:03.283>starts <00:23:03.439>process <00:23:03.595>A,

363
00:23:06.425 --> 00:23:09.165
<00:23:06.425>and <00:23:06.658>then <00:23:06.891>it <00:23:07.125>monitors <00:23:07.358>the <00:23:07.591>process <00:23:07.825>A.

364
00:23:10.265 --> 00:23:14.965
<00:23:10.265>And <00:23:10.405>in <00:23:10.545>this <00:23:10.685>example <00:23:10.825>here, <00:23:10.965>it, <00:23:11.105>for <00:23:11.245>example, <00:23:11.385>is <00:23:11.525>also <00:23:11.665>told

365
00:23:15.025 --> 00:23:18.525
<00:23:15.025>to <00:23:15.180>start <00:23:15.336>the <00:23:15.491>process <00:23:15.647>B, <00:23:15.802>it <00:23:15.958>wonderfully <00:23:16.113>start <00:23:16.269>the <00:23:16.425>process.

366
00:23:18.805 --> 00:23:20.605
<00:23:18.805>B, <00:23:19.085>it <00:23:19.365>monitors <00:23:19.645>the <00:23:19.925>process <00:23:20.205>B,

367
00:23:21.425 --> 00:23:25.005
<00:23:21.425>but <00:23:21.658>then <00:23:21.891>for <00:23:22.125>example, <00:23:22.358>by <00:23:22.591>any <00:23:22.825>internal

368
00:23:25.525 --> 00:23:29.685
<00:23:25.525>business <00:23:25.725>logic <00:23:25.925>error, <00:23:26.125>this <00:23:26.325>process <00:23:26.525>b <00:23:26.725>uh, <00:23:26.925>dies.

369
00:23:31.345 --> 00:23:34.365
<00:23:31.345>And <00:23:31.695>then <00:23:32.045>the, <00:23:32.395>the <00:23:32.745>monitor.

370
00:23:35.065 --> 00:23:39.245
<00:23:35.065>So <00:23:35.240>supervisor <00:23:35.415>by <00:23:35.590>monitoring <00:23:35.765>it <00:23:35.940>can <00:23:36.115>react <00:23:36.290>on <00:23:36.465>it

371
00:23:39.625 --> 00:23:42.205
<00:23:39.625>and <00:23:39.825>say, <00:23:40.025>okay, <00:23:40.225>then <00:23:40.425>I <00:23:40.625>started <00:23:40.825>be, <00:23:41.025>uh,

372
00:23:46.065 --> 00:23:50.405
<00:23:46.065>uh, <00:23:46.192>uh, <00:23:46.319>B <00:23:46.446>dash, <00:23:46.574>no, <00:23:46.701>dash <00:23:46.828>is <00:23:46.955>the <00:23:47.083>wrong <00:23:47.210>wording <00:23:47.337>for <00:23:47.465>it.

373
00:23:51.245 --> 00:23:53.765
<00:23:51.245>B, <00:23:51.524>single <00:23:51.804>quote. <00:23:52.084>And, <00:23:52.364>uh, <00:23:52.645>uh,

374
00:23:54.005 --> 00:23:56.365
<00:23:54.005>monitors <00:23:54.285>this <00:23:54.565>B <00:23:54.845>single <00:23:55.125>quote <00:23:55.405>here.

375
00:23:57.145 --> 00:24:00.565
<00:23:57.145>So, <00:23:57.345>um, <00:23:57.545>it's <00:23:57.745>that, <00:23:57.945>uh, <00:23:58.145>you <00:23:58.345>have, <00:23:58.545>uh,

376
00:24:02.035 --> 00:24:04.085
<00:24:02.035>kind <00:24:02.385>of <00:24:02.735>system <00:24:03.085>that <00:24:03.435>where

377
00:24:05.265 --> 00:24:07.205
<00:24:05.265>you <00:24:05.615>are <00:24:05.965>more <00:24:06.315>fault <00:24:06.665>tolerant

378
00:24:07.665 --> 00:24:11.085
<00:24:07.665>and <00:24:07.820>can <00:24:07.976>react <00:24:08.131>on, <00:24:08.287>on <00:24:08.442>troubles <00:24:08.598>of <00:24:08.753>your <00:24:08.909>internal <00:24:09.065>system.

379
00:24:12.685 --> 00:24:17.065
<00:24:12.685>If <00:24:12.825>it's, <00:24:12.965>if <00:24:13.105>those <00:24:13.245>are <00:24:13.385>hable <00:24:13.524>errors, <00:24:13.665>if <00:24:13.804>those, <00:24:13.945>for <00:24:14.085>example,

380
00:24:17.085 --> 00:24:18.305
<00:24:17.085>are <00:24:17.451>non <00:24:17.817>hable <00:24:18.183>errors,

381
00:24:18.765 --> 00:24:20.985
<00:24:18.765>you <00:24:18.998>can <00:24:19.231>also <00:24:19.465>do <00:24:19.698>something <00:24:19.931>totally <00:24:20.165>different.

382
00:24:23.805 --> 00:24:27.465
<00:24:23.805>So, <00:24:24.005>and, <00:24:24.205>um, <00:24:24.405>you <00:24:24.605>also <00:24:24.805>can <00:24:25.005>create, <00:24:25.205>uh,

383
00:24:27.815 --> 00:24:31.785
<00:24:27.815>extractor <00:24:28.095>transformation <00:24:28.375>loader, <00:24:28.655>uh, <00:24:28.935>uh, <00:24:29.215>architectures

384
00:24:32.195 --> 00:24:37.025
<00:24:32.195>where, <00:24:32.335>uh, <00:24:32.475>your <00:24:32.615>extractor <00:24:32.754>gets <00:24:32.895>data <00:24:33.034>from, <00:24:33.175>from <00:24:33.314>raw <00:24:33.455>data <00:24:33.595>from

385
00:24:37.705 --> 00:24:40.945
<00:24:37.705>multiple <00:24:37.985>centers, <00:24:38.264>uh, <00:24:38.544>has <00:24:38.824>a <00:24:39.105>powerful,

386
00:24:41.325 --> 00:24:43.545
<00:24:41.325>and <00:24:41.791>here <00:24:42.258>really <00:24:42.725>parallel

387
00:24:44.485 --> 00:24:49.305
<00:24:44.485>or <00:24:44.592>based <00:24:44.700>on <00:24:44.808>the <00:24:44.915>data <00:24:45.023>it <00:24:45.131>gets, <00:24:45.238>um, <00:24:45.346>uh, <00:24:45.454>could <00:24:45.561>also <00:24:45.669>be <00:24:45.777>con <00:24:45.885>uh,

388
00:24:49.305 --> 00:24:53.305
<00:24:49.305>concurrent <00:24:49.538>transformational, <00:24:49.771>uh, <00:24:50.005>group <00:24:50.238>of <00:24:50.471>sent <00:24:50.705>TERs,

389
00:24:54.125 --> 00:24:56.385
<00:24:54.125>and <00:24:54.300>all <00:24:54.475>in <00:24:54.650>the <00:24:54.825>end, <00:24:55.000>get <00:24:55.175>to <00:24:55.350>the <00:24:55.525>loader.

390
00:24:56.485 --> 00:25:00.105
<00:24:56.485>And <00:24:56.625>the <00:24:56.764>loader <00:24:56.905>then <00:24:57.044>writes <00:24:57.185>all <00:24:57.324>the <00:24:57.465>data <00:24:57.604>to <00:24:57.745>the, <00:24:57.885>um,

391
00:25:00.825 --> 00:25:05.185
<00:25:00.825>receivers, <00:25:01.025>which <00:25:01.225>could <00:25:01.425>be <00:25:01.625>one <00:25:01.825>receiver, <00:25:02.025>for <00:25:02.225>example,

392
00:25:05.345 --> 00:25:08.705
<00:25:05.345>a <00:25:05.578>database, <00:25:05.811>but <00:25:06.045>also <00:25:06.278>different <00:25:06.511>receivers, <00:25:06.745>um,

393
00:25:08.915 --> 00:25:12.145
<00:25:08.915>which <00:25:09.195>are <00:25:09.475>responsible <00:25:09.754>to <00:25:10.034>handle <00:25:10.315>parts

394
00:25:12.245 --> 00:25:13.625
<00:25:12.245>of <00:25:12.658>the <00:25:13.072>transformed <00:25:13.487>data.

395
00:25:14.725 --> 00:25:18.665
<00:25:14.725>So <00:25:15.004>it's, <00:25:15.284>it's, <00:25:15.564>uh, <00:25:15.844>yeah, <00:25:16.125>possible

396
00:25:18.665 --> 00:25:21.105
<00:25:18.665>to <00:25:19.014>create <00:25:19.365>very <00:25:19.715>powerful <00:25:20.065>systems.

397
00:25:23.965 --> 00:25:28.345
<00:25:23.965>So <00:25:24.314>let's <00:25:24.665>get <00:25:25.014>to <00:25:25.365>go.

398
00:25:29.485 --> 00:25:31.265
<00:25:29.485>Um, <00:25:29.764>I <00:25:30.044>have <00:25:30.324>to <00:25:30.604>see <00:25:30.885>here.

399
00:25:31.855 --> 00:25:35.425
<00:25:31.855>Okay, <00:25:32.088>um, <00:25:32.321>this <00:25:32.555>is <00:25:32.788>our <00:25:33.021>little <00:25:33.255>gofer.

400
00:25:35.995 --> 00:25:40.825
<00:25:35.995>Gofer <00:25:36.169>is, <00:25:36.344>uh, <00:25:36.520>the, <00:25:36.695>the <00:25:36.870>mascot <00:25:37.044>of, <00:25:37.219>uh, <00:25:37.395>uh,

401
00:25:41.125 --> 00:25:45.945
<00:25:41.125>go <00:25:41.265>and <00:25:41.405>is, <00:25:41.545>um, <00:25:41.685>designed <00:25:41.825>by <00:25:41.965>the <00:25:42.105>wife <00:25:42.245>of <00:25:42.385>Rob <00:25:42.525>Pike.

402
00:25:46.165 --> 00:25:50.865
<00:25:46.165>Uh, <00:25:46.398>she <00:25:46.631>already <00:25:46.865>done <00:25:47.098>stuff <00:25:47.331>for, <00:25:47.565>for,

403
00:25:51.205 --> 00:25:54.305
<00:25:51.205>um, <00:25:51.554>plan <00:25:51.905>nine, <00:25:52.254>for <00:25:52.605>example,

404
00:25:54.685 --> 00:25:56.385
<00:25:54.685>and <00:25:55.385>Glenda <00:25:56.085>there.

405
00:25:56.495 --> 00:25:59.905
<00:25:56.495>Okay, <00:25:56.695>that's <00:25:56.895>also <00:25:57.094>different <00:25:57.294>story. <00:25:57.495>Um, <00:25:57.695>Google <00:25:57.895>Go.

406
00:26:00.085 --> 00:26:01.545
<00:26:00.085>Uh, <00:26:00.413>the <00:26:00.742>development <00:26:01.070>has <00:26:01.399>start,

407
00:26:01.605 --> 00:26:03.985
<00:26:01.605>has <00:26:01.885>started <00:26:02.165>in <00:26:02.445>2007 <00:26:02.725>by <00:26:03.005>Google.

408
00:26:04.885 --> 00:26:07.785
<00:26:04.885>Um, <00:26:05.040>it <00:26:05.196>has <00:26:05.351>been <00:26:05.507>designed <00:26:05.662>by <00:26:05.818>Rob <00:26:05.973>Pike, <00:26:06.129>Ken <00:26:06.285>Thompson.

409
00:26:08.415 --> 00:26:09.825
<00:26:08.415>Many <00:26:08.668>people <00:26:08.922>will <00:26:09.176>know <00:26:09.430>Ken <00:26:09.684>Thompson.

410
00:26:11.035 --> 00:26:14.465
<00:26:11.035>Those <00:26:11.315>two <00:26:11.595>together <00:26:11.875>has <00:26:12.155>already <00:26:12.435>mentioned,

411
00:26:14.645 --> 00:26:18.945
<00:26:14.645>but <00:26:14.845>also <00:26:15.045>on <00:26:15.245>B, <00:26:15.445>on <00:26:15.645>on <00:26:15.845>plan <00:26:16.045>nine

412
00:26:19.485 --> 00:26:23.385
<00:26:19.485>had <00:26:19.659>been <00:26:19.834>part <00:26:20.010>of <00:26:20.185>C <00:26:20.360>had <00:26:20.534>created <00:26:20.709>UDF <00:26:20.885>eight,

413
00:26:23.725 --> 00:26:25.345
<00:26:23.725>so <00:26:24.191>lots <00:26:24.658>of <00:26:25.125>stuff.

414
00:26:25.965 --> 00:26:29.705
<00:26:25.965>And <00:26:26.092>also <00:26:26.219>Robert, <00:26:26.346>er, <00:26:26.474>Robert <00:26:26.601>er <00:26:26.728>has <00:26:26.855>been <00:26:26.983>more <00:26:27.110>on <00:26:27.237>the <00:26:27.365>area

415
00:26:29.725 --> 00:26:31.425
<00:26:29.725>of <00:26:30.191>strong, <00:26:30.658>strong <00:26:31.125>talk

416
00:26:31.645 --> 00:26:36.145
<00:26:31.645>and, <00:26:31.845>uh, <00:26:32.045>worked <00:26:32.245>on <00:26:32.445>one <00:26:32.645>of <00:26:32.845>the <00:26:33.045>first,

417
00:26:36.605 --> 00:26:39.265
<00:26:36.605>uh, <00:26:37.071>um, <00:26:37.538>Java, <00:26:38.005>um,

418
00:26:42.085 --> 00:26:43.685
<00:26:42.085>uh, <00:26:42.435>missing <00:26:42.785>the <00:26:43.135>name <00:26:43.485>here.

419
00:26:45.805 --> 00:26:49.165
<00:26:45.805>Hmm. <00:26:46.005>But <00:26:46.205>he <00:26:46.405>came <00:26:46.605>from <00:26:46.805>this <00:26:47.005>area <00:26:47.205>there.

420
00:26:49.865 --> 00:26:54.845
<00:26:49.865>So, <00:26:50.098>um, <00:26:50.331>information <00:26:50.565>about, <00:26:50.798>uh, <00:26:51.031>go, <00:26:51.265>uh,

421
00:26:54.845 --> 00:26:57.005
<00:26:54.845>raised <00:26:55.311>up <00:26:55.778>in <00:26:56.245>2009,

422
00:26:57.785 --> 00:27:01.045
<00:26:57.785>but <00:26:57.960>the <00:26:58.135>first <00:26:58.310>initial <00:26:58.485>release <00:26:58.660>has <00:26:58.835>been <00:26:59.010>in <00:26:59.185>2012.

423
00:27:02.625 --> 00:27:06.765
<00:27:02.625>And <00:27:02.752>if, <00:27:02.879>uh, <00:27:03.006>people <00:27:03.134>take <00:27:03.261>a <00:27:03.388>first <00:27:03.515>look <00:27:03.643>into <00:27:03.770>the <00:27:03.897>language, <00:27:04.025>um,

424
00:27:07.225 --> 00:27:09.205
<00:27:07.225>it <00:27:07.691>looks <00:27:08.158>very <00:27:08.625>imperative.

425
00:27:10.465 --> 00:27:14.645
<00:27:10.465>Uh, <00:27:10.665>many <00:27:10.865>people <00:27:11.064>also <00:27:11.264>say <00:27:11.465>it <00:27:11.665>looks <00:27:11.865>boring.

426
00:27:15.065 --> 00:27:19.725
<00:27:15.065>Uh, <00:27:15.298>it <00:27:15.531>is <00:27:15.765>absolutely <00:27:15.998>not <00:27:16.231>esoteric, <00:27:16.465>uh,

427
00:27:20.285 --> 00:27:21.965
<00:27:20.285>I <00:27:20.485>have <00:27:20.685>to <00:27:20.885>say, <00:27:21.085>but <00:27:21.285>that's <00:27:21.485>a <00:27:21.685>benefit.

428
00:27:22.945 --> 00:27:25.125
<00:27:22.945>It <00:27:23.294>is <00:27:23.645>also <00:27:23.995>multi <00:27:24.345>parum.

429
00:27:25.395 --> 00:27:28.205
<00:27:25.395>It's <00:27:25.550>more <00:27:25.706>multi <00:27:25.861>parum <00:27:26.017>as <00:27:26.172>you <00:27:26.328>see <00:27:26.483>in <00:27:26.639>the <00:27:26.795>beginning.

430
00:27:28.905 --> 00:27:32.125
<00:27:28.905>So <00:27:29.105>we <00:27:29.305>have <00:27:29.504>our <00:27:29.705>types <00:27:29.905>with <00:27:30.105>methods, <00:27:30.305>um,

431
00:27:32.855 --> 00:27:37.165
<00:27:32.855>which <00:27:33.088>allows <00:27:33.321>a <00:27:33.555>kind <00:27:33.788>of, <00:27:34.021>um, <00:27:34.255>encapsulation

432
00:27:37.785 --> 00:27:41.565
<00:27:37.785>and, <00:27:37.985>uh, <00:27:38.185>looks <00:27:38.385>like <00:27:38.585>a <00:27:38.785>bit <00:27:38.985>like <00:27:39.185>OOP

433
00:27:42.475 --> 00:27:45.525
<00:27:42.475>even <00:27:42.708>if, <00:27:42.941>if <00:27:43.175>go <00:27:43.408>hasn't, <00:27:43.641>uh, <00:27:43.875>inheritance.

434
00:27:46.185 --> 00:27:51.125
<00:27:46.185>But <00:27:46.360>we <00:27:46.534>have, <00:27:46.710>uh, <00:27:46.885>interfaces, <00:27:47.060>interfaces <00:27:47.235>which <00:27:47.409>normally <00:27:47.585>are

435
00:27:51.985 --> 00:27:56.145
<00:27:51.985>not <00:27:52.685>explicitly <00:27:53.385>designed,

436
00:27:56.805 --> 00:27:59.545
<00:27:56.805>um, <00:27:57.155>or <00:27:57.505>not <00:27:57.855>explicitly <00:27:58.205>told

437
00:27:59.575 --> 00:28:01.985
<00:27:59.575>that <00:27:59.855>the <00:28:00.135>type <00:28:00.415>implements <00:28:00.695>the <00:28:00.975>interface,

438
00:28:02.645 --> 00:28:07.305
<00:28:02.645>but <00:28:02.820>more <00:28:02.995>in <00:28:03.170>when <00:28:03.345>somebody, <00:28:03.520>or <00:28:03.695>when <00:28:03.870>some <00:28:04.045>type

439
00:28:07.605 --> 00:28:08.705
<00:28:07.605>or <00:28:08.100>some <00:28:08.595>function

440
00:28:08.765 --> 00:28:13.345
<00:28:08.765>or <00:28:08.998>some <00:28:09.231>method, <00:28:09.465>for <00:28:09.698>example, <00:28:09.931>expect <00:28:10.165>something

441
00:28:14.655 --> 00:28:19.065
<00:28:14.655>that <00:28:14.888>is <00:28:15.121>able <00:28:15.355>to <00:28:15.588>read, <00:28:15.821>um, <00:28:16.055>uh,

442
00:28:19.295 --> 00:28:23.505
<00:28:19.295>data <00:28:19.528>from <00:28:19.761>anywhere, <00:28:19.995>then <00:28:20.228>it <00:28:20.461>can <00:28:20.695>locally

443
00:28:24.125 --> 00:28:28.945
<00:28:24.125>define <00:28:24.300>an <00:28:24.475>interface, <00:28:24.650>um, <00:28:24.825>having <00:28:25.000>only <00:28:25.175>the <00:28:25.350>method <00:28:25.525>read

444
00:28:29.525 --> 00:28:32.945
<00:28:29.525>and <00:28:29.725>getting <00:28:29.925>as <00:28:30.125>a <00:28:30.325>result, <00:28:30.525>uh, <00:28:30.725>by, <00:28:30.925>uh,

445
00:28:33.955 --> 00:28:35.345
<00:28:33.955>slice <00:28:34.371>at <00:28:34.789>an <00:28:35.206>arrow.

446
00:28:36.485 --> 00:28:41.305
<00:28:36.485>And, <00:28:36.834>um, <00:28:37.185>then <00:28:37.534>afterwards, <00:28:37.885>any,

447
00:28:42.285 --> 00:28:46.825
<00:28:42.285>uh, <00:28:42.485>given <00:28:42.685>argument <00:28:42.885>to <00:28:43.085>this, <00:28:43.285>let's <00:28:43.485>say, <00:28:43.685>function,

448
00:28:47.715 --> 00:28:51.665
<00:28:47.715>which <00:28:47.995>implements <00:28:48.274>this <00:28:48.554>method, <00:28:48.834>is <00:28:49.115>automatically,

449
00:28:51.665 --> 00:28:54.385
<00:28:51.665>automatically <00:28:52.014>matching <00:28:52.365>to <00:28:52.715>the <00:28:53.065>interface

450
00:28:54.725 --> 00:28:55.985
<00:28:54.725>and <00:28:55.008>can <00:28:55.292>be <00:28:55.575>used <00:28:55.859>internally

451
00:28:56.415 --> 00:29:00.305
<00:28:56.415>because <00:28:56.695>the <00:28:56.975>function <00:28:57.254>internally <00:28:57.534>isn't <00:28:57.815>interesting

452
00:29:00.325 --> 00:29:03.705
<00:29:00.325>and <00:29:00.525>interested <00:29:00.725>in <00:29:00.925>anything <00:29:01.125>else, <00:29:01.325>only <00:29:01.525>in, <00:29:01.725>um,

453
00:29:04.965 --> 00:29:08.305
<00:29:04.965>in <00:29:05.165>the, <00:29:05.365>uh, <00:29:05.564>one <00:29:05.764>method <00:29:05.965>of <00:29:06.165>the <00:29:06.365>interface.

454
00:29:08.485 --> 00:29:13.345
<00:29:08.485>So <00:29:08.659>it's, <00:29:08.834>it's <00:29:09.010>a <00:29:09.185>very <00:29:09.360>kind <00:29:09.534>of <00:29:09.709>dynamic <00:29:09.885>programming

455
00:29:13.445 --> 00:29:18.265
<00:29:13.445>by <00:29:13.585>using <00:29:13.725>the <00:29:13.865>interfaces <00:29:14.004>in <00:29:14.145>go, <00:29:14.284>we <00:29:14.425>have <00:29:14.564>function <00:29:14.705>types, <00:29:14.845>uh,

456
00:29:18.365 --> 00:29:22.025
<00:29:18.365>you <00:29:18.565>will <00:29:18.765>see <00:29:18.965>later, <00:29:19.165>uh, <00:29:19.365>which <00:29:19.565>is, <00:29:19.765>uh,

457
00:29:22.335 --> 00:29:25.945
<00:29:22.335>also <00:29:22.535>very <00:29:22.735>powerful, <00:29:22.935>and <00:29:23.135>we <00:29:23.335>have <00:29:23.535>the <00:29:23.735>concurrency.

458
00:29:26.845 --> 00:29:29.825
<00:29:26.845>Um, <00:29:27.045>so, <00:29:27.245>uh, <00:29:27.445>that's <00:29:27.645>why <00:29:27.845>we <00:29:28.045>are <00:29:28.245>here.

459
00:29:30.565 --> 00:29:33.625
<00:29:30.565>And <00:29:30.765>the <00:29:30.965>concurrency <00:29:31.165>is <00:29:31.365>realized <00:29:31.565>I <00:29:31.765>already <00:29:31.965>mentioned

460
00:29:33.805 --> 00:29:35.705
<00:29:33.805>by <00:29:34.155>go <00:29:34.505>routines <00:29:34.855>and <00:29:35.205>channels.

461
00:29:37.245 --> 00:29:40.465
<00:29:37.245>Uh, <00:29:37.385>the <00:29:37.524>go <00:29:37.665>routines <00:29:37.804>run <00:29:37.945>in <00:29:38.084>light <00:29:38.225>white, <00:29:38.364>run <00:29:38.504>light <00:29:38.645>white,

462
00:29:40.615 --> 00:29:45.125
<00:29:40.615>very <00:29:40.770>lightweight <00:29:40.926>with <00:29:41.081>a <00:29:41.237>reduced <00:29:41.392>stack <00:29:41.548>in <00:29:41.703>a <00:29:41.859>threat <00:29:42.015>pool.

463
00:29:45.265 --> 00:29:49.095
<00:29:45.265>So, <00:29:45.465>uh, <00:29:45.665>the <00:29:45.865>threat <00:29:46.065>pool, <00:29:46.265>by <00:29:46.465>the <00:29:46.665>intent

464
00:29:49.275 --> 00:29:52.815
<00:29:49.275>or <00:29:49.555>in <00:29:49.835>the <00:29:50.115>runtime, <00:29:50.395>um, <00:29:50.675>ensures

465
00:29:52.965 --> 00:29:56.375
<00:29:52.965>that <00:29:53.165>there's <00:29:53.365>enough <00:29:53.564>red, <00:29:53.764>uh, <00:29:53.965>um, <00:29:54.165>computing <00:29:54.365>power

466
00:29:56.555 --> 00:29:57.735
<00:29:56.555>for <00:29:56.909>each <00:29:57.263>goal <00:29:57.617>routine,

467
00:29:58.235 --> 00:30:00.855
<00:29:58.235>and <00:29:58.468>also <00:29:58.701>ensures <00:29:58.935>that <00:29:59.168>there's <00:29:59.401>no <00:29:59.635>blocking.

468
00:30:02.205 --> 00:30:05.985
<00:30:02.205>Um, <00:30:02.405>most <00:30:02.605>times, <00:30:02.804>uh, <00:30:03.004>only <00:30:03.205>you <00:30:03.405>create <00:30:03.605>something.

469
00:30:06.565 --> 00:30:08.425
<00:30:06.565>Um, <00:30:06.845>and <00:30:07.125>for <00:30:07.405>example, <00:30:07.685>if <00:30:07.965>some,

470
00:30:08.725 --> 00:30:10.945
<00:30:08.725>if <00:30:08.958>one <00:30:09.191>goal <00:30:09.425>routine <00:30:09.658>is <00:30:09.891>doing <00:30:10.125>IO

471
00:30:11.365 --> 00:30:16.185
<00:30:11.365>and <00:30:11.481>has <00:30:11.598>to <00:30:11.715>wait, <00:30:11.831>uh, <00:30:11.948>another <00:30:12.065>one <00:30:12.181>can <00:30:12.298>get <00:30:12.415>the, <00:30:12.531>the, <00:30:12.648>uh, <00:30:12.765>power

472
00:30:16.285 --> 00:30:20.065
<00:30:16.285>and <00:30:16.485>the <00:30:16.685>computer <00:30:16.885>power, <00:30:17.085>the <00:30:17.285>functions <00:30:17.485>are <00:30:17.685>spawned.

473
00:30:20.605 --> 00:30:24.705
<00:30:20.605>So, <00:30:20.838>or <00:30:21.071>not <00:30:21.305>the <00:30:21.538>functions <00:30:21.771>goal <00:30:22.005>routines

474
00:30:24.765 --> 00:30:25.985
<00:30:24.765>are <00:30:25.314>simply <00:30:25.862>functions.

475
00:30:27.325 --> 00:30:30.785
<00:30:27.325>Um, <00:30:27.525>so <00:30:27.725>it <00:30:27.925>can, <00:30:28.125>can <00:30:28.325>also <00:30:28.525>be <00:30:28.725>methods,

476
00:30:30.785 --> 00:30:33.785
<00:30:30.785>because <00:30:31.065>methods <00:30:31.345>are <00:30:31.625>also <00:30:31.905>only <00:30:32.185>functions,

477
00:30:35.485 --> 00:30:38.705
<00:30:35.485>and <00:30:35.659>those <00:30:35.834>are <00:30:36.010>spawned <00:30:36.185>with <00:30:36.360>the <00:30:36.534>key <00:30:36.709>word <00:30:36.885>go.

478
00:30:39.325 --> 00:30:43.185
<00:30:39.325>Um, <00:30:39.500>so <00:30:39.675>if <00:30:39.850>I <00:30:40.025>have <00:30:40.200>a <00:30:40.375>function, <00:30:40.550>do <00:30:40.725>this,

479
00:30:43.705 --> 00:30:46.305
<00:30:43.705>I <00:30:43.985>only <00:30:44.264>say, <00:30:44.544>go <00:30:44.824>do <00:30:45.105>this.

480
00:30:46.645 --> 00:30:50.305
<00:30:46.645>And <00:30:46.820>then, <00:30:46.995>um, <00:30:47.170>a <00:30:47.345>new <00:30:47.520>go <00:30:47.695>routine <00:30:47.870>is <00:30:48.045>spawned

481
00:30:50.485 --> 00:30:53.815
<00:30:50.485>and <00:30:50.764>runs <00:30:51.044>in <00:30:51.324>the <00:30:51.604>background, <00:30:51.885>um,

482
00:30:54.375 --> 00:30:57.095
<00:30:54.375>a <00:30:54.725>very <00:30:55.075>large <00:30:55.425>number, <00:30:55.775>uh,

483
00:30:58.335 --> 00:31:00.565
<00:30:58.335>which <00:30:58.615>is <00:30:58.895>running <00:30:59.175>parallel <00:30:59.455>is <00:30:59.735>possible.

484
00:31:00.745 --> 00:31:05.645
<00:31:00.745>So <00:31:00.919>you <00:31:01.094>can, <00:31:01.270>um, <00:31:01.445>even <00:31:01.620>spawn <00:31:01.794>multiple <00:31:01.969>thousand <00:31:02.145>ones.

485
00:31:05.755 --> 00:31:09.325
<00:31:05.755>It's <00:31:05.955>absolutely <00:31:06.155>no <00:31:06.355>problem <00:31:06.555>even <00:31:06.755>on <00:31:06.955>small <00:31:07.155>computers,

486
00:31:10.905 --> 00:31:14.325
<00:31:10.905>um, <00:31:11.138>as <00:31:11.371>have <00:31:11.605>I <00:31:11.838>mentioned, <00:31:12.071>I <00:31:12.305>think,

487
00:31:14.465 --> 00:31:18.525
<00:31:14.465>so <00:31:14.620>the <00:31:14.776>channels <00:31:14.931>are <00:31:15.087>typed, <00:31:15.242>so <00:31:15.398>there <00:31:15.553>is <00:31:15.709>no <00:31:15.865>type

488
00:31:19.315 --> 00:31:23.685
<00:31:19.315>channel <00:31:19.548>that <00:31:19.781>you <00:31:20.015>can <00:31:20.248>say, <00:31:20.481>I <00:31:20.715>want

489
00:31:23.685 --> 00:31:26.925
<00:31:23.685>to <00:31:23.965>have <00:31:24.245>a <00:31:24.524>channel <00:31:24.804>transporting <00:31:25.085>strings,

490
00:31:27.625 --> 00:31:31.445
<00:31:27.625>or <00:31:27.825>if <00:31:28.025>you <00:31:28.225>upfront <00:31:28.425>have <00:31:28.625>defined, <00:31:28.825>uh, <00:31:29.025>uh,

491
00:31:32.205 --> 00:31:36.765
<00:31:32.205>a <00:31:32.312>type <00:31:32.420>named <00:31:32.528>a, <00:31:32.635>then <00:31:32.743>you <00:31:32.851>can <00:31:32.958>say, <00:31:33.066>I <00:31:33.174>want <00:31:33.281>to <00:31:33.389>have <00:31:33.497>a <00:31:33.605>channel

492
00:31:37.525 --> 00:31:42.045
<00:31:37.525>transporting <00:31:37.758>a, <00:31:37.991>so, <00:31:38.225>um, <00:31:38.458>channels <00:31:38.691>are <00:31:38.925>typed

493
00:31:42.905 --> 00:31:46.125
<00:31:42.905>and <00:31:43.254>they <00:31:43.605>run, <00:31:43.955>uh, <00:31:44.305>synchronous.

494
00:31:47.265 --> 00:31:49.525
<00:31:47.265>So <00:31:47.465>as <00:31:47.665>I <00:31:47.865>said, <00:31:48.065>when <00:31:48.265>you <00:31:48.465>are <00:31:48.665>right

495
00:31:49.745 --> 00:31:54.125
<00:31:49.745>and <00:31:49.919>the <00:31:50.094>reader <00:31:50.270>isn't <00:31:50.445>re <00:31:50.620>uh, <00:31:50.794>ready, <00:31:50.969>um, <00:31:51.145>uh,

496
00:31:54.545 --> 00:31:57.205
<00:31:54.545>you <00:31:54.825>have <00:31:55.105>to <00:31:55.385>wait <00:31:55.665>or <00:31:55.945>buffered.

497
00:31:57.395 --> 00:32:00.525
<00:31:57.395>That <00:31:57.745>means, <00:31:58.095>um, <00:31:58.445>when <00:31:58.795>declare,

498
00:32:00.705 --> 00:32:05.245
<00:32:00.705>you <00:32:00.845>can <00:32:00.985>say <00:32:01.125>the <00:32:01.264>buffer <00:32:01.405>size <00:32:01.544>is <00:32:01.685>let's <00:32:01.824>say, <00:32:01.965>uh, <00:32:02.105>uh,

499
00:32:05.545 --> 00:32:09.965
<00:32:05.545>100, <00:32:05.895>um, <00:32:06.245>strings, <00:32:06.595>so <00:32:06.945>100,

500
00:32:10.715 --> 00:32:13.045
<00:32:10.715>then, <00:32:10.889>uh, <00:32:11.064>you <00:32:11.240>can <00:32:11.415>write <00:32:11.590>up <00:32:11.764>to <00:32:11.939>a <00:32:12.115>hundred,

501
00:32:13.905 --> 00:32:18.245
<00:32:13.905>but <00:32:14.105>then <00:32:14.305>if <00:32:14.504>the <00:32:14.705>reader <00:32:14.905>is <00:32:15.105>still <00:32:15.305>blocked,

502
00:32:19.275 --> 00:32:20.805
<00:32:19.275>your <00:32:19.734>sender <00:32:20.193>also <00:32:20.652>blocked.

503
00:32:21.995 --> 00:32:23.525
<00:32:21.995>They <00:32:22.339>are <00:32:22.683>used <00:32:23.027>for <00:32:23.372>communication.

504
00:32:24.475 --> 00:32:29.325
<00:32:24.475>This <00:32:24.630>is <00:32:24.786>when <00:32:24.941>they <00:32:25.097>really <00:32:25.252>sent <00:32:25.408>data <00:32:25.563>or <00:32:25.719>for <00:32:25.875>synchronization.

505
00:32:29.745 --> 00:32:34.445
<00:32:29.745>Um, <00:32:29.885>so <00:32:30.024>you <00:32:30.165>can <00:32:30.304>even <00:32:30.445>send <00:32:30.584>the <00:32:30.725>smallest <00:32:30.864>kind <00:32:31.004>of, <00:32:31.145>uh,

506
00:32:34.545 --> 00:32:36.925
<00:32:34.545>uh, <00:32:34.778>data, <00:32:35.011>which <00:32:35.245>is <00:32:35.478>an <00:32:35.711>empty <00:32:35.945>structure.

507
00:32:37.565 --> 00:32:41.485
<00:32:37.565>The <00:32:37.740>empty <00:32:37.915>structure, <00:32:38.090>uh, <00:32:38.265>has <00:32:38.440>really <00:32:38.615>the <00:32:38.790>size <00:32:38.965>zero,

508
00:32:41.825 --> 00:32:46.005
<00:32:41.825>and <00:32:41.965>when <00:32:42.105>it <00:32:42.245>is <00:32:42.385>sent, <00:32:42.525>uh, <00:32:42.665>uh, <00:32:42.805>via <00:32:42.945>the, <00:32:43.085>uh, <00:32:43.225>channel,

509
00:32:46.185 --> 00:32:50.405
<00:32:46.185>it <00:32:46.340>is <00:32:46.496>just <00:32:46.651>for, <00:32:46.807>yeah, <00:32:46.962>kind <00:32:47.118>of <00:32:47.273>raising <00:32:47.429>a <00:32:47.585>flag.

510
00:32:51.545 --> 00:32:53.925
<00:32:51.545>Um, <00:32:51.895>there <00:32:52.245>are <00:32:52.595>select <00:32:52.945>statements.

511
00:32:54.105 --> 00:32:58.085
<00:32:54.105>Select <00:32:54.280>statements <00:32:54.455>are <00:32:54.630>working <00:32:54.805>like <00:32:54.980>a <00:32:55.155>kind <00:32:55.330>of <00:32:55.505>switch.

512
00:32:58.625 --> 00:33:00.565
<00:32:58.625>So <00:32:58.905>you <00:32:59.185>have <00:32:59.465>a <00:32:59.745>select <00:33:00.025>statement,

513
00:33:00.585 --> 00:33:04.825
<00:33:00.585>and <00:33:00.760>then <00:33:00.935>you <00:33:01.110>have, <00:33:01.285>uh, <00:33:01.460>uh, <00:33:01.635>up <00:33:01.810>to <00:33:01.985>multiple

514
00:33:05.455 --> 00:33:07.185
<00:33:05.455>case <00:33:05.921>statements <00:33:06.388>in <00:33:06.855>there.

515
00:33:07.605 --> 00:33:12.225
<00:33:07.605>And <00:33:07.760>those <00:33:07.916>case <00:33:08.071>statements <00:33:08.227>are <00:33:08.382>then <00:33:08.538>telling, <00:33:08.693>um, <00:33:08.849>I <00:33:09.005>want

516
00:33:12.225 --> 00:33:15.505
<00:33:12.225>to <00:33:12.352>read <00:33:12.479>from <00:33:12.606>channel <00:33:12.734>A, <00:33:12.861>I <00:33:12.988>want <00:33:13.115>to <00:33:13.243>read <00:33:13.370>from <00:33:13.497>channel <00:33:13.625>B,

517
00:33:16.265 --> 00:33:18.785
<00:33:16.265>I <00:33:16.440>want <00:33:16.615>to <00:33:16.790>read <00:33:16.965>from <00:33:17.140>channel <00:33:17.315>C, <00:33:17.490>I <00:33:17.665>want

518
00:33:18.785 --> 00:33:20.345
<00:33:18.785>to <00:33:19.135>write <00:33:19.485>into <00:33:19.835>channel <00:33:20.185>D.

519
00:33:20.405 --> 00:33:24.625
<00:33:20.405>Is <00:33:20.580>is <00:33:20.754>also <00:33:20.930>possible <00:33:21.105>if, <00:33:21.280>if <00:33:21.455>my, <00:33:21.629>uh, <00:33:21.805>loop

520
00:33:24.625 --> 00:33:29.545
<00:33:24.625>with <00:33:24.780>the <00:33:24.936>select <00:33:25.091>statement, <00:33:25.247>um, <00:33:25.402>has <00:33:25.558>something <00:33:25.713>to <00:33:25.869>write, <00:33:26.025>um,

521
00:33:30.325 --> 00:33:32.145
<00:33:30.325>and <00:33:30.558>I <00:33:30.791>can <00:33:31.025>do <00:33:31.258>something <00:33:31.491>in <00:33:31.725>default.

522
00:33:32.365 --> 00:33:36.665
<00:33:32.365>So <00:33:32.520>if <00:33:32.676>on <00:33:32.831>all <00:33:32.987>channels <00:33:33.142>it's <00:33:33.298>nothing <00:33:33.453>to <00:33:33.609>do, <00:33:33.765>um,

523
00:33:37.005 --> 00:33:39.025
<00:33:37.005>the <00:33:37.238>select <00:33:37.471>statement <00:33:37.705>has <00:33:37.938>a <00:33:38.171>default <00:33:38.405>statement.

524
00:33:39.565 --> 00:33:42.065
<00:33:39.565>And <00:33:39.845>normally, <00:33:40.125>um, <00:33:40.405>if <00:33:40.685>you, <00:33:40.965>uh,

525
00:33:42.805 --> 00:33:44.905
<00:33:42.805>not <00:33:43.038>just <00:33:43.271>have <00:33:43.505>a <00:33:43.738>do <00:33:43.971>something <00:33:44.205>once,

526
00:33:44.965 --> 00:33:48.345
<00:33:44.965>but <00:33:45.139>multiple <00:33:45.314>times, <00:33:45.490>then <00:33:45.665>you <00:33:45.840>put <00:33:46.014>this <00:33:46.189>select <00:33:46.365>statement

527
00:33:48.345 --> 00:33:51.345
<00:33:48.345>inside <00:33:48.485>a <00:33:48.625>fall <00:33:48.765>loop, <00:33:48.905>you <00:33:49.045>would <00:33:49.185>see <00:33:49.325>in <00:33:49.465>a <00:33:49.605>few <00:33:49.745>seconds.

528
00:33:52.695 --> 00:33:55.185
<00:33:52.695>Here, <00:33:53.044>I <00:33:53.395>have <00:33:53.745>to <00:33:54.095>hurry.

529
00:33:56.085 --> 00:33:59.985
<00:33:56.085>Uh, <00:33:56.260>so <00:33:56.435>here, <00:33:56.610>for <00:33:56.785>example, <00:33:56.960>uh, <00:33:57.135>background <00:33:57.310>job, <00:33:57.485>um,

530
00:34:02.155 --> 00:34:05.315
<00:34:02.155>a <00:34:02.295>background <00:34:02.435>job <00:34:02.575>is <00:34:02.715>just <00:34:02.855>a <00:34:02.995>function <00:34:03.135>here <00:34:03.274>on <00:34:03.415>the <00:34:03.555>top.

531
00:34:05.855 --> 00:34:08.835
<00:34:05.855>It <00:34:06.205>does <00:34:06.555>something <00:34:06.905>with <00:34:07.255>data.

532
00:34:09.385 --> 00:34:11.435
<00:34:09.385>Data <00:34:09.665>is <00:34:09.945>my <00:34:10.225>own, <00:34:10.505>uh, <00:34:10.785>uh,

533
00:34:11.865 --> 00:34:14.115
<00:34:11.864>data <00:34:12.145>type <00:34:12.424>I've <00:34:12.705>defined <00:34:12.984>somewhere <00:34:13.264>else.

534
00:34:14.935 --> 00:34:17.515
<00:34:14.935>And, <00:34:15.110>uh, <00:34:15.284>my <00:34:15.460>process, <00:34:15.634>my <00:34:15.810>data <00:34:15.985>is <00:34:16.159>a <00:34:16.335>function

535
00:34:17.515 --> 00:34:18.555
<00:34:17.514>of <00:34:17.748>working <00:34:17.982>with <00:34:18.216>this <00:34:18.451>data.

536
00:34:19.255 --> 00:34:22.275
<00:34:19.255>And <00:34:19.395>what <00:34:19.535>I <00:34:19.675>wanna <00:34:19.815>do <00:34:19.955>is <00:34:20.095>in <00:34:20.235>start <00:34:20.375>processing, <00:34:20.515>I <00:34:20.655>want

537
00:34:22.275 --> 00:34:24.635
<00:34:22.275>to <00:34:22.475>pre-process <00:34:22.675>this <00:34:22.875>data, <00:34:23.075>so <00:34:23.275>I <00:34:23.475>have <00:34:23.675>it,

538
00:34:25.455 --> 00:34:28.555
<00:34:25.455>and <00:34:25.610>then <00:34:25.766>I <00:34:25.921>want <00:34:26.077>to <00:34:26.232>start, <00:34:26.388>go, <00:34:26.543>uh, <00:34:26.699>go <00:34:26.855>routine

539
00:34:28.975 --> 00:34:31.515
<00:34:28.975>to <00:34:29.208>process <00:34:29.441>this <00:34:29.674>data <00:34:29.908>in <00:34:30.141>the <00:34:30.375>background.

540
00:34:32.375 --> 00:34:35.875
<00:34:32.375>And <00:34:32.530>as <00:34:32.686>you <00:34:32.841>see <00:34:32.997>here, <00:34:33.152>um, <00:34:33.308>I <00:34:33.463>just <00:34:33.619>declare <00:34:33.775>my,

541
00:34:35.975 --> 00:34:37.155
<00:34:35.975>my <00:34:36.240>data <00:34:36.505>at <00:34:36.771>the <00:34:37.037>top.

542
00:34:37.655 --> 00:34:40.955
<00:34:37.655>Uh, <00:34:37.855>they're <00:34:38.055>even <00:34:38.255>more <00:34:38.455>short <00:34:38.655>and <00:34:38.855>convenient <00:34:39.055>ways,

543
00:34:41.095 --> 00:34:44.395
<00:34:41.094>but <00:34:41.250>only <00:34:41.406>to <00:34:41.561>show <00:34:41.717>you, <00:34:41.872>uh, <00:34:42.028>then <00:34:42.183>I <00:34:42.339>do <00:34:42.495>something

544
00:34:44.415 --> 00:34:46.075
<00:34:44.415>to <00:34:44.648>have <00:34:44.881>my <00:34:45.114>data <00:34:45.348>in <00:34:45.581>the <00:34:45.815>end,

545
00:34:46.495 --> 00:34:50.755
<00:34:46.495>and <00:34:46.694>then <00:34:46.895>I <00:34:47.094>say, <00:34:47.295>go <00:34:47.495>process <00:34:47.694>my <00:34:47.895>data.

546
00:34:50.975 --> 00:34:54.515
<00:34:50.975>So <00:34:51.174>I <00:34:51.375>call <00:34:51.574>my <00:34:51.775>function, <00:34:51.975>which <00:34:52.174>I've <00:34:52.375>declared

547
00:34:55.465 --> 00:34:57.755
<00:34:55.465>another <00:34:55.665>point <00:34:55.865>in <00:34:56.065>the <00:34:56.265>software, <00:34:56.465>I <00:34:56.665>spawn <00:34:56.865>it,

548
00:34:58.775 --> 00:35:03.355
<00:34:58.775>and <00:34:58.930>the <00:34:59.086>whole <00:34:59.241>function <00:34:59.397>runs <00:34:59.552>with <00:34:59.708>the <00:34:59.863>given, <00:35:00.019>uh, <00:35:00.175>uh,

549
00:35:03.665 --> 00:35:08.395
<00:35:03.665>data, <00:35:04.015>which <00:35:04.365>I, <00:35:04.715>um, <00:35:05.065>give

550
00:35:08.495 --> 00:35:10.995
<00:35:08.495>as <00:35:08.694>a <00:35:08.895>field, <00:35:09.095>uh, <00:35:09.295>give <00:35:09.495>as <00:35:09.694>an <00:35:09.895>argument.

551
00:35:12.735 --> 00:35:15.995
<00:35:12.735>So, <00:35:12.935>um, <00:35:13.135>this <00:35:13.335>is <00:35:13.535>very <00:35:13.735>simple <00:35:13.935>with <00:35:14.135>an

552
00:35:16.895 --> 00:35:18.955
<00:35:16.895>own <00:35:17.595>extra <00:35:18.295>function.

553
00:35:20.535 --> 00:35:24.105
<00:35:20.535>Another <00:35:20.690>one <00:35:20.846>is, <00:35:21.001>uh, <00:35:21.157>this <00:35:21.312>is, <00:35:21.468>I <00:35:21.623>so <00:35:21.779>told <00:35:21.935>already,

554
00:35:24.105 --> 00:35:25.825
<00:35:24.105>we <00:35:24.338>have <00:35:24.571>a <00:35:24.805>kind <00:35:25.038>of <00:35:25.271>function <00:35:25.505>programming.

555
00:35:26.405 --> 00:35:29.865
<00:35:26.405>Uh, <00:35:26.580>this <00:35:26.755>is, <00:35:26.930>we <00:35:27.105>work <00:35:27.280>with <00:35:27.455>an <00:35:27.630>embedded <00:35:27.805>function.

556
00:35:30.125 --> 00:35:32.545
<00:35:30.125>So <00:35:30.405>here <00:35:30.685>in <00:35:30.965>this <00:35:31.245>example, <00:35:31.525>um,

557
00:35:32.955 --> 00:35:35.825
<00:35:32.955>there <00:35:33.154>is <00:35:33.355>no <00:35:33.555>external <00:35:33.755>function <00:35:33.955>for <00:35:34.154>the <00:35:34.355>processing.

558
00:35:36.495 --> 00:35:41.125
<00:35:36.495>It's, <00:35:36.634>uh, <00:35:36.775>also <00:35:36.915>no <00:35:37.055>function <00:35:37.194>where <00:35:37.335>I <00:35:37.475>give <00:35:37.615>some, <00:35:37.755>uh, <00:35:37.895>argument.

559
00:35:41.555 --> 00:35:43.645
<00:35:41.555>It's <00:35:41.754>just <00:35:41.955>that <00:35:42.154>I <00:35:42.355>work <00:35:42.555>with <00:35:42.754>my <00:35:42.955>data,

560
00:35:43.825 --> 00:35:46.125
<00:35:43.825>and <00:35:44.058>then <00:35:44.291>I <00:35:44.524>spawn <00:35:44.758>my <00:35:44.991>goal <00:35:45.225>routine

561
00:35:46.625 --> 00:35:49.565
<00:35:46.625>and <00:35:46.858>the <00:35:47.091>goal <00:35:47.325>routine <00:35:47.558>accesses <00:35:47.791>the, <00:35:48.025>uh,

562
00:35:50.785 --> 00:35:52.165
<00:35:50.785>ex, <00:35:51.199>uh, <00:35:51.613>external <00:35:52.027>data.

563
00:35:52.585 --> 00:35:56.765
<00:35:52.585>So <00:35:52.865>it's, <00:35:53.145>uh, <00:35:53.425>just, <00:35:53.705>um, <00:35:53.985>normal,

564
00:35:57.435 --> 00:36:00.925
<00:35:57.435>yeah, <00:35:57.715>kind <00:35:57.995>of <00:35:58.275>functional <00:35:58.555>programming, <00:35:58.835>um,

565
00:36:01.635 --> 00:36:02.645
<00:36:01.635>nothing <00:36:02.544>special.

566
00:36:04.945 --> 00:36:08.835
<00:36:04.945>Um, <00:36:05.145>but <00:36:05.345>we <00:36:05.545>also <00:36:05.745>can <00:36:05.945>embed <00:36:06.145>a <00:36:06.345>function

567
00:36:09.575 --> 00:36:13.235
<00:36:09.575>and, <00:36:09.855>uh, <00:36:10.134>has <00:36:10.415>a <00:36:10.694>data <00:36:10.975>copy,

568
00:36:14.245 --> 00:36:19.035
<00:36:14.245>which <00:36:14.400>may <00:36:14.556>be, <00:36:14.711>um, <00:36:14.867>important <00:36:15.022>if <00:36:15.178>I <00:36:15.333>want <00:36:15.489>to <00:36:15.645>do,

569
00:36:19.815 --> 00:36:24.155
<00:36:19.815>uh, <00:36:19.970>something <00:36:20.126>with <00:36:20.281>the <00:36:20.437>original <00:36:20.592>data <00:36:20.748>in <00:36:20.903>the, <00:36:21.059>uh, <00:36:21.215>rest

570
00:36:24.215 --> 00:36:27.315
<00:36:24.215>of <00:36:24.495>the, <00:36:24.775>of <00:36:25.055>the, <00:36:25.335>um, <00:36:25.615>function.

571
00:36:27.895 --> 00:36:32.315
<00:36:27.895>So <00:36:28.050>that <00:36:28.206>is <00:36:28.361>that <00:36:28.517>I'm <00:36:28.672>here <00:36:28.828>simply <00:36:28.983>declare <00:36:29.139>my, <00:36:29.295>uh,

572
00:36:32.985 --> 00:36:36.555
<00:36:32.985>anonymous <00:36:33.335>function <00:36:33.685>with <00:36:34.035>an <00:36:34.385>argument.

573
00:36:37.575 --> 00:36:41.915
<00:36:37.575>And, <00:36:37.774>uh, <00:36:37.975>then <00:36:38.174>when <00:36:38.375>I, <00:36:38.575>uh, <00:36:38.774>spawn <00:36:38.975>this

574
00:36:42.435 --> 00:36:47.235
<00:36:42.435>function, <00:36:42.575>then <00:36:42.715>I <00:36:42.855>give <00:36:42.995>this, <00:36:43.134>uh, <00:36:43.275>uh, <00:36:43.415>data <00:36:43.555>as <00:36:43.695>argument <00:36:43.835>that,

575
00:36:47.235 --> 00:36:50.035
<00:36:47.235>uh, <00:36:47.390>having <00:36:47.546>here <00:36:47.701>the <00:36:47.857>same <00:36:48.012>name <00:36:48.168>is <00:36:48.323>absolutely <00:36:48.479>no <00:36:48.635>problem,

576
00:36:50.505 --> 00:36:53.435
<00:36:50.505>because, <00:36:50.855>um, <00:36:51.205>yeah, <00:36:51.555>it's <00:36:51.905>embedded

577
00:36:53.495 --> 00:36:56.195
<00:36:53.495>or <00:36:53.775>encapsulated <00:36:54.055>inside <00:36:54.335>the <00:36:54.615>anonymous <00:36:54.895>function.

578
00:36:56.495 --> 00:36:59.675
<00:36:56.495>And, <00:36:56.845>uh, <00:36:57.194>so, <00:36:57.545>uh, <00:36:57.895>they

579
00:37:01.405 --> 00:37:04.795
<00:37:01.405>won't <00:37:01.638>have, <00:37:01.871>uh, <00:37:02.105>some, <00:37:02.338>some <00:37:02.571>troubles <00:37:02.805>when

580
00:37:05.375 --> 00:37:06.835
<00:37:05.375>acting <00:37:05.813>on <00:37:06.251>same <00:37:06.689>name.

581
00:37:09.015 --> 00:37:12.875
<00:37:09.015>Um, <00:37:09.190>sometimes <00:37:09.365>we <00:37:09.540>want <00:37:09.714>to <00:37:09.890>wait <00:37:10.065>for <00:37:10.240>the, <00:37:10.415>uh,

582
00:37:13.765 --> 00:37:16.075
<00:37:13.765>spawn <00:37:14.045>function <00:37:14.325>to <00:37:14.605>be <00:37:14.884>be <00:37:15.165>ready

583
00:37:16.345 --> 00:37:19.315
<00:37:16.345>because <00:37:16.544>we <00:37:16.745>simply <00:37:16.944>want <00:37:17.145>to <00:37:17.345>use <00:37:17.544>this <00:37:17.745>data,

584
00:37:19.935 --> 00:37:22.915
<00:37:19.935>or <00:37:20.134>we <00:37:20.335>want <00:37:20.535>to, <00:37:20.735>um, <00:37:20.935>for <00:37:21.134>example, <00:37:21.335>we,

585
00:37:23.605 --> 00:37:27.835
<00:37:23.605>while <00:37:23.760>we <00:37:23.916>have <00:37:24.071>done <00:37:24.227>something <00:37:24.382>else, <00:37:24.538>we <00:37:24.693>are <00:37:24.849>not, <00:37:25.005>uh,

586
00:37:28.215 --> 00:37:30.435
<00:37:28.215>or <00:37:28.565>we <00:37:28.915>should <00:37:29.265>not <00:37:29.615>terminate

587
00:37:32.065 --> 00:37:35.795
<00:37:32.065>because <00:37:32.265>the, <00:37:32.465>the, <00:37:32.665>the <00:37:32.865>bond <00:37:33.065>process <00:37:33.265>has <00:37:33.465>something

588
00:37:35.795 --> 00:37:37.075
<00:37:35.795>to <00:37:36.025>do <00:37:36.255>with <00:37:36.486>what <00:37:36.716>we <00:37:36.946>do.

589
00:37:37.695 --> 00:37:41.875
<00:37:37.695>And <00:37:37.811>so <00:37:37.928>we <00:37:38.045>create <00:37:38.161>a <00:37:38.278>weight <00:37:38.395>group, <00:37:38.511>which <00:37:38.628>is <00:37:38.745>in <00:37:38.861>a <00:37:38.978>package <00:37:39.095>sink.

590
00:37:43.735 --> 00:37:47.195
<00:37:43.735>Um, <00:37:43.968>and <00:37:44.201>this <00:37:44.435>is <00:37:44.668>a <00:37:44.901>little <00:37:45.135>helper

591
00:37:47.225 --> 00:37:49.395
<00:37:47.225>that <00:37:47.575>the <00:37:47.924>standard <00:37:48.275>library <00:37:48.625>provides.

592
00:37:50.175 --> 00:37:53.955
<00:37:50.175>And <00:37:50.375>here <00:37:50.575>I <00:37:50.775>can <00:37:50.975>tell <00:37:51.175>with <00:37:51.375>the <00:37:51.575>WG

593
00:37:54.215 --> 00:37:58.515
<00:37:54.215>or <00:37:54.370>weight <00:37:54.526>group <00:37:54.681>at <00:37:54.837>one, <00:37:54.992>I <00:37:55.148>say, <00:37:55.303>I <00:37:55.459>wait <00:37:55.615>only

594
00:37:58.815 --> 00:38:02.835
<00:37:58.815>for <00:37:59.165>one, <00:37:59.515>um, <00:37:59.865>processing <00:38:00.215>here,

595
00:38:03.455 --> 00:38:07.435
<00:38:03.455>and <00:38:03.630>then <00:38:03.805>I <00:38:03.980>pass <00:38:04.154>this, <00:38:04.330>uh, <00:38:04.505>weight <00:38:04.680>group <00:38:04.855>together

596
00:38:07.505 --> 00:38:11.035
<00:38:07.505>with <00:38:07.705>the <00:38:07.905>data <00:38:08.105>to <00:38:08.305>my, <00:38:08.505>uh, <00:38:08.705>external <00:38:08.905>function.

597
00:38:12.375 --> 00:38:16.555
<00:38:12.375>And <00:38:12.515>in <00:38:12.655>the <00:38:12.795>end, <00:38:12.935>after <00:38:13.075>I've <00:38:13.215>done <00:38:13.355>something <00:38:13.495>else, <00:38:13.635>I <00:38:13.775>call

598
00:38:17.335 --> 00:38:21.355
<00:38:17.335>wg <00:38:17.568>wait, <00:38:17.801>because <00:38:18.035>I'm <00:38:18.268>waiting <00:38:18.501>until, <00:38:18.735>yeah,

599
00:38:21.675 --> 00:38:23.435
<00:38:21.675>I <00:38:21.875>get <00:38:22.075>the <00:38:22.275>signal <00:38:22.475>that <00:38:22.675>everything <00:38:22.875>is <00:38:23.075>done

600
00:38:23.615 --> 00:38:26.075
<00:38:23.615>and <00:38:23.790>how <00:38:23.964>it's <00:38:24.140>done <00:38:24.314>that <00:38:24.490>I <00:38:24.665>can <00:38:24.839>show <00:38:25.015>here.

601
00:38:27.225 --> 00:38:31.035
<00:38:27.225>That <00:38:27.424>is <00:38:27.625>that <00:38:27.825>I <00:38:28.025>have, <00:38:28.225>uh, <00:38:28.424>the <00:38:28.625>function

602
00:38:31.035 --> 00:38:34.355
<00:38:31.035>or <00:38:31.268>the <00:38:31.501>method, <00:38:31.734>uh, <00:38:31.968>weight <00:38:32.201>group <00:38:32.435>done.

603
00:38:35.145 --> 00:38:39.725
<00:38:35.145>And <00:38:35.320>so <00:38:35.495>the <00:38:35.670>process <00:38:35.845>data <00:38:36.020>defers <00:38:36.195>the <00:38:36.370>function <00:38:36.545>call.

604
00:38:40.745 --> 00:38:45.125
<00:38:40.745>So <00:38:40.920>it's <00:38:41.095>automatically <00:38:41.270>called <00:38:41.444>when <00:38:41.620>all <00:38:41.795>processing <00:38:41.970>is <00:38:42.145>done.

605
00:38:46.035 --> 00:38:48.485
<00:38:46.035>Then <00:38:46.234>it <00:38:46.435>works <00:38:46.634>with <00:38:46.835>everything <00:38:47.035>of <00:38:47.234>the <00:38:47.435>data.

606
00:38:49.025 --> 00:38:52.485
<00:38:49.025>And <00:38:49.225>yeah, <00:38:49.425>when <00:38:49.625>it <00:38:49.825>leaves <00:38:50.025>this <00:38:50.225>function <00:38:50.425>automatically,

607
00:38:53.725 --> 00:38:55.285
<00:38:53.725>WG <00:38:54.191>done <00:38:54.658>is <00:38:55.125>called,

608
00:38:56.065 --> 00:39:00.045
<00:38:56.065>and <00:38:56.240>the <00:38:56.415>wait <00:38:56.590>group <00:38:56.765>waiting <00:38:56.940>from <00:38:57.115>the <00:38:57.290>outer <00:38:57.465>caller

609
00:39:00.635 --> 00:39:03.245
<00:39:00.635>gets <00:39:00.868>a <00:39:01.101>signal, <00:39:01.335>Hey, <00:39:01.568>everything <00:39:01.801>is <00:39:02.035>fine.

610
00:39:03.705 --> 00:39:07.165
<00:39:03.705>You <00:39:04.055>can <00:39:04.404>now, <00:39:04.755>um, <00:39:05.105>continue.

611
00:39:07.385 --> 00:39:09.365
<00:39:07.385>Oh, <00:39:07.851>time <00:39:08.318>gets <00:39:08.785>hard.

612
00:39:09.985 --> 00:39:13.995
<00:39:09.985>Um, <00:39:10.451>so <00:39:10.918>that's <00:39:11.385>important.

613
00:39:14.055 --> 00:39:17.995
<00:39:14.055>For <00:39:14.210>example, <00:39:14.366>if <00:39:14.521>I, <00:39:14.677>um, <00:39:14.832>start <00:39:14.988>a <00:39:15.143>number <00:39:15.299>of <00:39:15.455>jobs

614
00:39:18.655 --> 00:39:21.275
<00:39:18.655>so <00:39:18.855>I <00:39:19.055>can, <00:39:19.255>uh, <00:39:19.455>create <00:39:19.655>a <00:39:19.855>loop <00:39:20.055>here

615
00:39:21.935 --> 00:39:25.395
<00:39:21.935>and <00:39:22.215>say, <00:39:22.495>um, <00:39:22.775>I <00:39:23.055>run <00:39:23.335>overall.

616
00:39:25.615 --> 00:39:29.115
<00:39:25.615>And, <00:39:25.790>and <00:39:25.964>for <00:39:26.140>each <00:39:26.314>one <00:39:26.490>I <00:39:26.665>process, <00:39:26.839>uh, <00:39:27.015>uh,

617
00:39:29.935 --> 00:39:34.235
<00:39:29.935>the <00:39:30.090>new <00:39:30.246>data, <00:39:30.401>and <00:39:30.557>I, <00:39:30.712>for <00:39:30.868>each <00:39:31.023>time, <00:39:31.179>I, <00:39:31.335>um,

618
00:39:34.695 --> 00:39:39.515
<00:39:34.695>add <00:39:34.811>a <00:39:34.928>new <00:39:35.045>one <00:39:35.161>to <00:39:35.278>the, <00:39:35.395>to <00:39:35.511>the, <00:39:35.628>uh, <00:39:35.745>weight <00:39:35.861>group, <00:39:35.978>so <00:39:36.095>that

619
00:39:40.055 --> 00:39:44.155
<00:39:40.055>the <00:39:40.335>weight <00:39:40.615>group, <00:39:40.895>um, <00:39:41.174>automatically <00:39:41.455>gets,

620
00:39:44.735 --> 00:39:49.475
<00:39:44.735>or <00:39:44.910>the <00:39:45.085>value <00:39:45.260>insight <00:39:45.435>gets <00:39:45.610>increased, <00:39:45.785>um, <00:39:45.960>for <00:39:46.135>each,

621
00:39:49.855 --> 00:39:54.025
<00:39:49.855>uh, <00:39:50.055>data <00:39:50.255>I'm, <00:39:50.455>I'm <00:39:50.655>processing <00:39:50.855>in <00:39:51.055>the <00:39:51.255>background.

622
00:39:54.765 --> 00:39:56.465
<00:39:54.765>And <00:39:55.115>even <00:39:55.464>if <00:39:55.815>this <00:39:56.165>processing

623
00:39:56.605 --> 00:40:00.705
<00:39:56.605>and <00:39:56.760>this <00:39:56.916>warning <00:39:57.071>of <00:39:57.227>new <00:39:57.382>ones <00:39:57.538>overlaps <00:39:57.693>the <00:39:57.849>processing, <00:39:58.005>then

624
00:40:01.785 --> 00:40:03.475
<00:40:01.785>subtracts <00:40:02.251>this <00:40:02.718>value <00:40:03.185>again.

625
00:40:03.855 --> 00:40:05.675
<00:40:03.855>And <00:40:04.205>so <00:40:04.555>when <00:40:04.905>the <00:40:05.255>last

626
00:40:06.015 --> 00:40:10.075
<00:40:06.015>and <00:40:06.248>final <00:40:06.481>process <00:40:06.714>data <00:40:06.948>has <00:40:07.181>ended, <00:40:07.415>then

627
00:40:10.755 --> 00:40:14.235
<00:40:10.755>WG <00:40:10.910>weight <00:40:11.066>gets <00:40:11.221>a <00:40:11.377>signal <00:40:11.532>on, <00:40:11.688>Hey, <00:40:11.843>you <00:40:11.999>are <00:40:12.155>done.

628
00:40:14.235 --> 00:40:17.195
<00:40:14.235>Everything <00:40:14.515>is <00:40:14.795>fine. <00:40:15.075>So <00:40:15.355>this, <00:40:15.635>uh,

629
00:40:17.255 --> 00:40:21.875
<00:40:17.255>little <00:40:17.410>weight <00:40:17.566>group <00:40:17.721>is <00:40:17.877>a <00:40:18.032>very, <00:40:18.188>um, <00:40:18.343>powerful <00:40:18.499>hyper, <00:40:18.655>um,

630
00:40:22.505 --> 00:40:25.435
<00:40:22.505>when <00:40:22.705>weight, <00:40:22.905>working <00:40:23.105>with <00:40:23.305>data <00:40:23.505>in <00:40:23.705>the <00:40:23.905>background.

631
00:40:27.125 --> 00:40:29.655
<00:40:27.125>Another <00:40:27.405>example <00:40:27.685>is <00:40:27.965>streaming <00:40:28.245>of <00:40:28.525>data.

632
00:40:29.995 --> 00:40:33.375
<00:40:29.995>So <00:40:30.170>you <00:40:30.345>have <00:40:30.520>not <00:40:30.694>only <00:40:30.870>one <00:40:31.045>slice <00:40:31.220>of <00:40:31.395>data

633
00:40:33.435 --> 00:40:36.855
<00:40:33.435>or <00:40:33.715>one <00:40:33.995>piece <00:40:34.275>of <00:40:34.555>data, <00:40:34.835>uh,

634
00:40:37.955 --> 00:40:39.295
<00:40:37.955>you <00:40:38.196>can <00:40:38.437>also <00:40:38.678>do <00:40:38.919>this <00:40:39.161>way.

635
00:40:39.525 --> 00:40:41.495
<00:40:39.525>It's, <00:40:39.700>it's <00:40:39.875>a <00:40:40.050>very <00:40:40.225>similar <00:40:40.400>to <00:40:40.575>the <00:40:40.750>last <00:40:40.925>one.

636
00:40:41.925 --> 00:40:46.375
<00:40:41.925>It's <00:40:42.125>only <00:40:42.325>that <00:40:42.525>you <00:40:42.725>have, <00:40:42.925>uh, <00:40:43.125>a <00:40:43.325>channel,

637
00:40:47.335 --> 00:40:49.095
<00:40:47.335>a <00:40:47.568>channel <00:40:47.801>from <00:40:48.035>which <00:40:48.268>you <00:40:48.501>are <00:40:48.735>reading.

638
00:40:49.565 --> 00:40:51.175
<00:40:49.565>It's <00:40:49.915>a <00:40:50.265>channel <00:40:50.615>of <00:40:50.965>data.

639
00:40:52.205 --> 00:40:56.135
<00:40:52.205>This <00:40:52.360>is <00:40:52.516>what <00:40:52.671>you <00:40:52.827>can <00:40:52.982>see <00:40:53.138>in <00:40:53.293>the, <00:40:53.449>uh, <00:40:53.605>function,

640
00:40:56.135 --> 00:40:58.135
<00:40:56.135>declaration <00:40:56.835>function <00:40:57.535>process.

641
00:40:58.585 --> 00:41:00.535
<00:40:58.585>Datas <00:40:58.865>the <00:40:59.145>data <00:40:59.425>channels, <00:40:59.705>the <00:40:59.985>name.

642
00:41:01.395 --> 00:41:05.415
<00:41:01.395>And <00:41:01.550>then <00:41:01.706>channel <00:41:01.861>data <00:41:02.017>means <00:41:02.172>I'm <00:41:02.328>a <00:41:02.483>channel <00:41:02.639>of <00:41:02.795>data.

643
00:41:06.195 --> 00:41:10.335
<00:41:06.195>And <00:41:06.475>the, <00:41:06.755>um, <00:41:07.035>error <00:41:07.315>upfront <00:41:07.595>means

644
00:41:11.325 --> 00:41:12.415
<00:41:11.325>it's <00:41:11.652>only <00:41:11.979>for <00:41:12.306>reading.

645
00:41:13.275 --> 00:41:18.215
<00:41:13.275>The <00:41:13.415>function <00:41:13.555>body <00:41:13.695>is <00:41:13.835>not <00:41:13.975>allowed <00:41:14.115>to <00:41:14.255>write <00:41:14.395>into <00:41:14.535>this <00:41:14.675>channel.

646
00:41:19.115 --> 00:41:22.855
<00:41:19.115>The <00:41:19.290>channel <00:41:19.464>itself <00:41:19.640>normally <00:41:19.814>is <00:41:19.990>speed, <00:41:20.165>decal <00:41:20.339>be <00:41:20.515>directional,

647
00:41:23.235 --> 00:41:27.335
<00:41:23.235>but, <00:41:23.410>uh, <00:41:23.585>here, <00:41:23.760>this <00:41:23.935>way <00:41:24.110>I <00:41:24.285>can <00:41:24.460>say <00:41:24.635>no,

648
00:41:27.405 --> 00:41:30.415
<00:41:27.405>it's <00:41:27.638>only <00:41:27.871>allowed <00:41:28.105>to <00:41:28.338>read <00:41:28.571>from <00:41:28.805>it.

649
00:41:33.265 --> 00:41:38.165
<00:41:33.265>And <00:41:33.404>so <00:41:33.545>I'm <00:41:33.685>using <00:41:33.825>it <00:41:33.964>in, <00:41:34.105>uh, <00:41:34.245>that <00:41:34.384>I <00:41:34.525>create <00:41:34.665>externally,

650
00:41:38.425 --> 00:41:39.885
<00:41:38.425>my, <00:41:39.082>my <00:41:39.739>channel.

651
00:41:41.195 --> 00:41:44.525
<00:41:41.195>Then <00:41:41.395>I <00:41:41.595>spawn <00:41:41.795>the <00:41:41.995>process <00:41:42.195>for <00:41:42.395>the <00:41:42.595>datas,

652
00:41:44.985 --> 00:41:49.565
<00:41:44.985>and, <00:41:45.160>uh, <00:41:45.335>I <00:41:45.510>add <00:41:45.685>the <00:41:45.860>data <00:41:46.035>channel <00:41:46.210>as <00:41:46.385>argument,

653
00:41:50.345 --> 00:41:54.485
<00:41:50.345>so <00:41:50.544>from <00:41:50.745>the <00:41:50.944>caller, <00:41:51.145>I <00:41:51.345>can <00:41:51.544>also, <00:41:51.745>um,

654
00:41:55.895 --> 00:41:59.445
<00:41:55.895>write <00:41:56.022>into <00:41:56.149>it <00:41:56.276>and <00:41:56.404>the <00:41:56.531>process <00:41:56.658>datas <00:41:56.785>can <00:41:56.913>read <00:41:57.040>out <00:41:57.167>of <00:41:57.295>it.

655
00:42:00.035 --> 00:42:01.365
<00:42:00.035>Then <00:42:00.334>I <00:42:00.633>sent <00:42:00.932>my <00:42:01.232>datas.

656
00:42:01.365 --> 00:42:05.925
<00:42:01.365>I've <00:42:01.504>done <00:42:01.645>it <00:42:01.785>here <00:42:01.924>very <00:42:02.064>simply <00:42:02.205>by, <00:42:02.345>by <00:42:02.484>sent <00:42:02.625>three <00:42:02.765>datas.

657
00:42:05.985 --> 00:42:10.645
<00:42:05.985>But, <00:42:06.112>uh, <00:42:06.239>it <00:42:06.366>also <00:42:06.494>can <00:42:06.621>be <00:42:06.748>that <00:42:06.875>I <00:42:07.003>read, <00:42:07.130>uh, <00:42:07.257>very <00:42:07.385>huge,

658
00:42:11.305 --> 00:42:13.885
<00:42:11.305>for <00:42:11.504>example, <00:42:11.705>lock <00:42:11.904>file <00:42:12.105>line <00:42:12.305>by <00:42:12.504>line <00:42:12.705>and,

659
00:42:14.505 --> 00:42:16.445
<00:42:14.505>and <00:42:14.785>pass <00:42:15.065>the <00:42:15.345>lines <00:42:15.625>into <00:42:15.905>it.

660
00:42:17.185 --> 00:42:20.365
<00:42:17.185>And <00:42:17.360>then <00:42:17.535>in <00:42:17.710>the <00:42:17.884>end, <00:42:18.060>I <00:42:18.235>close <00:42:18.410>the <00:42:18.585>data.

661
00:42:20.585 --> 00:42:22.805
<00:42:20.585>Oh, <00:42:20.785>that <00:42:20.985>is <00:42:21.185>something <00:42:21.385>I <00:42:21.585>missed <00:42:21.785>to <00:42:21.985>tell.

662
00:42:23.545 --> 00:42:26.835
<00:42:23.545>Um, <00:42:23.895>this <00:42:24.245>kind <00:42:24.595>of, <00:42:24.945>uh,

663
00:42:27.165 --> 00:42:29.915
<00:42:27.165>range <00:42:27.445>about <00:42:27.725>a <00:42:28.005>data <00:42:28.285>channel, <00:42:28.565>uh,

664
00:42:30.175 --> 00:42:33.835
<00:42:30.175>is <00:42:30.375>automatically <00:42:30.575>ending <00:42:30.775>when <00:42:30.975>the <00:42:31.175>channel <00:42:31.375>is <00:42:31.575>closed.

665
00:42:35.255 --> 00:42:39.635
<00:42:35.255>So <00:42:35.430>this <00:42:35.605>function <00:42:35.780>will <00:42:35.955>be, <00:42:36.130>uh, <00:42:36.305>left <00:42:36.480>when <00:42:36.655>the

666
00:42:40.305 --> 00:42:44.515
<00:42:40.305>data <00:42:40.444>channel <00:42:40.585>is <00:42:40.725>closed <00:42:40.865>from <00:42:41.004>outside, <00:42:41.145>and <00:42:41.285>this <00:42:41.424>is <00:42:41.565>done <00:42:41.705>here.

667
00:42:45.015 --> 00:42:48.875
<00:42:45.015>So <00:42:45.154>in <00:42:45.295>the <00:42:45.435>end, <00:42:45.575>when <00:42:45.714>no <00:42:45.855>da, <00:42:45.995>uh, <00:42:46.134>data <00:42:46.275>comes <00:42:46.415>anymore,

668
00:42:49.675 --> 00:42:51.315
<00:42:49.675>I <00:42:49.955>say, <00:42:50.235>good, <00:42:50.515>there <00:42:50.795>is <00:42:51.075>nothing.

669
00:42:51.815 --> 00:42:55.835
<00:42:51.815>And <00:42:51.970>my <00:42:52.126>goal <00:42:52.281>routine <00:42:52.437>running <00:42:52.592>in <00:42:52.748>the <00:42:52.903>background <00:42:53.059>can <00:42:53.215>stop,

670
00:42:57.755 --> 00:43:00.855
<00:42:57.755>um, <00:42:58.105>piping, <00:42:58.455>which <00:42:58.805>means, <00:42:59.155>uh,

671
00:43:01.135 --> 00:43:03.815
<00:43:01.135>I <00:43:01.415>can <00:43:01.695>also <00:43:01.975>have <00:43:02.255>sequential <00:43:02.535>processing

672
00:43:03.875 --> 00:43:06.655
<00:43:03.875>of <00:43:04.155>multiple <00:43:04.435>datas <00:43:04.715>is <00:43:04.995>shown <00:43:05.275>here.

673
00:43:06.935 --> 00:43:11.815
<00:43:06.935>I <00:43:07.062>have, <00:43:07.189>uh, <00:43:07.316>one <00:43:07.444>function <00:43:07.571>which <00:43:07.698>processes <00:43:07.825>a <00:43:07.953>reading <00:43:08.080>a <00:43:08.207>in <00:43:08.335>the

674
00:43:11.815 --> 00:43:16.375
<00:43:11.815>in <00:43:12.095>channel <00:43:12.375>and <00:43:12.655>writes, <00:43:12.935>um, <00:43:13.215>uh,

675
00:43:16.875 --> 00:43:18.015
<00:43:16.875>bs <00:43:17.131>to <00:43:17.388>the <00:43:17.644>out <00:43:17.901>channel.

676
00:43:18.525 --> 00:43:21.695
<00:43:18.525>Here <00:43:18.632>you <00:43:18.740>see <00:43:18.848>that <00:43:18.955>the <00:43:19.063>arrow <00:43:19.171>is <00:43:19.278>on <00:43:19.386>the <00:43:19.494>right <00:43:19.601>side <00:43:19.709>of <00:43:19.817>the <00:43:19.925>gen,

677
00:43:21.705 --> 00:43:24.815
<00:43:21.705>which <00:43:21.904>means <00:43:22.105>you <00:43:22.305>can't <00:43:22.505>read <00:43:22.705>from <00:43:22.904>this <00:43:23.105>journal,

678
00:43:24.995 --> 00:43:26.335
<00:43:24.995>but <00:43:25.236>you <00:43:25.477>can <00:43:25.718>write <00:43:25.959>into <00:43:26.201>it.

679
00:43:27.195 --> 00:43:29.935
<00:43:27.195>So <00:43:27.475>the <00:43:27.755>arrow <00:43:28.035>before <00:43:28.315>means <00:43:28.595>reading.

680
00:43:30.195 --> 00:43:32.055
<00:43:30.195>The <00:43:30.545>arrow <00:43:30.895>behind <00:43:31.245>means <00:43:31.595>writing.

681
00:43:32.595 --> 00:43:35.855
<00:43:32.595>And <00:43:32.734>what <00:43:32.875>I'm <00:43:33.015>doing <00:43:33.154>here <00:43:33.294>is <00:43:33.435>that <00:43:33.575>I'm <00:43:33.714>reading <00:43:33.855>from <00:43:33.995>the,

682
00:43:36.155 --> 00:43:38.735
<00:43:36.155>the <00:43:36.355>a <00:43:36.555>from <00:43:36.755>the <00:43:36.955>internal, <00:43:37.155>I <00:43:37.355>do <00:43:37.555>something.

683
00:43:38.795 --> 00:43:42.815
<00:43:38.795>So <00:43:38.935>I, <00:43:39.075>uh, <00:43:39.215>so <00:43:39.355>that <00:43:39.495>I <00:43:39.635>get <00:43:39.775>my <00:43:39.915>BS <00:43:40.055>somewhere <00:43:40.195>somehow

684
00:43:43.765 --> 00:43:45.175
<00:43:43.765>with <00:43:44.082>some <00:43:44.399>kind <00:43:44.716>of <00:43:45.034>computing.

685
00:43:46.035 --> 00:43:50.175
<00:43:46.035>Um, <00:43:46.190>could <00:43:46.346>even <00:43:46.501>be <00:43:46.657>that <00:43:46.812>I <00:43:46.968>have <00:43:47.123>internally <00:43:47.279>another <00:43:47.435>loop.

686
00:43:51.105 --> 00:43:53.655
<00:43:51.105>Let's <00:43:51.305>say <00:43:51.505>a <00:43:51.705>is <00:43:51.905>a <00:43:52.105>slice <00:43:52.305>of <00:43:52.505>something,

687
00:43:53.835 --> 00:43:58.215
<00:43:53.835>and <00:43:54.035>I <00:43:54.235>want <00:43:54.435>to, <00:43:54.635>uh, <00:43:54.835>send <00:43:55.035>single, <00:43:55.235>uh,

688
00:43:58.275 --> 00:43:59.495
<00:43:58.275>uh, <00:43:58.824>some <00:43:59.373>things.

689
00:43:59.795 --> 00:44:04.575
<00:43:59.795>So, <00:43:59.995>uh, <00:44:00.195>that <00:44:00.395>I <00:44:00.595>internally <00:44:00.795>split <00:44:00.995>these <00:44:01.195>slicers,

690
00:44:04.795 --> 00:44:08.455
<00:44:04.795>and <00:44:04.935>then <00:44:05.075>the <00:44:05.215>whole <00:44:05.355>time, <00:44:05.495>right, <00:44:05.635>the <00:44:05.775>individual <00:44:05.915>wants <00:44:06.055>to <00:44:06.195>be.

691
00:44:08.675 --> 00:44:10.375
<00:44:08.675>So <00:44:08.875>there <00:44:09.075>are <00:44:09.275>many <00:44:09.475>ways <00:44:09.675>on <00:44:09.875>using <00:44:10.075>it.

692
00:44:11.075 --> 00:44:14.575
<00:44:11.075>Um, <00:44:11.214>what <00:44:11.355>I've <00:44:11.495>added <00:44:11.634>here <00:44:11.774>is <00:44:11.915>that <00:44:12.055>I <00:44:12.194>have <00:44:12.335>a <00:44:12.475>defer

693
00:44:14.755 --> 00:44:16.615
<00:44:14.755>of <00:44:15.105>closing <00:44:15.455>the <00:44:15.805>out <00:44:16.155>channel.

694
00:44:17.115 --> 00:44:22.015
<00:44:17.115>So <00:44:17.242>in <00:44:17.369>the <00:44:17.496>moment <00:44:17.624>the <00:44:17.751>in <00:44:17.878>channel <00:44:18.005>is <00:44:18.133>closed <00:44:18.260>from <00:44:18.387>the <00:44:18.515>outside,

695
00:44:23.595 --> 00:44:25.255
<00:44:23.595>my <00:44:24.294>function <00:44:24.995>stops.

696
00:44:27.175 --> 00:44:31.055
<00:44:27.175>I <00:44:27.330>come <00:44:27.486>to <00:44:27.641>the <00:44:27.797>deferred <00:44:27.952>function, <00:44:28.108>call <00:44:28.263>in <00:44:28.419>the <00:44:28.575>top,

697
00:44:32.115 --> 00:44:33.965
<00:44:32.115>this <00:44:32.464>closes <00:44:32.814>the <00:44:33.165>out <00:44:33.515>channel,

698
00:44:34.705 --> 00:44:39.645
<00:44:34.705>and <00:44:34.832>this <00:44:34.959>way <00:44:35.086>I <00:44:35.214>tell <00:44:35.341>the <00:44:35.468>next <00:44:35.595>reading <00:44:35.723>channel, <00:44:35.850>which <00:44:35.977>is, <00:44:36.105>uh,

699
00:44:40.305 --> 00:44:43.085
<00:44:40.305>or <00:44:40.460>the <00:44:40.616>next <00:44:40.771>reading <00:44:40.927>go <00:44:41.082>routine, <00:44:41.238>which <00:44:41.393>is <00:44:41.549>the <00:44:41.705>one

700
00:44:43.175 --> 00:44:46.125
<00:44:43.175>below <00:44:43.330>which <00:44:43.486>is <00:44:43.641>processing <00:44:43.797>Bs <00:44:43.952>and <00:44:44.108>rights, <00:44:44.263>and <00:44:44.419>to <00:44:44.575>cs.

701
00:44:46.625 --> 00:44:50.005
<00:44:46.625>Um, <00:44:46.825>I <00:44:47.025>tell <00:44:47.225>it, <00:44:47.425>Hey, <00:44:47.625>I <00:44:47.825>am <00:44:48.025>done.

702
00:44:50.105 --> 00:44:52.925
<00:44:50.105>And <00:44:50.338>so <00:44:50.571>now <00:44:50.805>you <00:44:51.038>can <00:44:51.271>terminate <00:44:51.505>too.

703
00:44:53.065 --> 00:44:56.085
<00:44:53.065>So <00:44:53.220>I <00:44:53.376>get <00:44:53.531>a <00:44:53.687>queue <00:44:53.842>of <00:44:53.998>termination <00:44:54.153>when <00:44:54.309>I <00:44:54.465>only

704
00:44:56.375 --> 00:44:57.605
<00:44:56.375>close <00:44:56.744>the <00:44:57.113>other <00:44:57.482>one.

705
00:44:59.225 --> 00:45:02.965
<00:44:59.225>And <00:44:59.365>this <00:44:59.505>shown <00:44:59.645>as <00:44:59.785>a <00:44:59.924>sort, <00:45:00.065>uh, <00:45:00.205>short <00:45:00.345>example <00:45:00.485>is <00:45:00.625>here

706
00:45:03.565 --> 00:45:07.165
<00:45:03.565>I <00:45:03.720>have <00:45:03.876>my <00:45:04.031>three <00:45:04.187>in <00:45:04.342>this <00:45:04.498>type, <00:45:04.653>uh, <00:45:04.809>this <00:45:04.965>way,

707
00:45:07.365 --> 00:45:08.965
<00:45:07.365>buffered, <00:45:08.064>uh, <00:45:08.765>channels.

708
00:45:09.525 --> 00:45:13.485
<00:45:09.525>I <00:45:09.665>buffer <00:45:09.805>them <00:45:09.945>to <00:45:10.085>have <00:45:10.225>them <00:45:10.365>a <00:45:10.505>bit <00:45:10.645>more, <00:45:10.785>um, <00:45:10.925>elastic

709
00:45:14.195 --> 00:45:17.325
<00:45:14.195>because <00:45:14.428>maybe, <00:45:14.661>maybe <00:45:14.895>the <00:45:15.128>processing <00:45:15.361>from <00:45:15.595>A

710
00:45:17.345 --> 00:45:20.605
<00:45:17.345>to <00:45:17.484>B <00:45:17.625>is <00:45:17.765>very <00:45:17.904>fast, <00:45:18.044>but <00:45:18.185>from <00:45:18.325>B2C <00:45:18.464>is <00:45:18.605>more <00:45:18.745>slow.

711
00:45:20.865 --> 00:45:24.885
<00:45:20.865>So <00:45:20.992>that <00:45:21.119>is, <00:45:21.246>um, <00:45:21.374>some <00:45:21.501>kind <00:45:21.628>of <00:45:21.755>with <00:45:21.883>buffer <00:45:22.010>covering, <00:45:22.137>I <00:45:22.265>can

712
00:45:25.905 --> 00:45:26.925
<00:45:25.905>handle <00:45:26.823>better.

713
00:45:28.105 --> 00:45:31.645
<00:45:28.105>And, <00:45:28.305>uh, <00:45:28.505>then <00:45:28.705>I <00:45:28.905>spawn <00:45:29.105>my <00:45:29.305>three <00:45:29.505>processors.

714
00:45:32.595 --> 00:45:36.725
<00:45:32.595>Then <00:45:32.734>once <00:45:32.875>again, <00:45:33.015>I <00:45:33.154>say <00:45:33.294>I <00:45:33.435>want <00:45:33.575>to <00:45:33.714>convert <00:45:33.855>a <00:45:33.995>huge

715
00:45:37.815 --> 00:45:41.425
<00:45:37.815>data, <00:45:38.015>let's <00:45:38.215>say, <00:45:38.415>let's <00:45:38.615>say <00:45:38.815>a <00:45:39.015>simple <00:45:39.215>comma,

716
00:45:41.425 --> 00:45:45.105
<00:45:41.425>separated <00:45:41.625>value <00:45:41.825>file, <00:45:42.025>and <00:45:42.225>I <00:45:42.425>run <00:45:42.625>over <00:45:42.825>it

717
00:45:45.485 --> 00:45:49.025
<00:45:45.485>and <00:45:45.660>push <00:45:45.835>it <00:45:46.010>all <00:45:46.185>into <00:45:46.360>the, <00:45:46.535>um, <00:45:46.710>a <00:45:46.885>channel

718
00:45:50.605 --> 00:45:52.785
<00:45:50.605>or <00:45:50.838>conversions, <00:45:51.071>which <00:45:51.305>are <00:45:51.538>done <00:45:51.771>in <00:45:52.005>the,

719
00:45:53.285 --> 00:45:55.625
<00:45:53.285>um, <00:45:53.751>steps <00:45:54.218>are <00:45:54.685>done.

720
00:45:56.965 --> 00:45:59.865
<00:45:56.965>And <00:45:57.120>in <00:45:57.276>the <00:45:57.431>end, <00:45:57.587>it's <00:45:57.742>the <00:45:57.898>task <00:45:58.053>of, <00:45:58.209>uh, <00:45:58.365>the,

721
00:45:59.965 --> 00:46:03.305
<00:45:59.965>the <00:46:00.245>process <00:46:00.525>ceases, <00:46:00.805>which <00:46:01.085>gets <00:46:01.365>the

722
00:46:03.955 --> 00:46:08.865
<00:46:03.955>final <00:46:04.095>conveyor <00:46:04.235>data, <00:46:04.375>for <00:46:04.515>example, <00:46:04.654>to <00:46:04.795>write <00:46:04.935>it <00:46:05.075>into <00:46:05.215>a <00:46:05.355>file

723
00:46:09.085 --> 00:46:11.385
<00:46:09.085>or <00:46:09.365>do <00:46:09.645>something <00:46:09.925>else <00:46:10.205>with <00:46:10.485>it,

724
00:46:11.765 --> 00:46:14.865
<00:46:11.765>or <00:46:11.940>maybe <00:46:12.115>only <00:46:12.290>say, <00:46:12.464>uh, <00:46:12.640>uh, <00:46:12.815>uh, <00:46:12.990>kind <00:46:13.165>of

725
00:46:15.495 --> 00:46:18.265
<00:46:15.495>very <00:46:15.961>important <00:46:16.428>extracted <00:46:16.895>value.

726
00:46:18.265 --> 00:46:21.385
<00:46:18.265>Calculated <00:46:18.464>value. <00:46:18.665>And <00:46:18.865>when <00:46:19.065>I'm <00:46:19.265>done <00:46:19.464>with <00:46:19.665>everything,

727
00:46:22.025 --> 00:46:23.785
<00:46:22.025>I <00:46:22.375>close <00:46:22.725>my <00:46:23.075>A <00:46:23.425>channel,

728
00:46:23.965 --> 00:46:28.625
<00:46:23.965>and <00:46:24.120>then <00:46:24.276>this <00:46:24.431>chain <00:46:24.587>begins <00:46:24.742>on <00:46:24.898>closed <00:46:25.053>A <00:46:25.209>means <00:46:25.365>I

729
00:46:28.625 --> 00:46:29.825
<00:46:28.625>stop <00:46:29.165>close <00:46:29.705>B.

730
00:46:30.085 --> 00:46:33.145
<00:46:30.085>And <00:46:30.240>that <00:46:30.396>means, <00:46:30.551>and <00:46:30.707>I <00:46:30.862>then <00:46:31.018>the <00:46:31.173>same <00:46:31.329>for <00:46:31.485>C.

731
00:46:34.695 --> 00:46:37.225
<00:46:34.695>Okay, <00:46:34.895>next <00:46:35.095>little <00:46:35.295>one, <00:46:35.495>I <00:46:35.695>already <00:46:35.895>said <00:46:36.095>service.

732
00:46:38.405 --> 00:46:41.185
<00:46:38.405>Um, <00:46:39.105>so <00:46:39.805>we,

733
00:46:43.605 --> 00:46:47.545
<00:46:43.605>so <00:46:43.732>we <00:46:43.859>have, <00:46:43.986>uh, <00:46:44.114>uh, <00:46:44.241>this <00:46:44.368>pattern, <00:46:44.495>what <00:46:44.623>I <00:46:44.750>said <00:46:44.877>with <00:46:45.005>the

734
00:46:48.585 --> 00:46:51.865
<00:46:48.585>services, <00:46:48.818>uh, <00:46:49.051>let's <00:46:49.285>go <00:46:49.518>here <00:46:49.751>bit <00:46:49.985>faster

735
00:46:51.865 --> 00:46:54.665
<00:46:51.865>because <00:46:52.145>it's <00:46:52.424>not <00:46:52.705>the <00:46:52.984>beautiful <00:46:53.265>way.

736
00:46:54.745 --> 00:46:57.385
<00:46:54.745>I <00:46:54.944>will <00:46:55.145>show <00:46:55.345>the <00:46:55.545>be <00:46:55.745>beautiful <00:46:55.944>way <00:46:56.145>afterwards.

737
00:46:57.495 --> 00:46:59.625
<00:46:57.495>It's <00:46:57.961>more <00:46:58.428>important, <00:46:58.895>um,

738
00:46:59.935 --> 00:47:02.825
<00:46:59.935>because <00:47:00.075>you <00:47:00.215>have <00:47:00.355>a <00:47:00.495>lot <00:47:00.634>of <00:47:00.775>stuff <00:47:00.915>to, <00:47:01.055>to <00:47:01.195>create <00:47:01.335>it.

739
00:47:03.525 --> 00:47:06.985
<00:47:03.525>And, <00:47:03.700>uh, <00:47:03.875>here <00:47:04.050>you <00:47:04.225>have <00:47:04.400>your <00:47:04.575>service <00:47:04.750>with <00:47:04.925>the,

740
00:47:06.985 --> 00:47:07.985
<00:47:06.985>with <00:47:07.285>the <00:47:07.585>business <00:47:07.885>data

741
00:47:08.365 --> 00:47:12.345
<00:47:08.365>and <00:47:08.492>with <00:47:08.619>the <00:47:08.746>lots <00:47:08.874>of <00:47:09.001>channel <00:47:09.128>to <00:47:09.255>communicate, <00:47:09.383>to <00:47:09.510>set, <00:47:09.637>to <00:47:09.765>get,

742
00:47:12.605 --> 00:47:16.025
<00:47:12.605>uh, <00:47:12.838>to <00:47:13.071>run <00:47:13.305>operations, <00:47:13.538>for <00:47:13.771>example, <00:47:14.005>um,

743
00:47:17.125 --> 00:47:19.185
<00:47:17.125>to <00:47:17.325>create <00:47:17.525>it <00:47:17.725>with <00:47:17.925>the <00:47:18.125>kind <00:47:18.325>of <00:47:18.525>constructor.

744
00:47:19.965 --> 00:47:23.585
<00:47:19.965>The <00:47:20.245>constructor <00:47:20.525>is <00:47:20.805>normally <00:47:21.085>simple <00:47:21.365>standard

745
00:47:24.385 --> 00:47:28.865
<00:47:24.385>function <00:47:24.585>in <00:47:24.785>the, <00:47:24.985>um, <00:47:25.185>in <00:47:25.385>the <00:47:25.585>package, <00:47:25.785>um,

746
00:47:29.925 --> 00:47:33.205
<00:47:29.925>creating <00:47:30.205>the <00:47:30.485>str, <00:47:30.765>initializing, <00:47:31.045>the <00:47:31.325>struc,

747
00:47:33.965 --> 00:47:37.845
<00:47:33.965>starting <00:47:34.120>the <00:47:34.276>backend, <00:47:34.431>go <00:47:34.587>routine, <00:47:34.742>and <00:47:34.898>then <00:47:35.053>return <00:47:35.209>the <00:47:35.365>type.

748
00:47:38.145 --> 00:47:39.645
<00:47:38.145>So <00:47:38.482>you <00:47:38.820>are <00:47:39.157>then <00:47:39.495>ready.

749
00:47:40.585 --> 00:47:43.885
<00:47:40.585>You <00:47:40.785>have <00:47:40.985>public <00:47:41.185>accessories <00:47:41.385>here, <00:47:41.585>setter <00:47:41.785>and <00:47:41.985>ghe.

750
00:47:44.265 --> 00:47:48.005
<00:47:44.265>The <00:47:44.440>set <00:47:44.615>only <00:47:44.790>sense <00:47:44.964>data <00:47:45.140>to <00:47:45.315>the <00:47:45.490>back <00:47:45.665>end.

751
00:47:48.785 --> 00:47:52.525
<00:47:48.785>Uh, <00:47:48.940>to <00:47:49.096>get <00:47:49.251>it, <00:47:49.407>for <00:47:49.562>example, <00:47:49.718>I <00:47:49.873>have <00:47:50.029>to <00:47:50.185>send

752
00:47:53.385 --> 00:47:57.965
<00:47:53.385>the <00:47:53.501>channel <00:47:53.618>to <00:47:53.735>the <00:47:53.851>back <00:47:53.968>end <00:47:54.085>because <00:47:54.201>I <00:47:54.318>want <00:47:54.435>to <00:47:54.551>have <00:47:54.668>the <00:47:54.785>data

753
00:47:58.105 --> 00:47:59.285
<00:47:58.105>and <00:47:58.459>in <00:47:58.813>any <00:47:59.167>way,

754
00:48:00.145 --> 00:48:02.405
<00:48:00.145>and <00:48:00.345>here <00:48:00.545>this <00:48:00.745>way <00:48:00.945>it <00:48:01.145>is <00:48:01.345>buffered <00:48:01.545>so

755
00:48:02.405 --> 00:48:06.485
<00:48:02.405>that <00:48:02.580>the <00:48:02.755>back <00:48:02.930>end <00:48:03.105>can <00:48:03.280>write <00:48:03.455>this <00:48:03.630>one <00:48:03.805>data

756
00:48:06.705 --> 00:48:07.725
<00:48:06.705>inside <00:48:07.163>this <00:48:07.623>channel

757
00:48:08.585 --> 00:48:12.605
<00:48:08.585>and, <00:48:08.725>uh, <00:48:08.865>then <00:48:09.005>can <00:48:09.145>continue <00:48:09.285>to <00:48:09.425>work <00:48:09.565>while <00:48:09.705>I <00:48:09.845>am <00:48:09.985>reading

758
00:48:12.905 --> 00:48:17.205
<00:48:12.905>and <00:48:13.138>returning <00:48:13.371>it, <00:48:13.605>uh, <00:48:13.838>as <00:48:14.071>last <00:48:14.305>step.

759
00:48:19.145 --> 00:48:21.405
<00:48:19.145>And, <00:48:19.611>uh, <00:48:20.078>but <00:48:20.545>even

760
00:48:21.955 --> 00:48:25.365
<00:48:21.955>also <00:48:22.082>already <00:48:22.209>in <00:48:22.336>the <00:48:22.464>moment <00:48:22.591>when <00:48:22.718>I <00:48:22.845>have <00:48:22.973>a <00:48:23.100>kind <00:48:23.227>of <00:48:23.355>adding,

761
00:48:25.425 --> 00:48:29.605
<00:48:25.425>adding <00:48:25.580>a <00:48:25.736>here, <00:48:25.891>a <00:48:26.047>very <00:48:26.202>dump <00:48:26.358>idea, <00:48:26.513>uh, <00:48:26.669>I <00:48:26.825>try

762
00:48:29.625 --> 00:48:33.885
<00:48:29.625>to <00:48:29.800>convert <00:48:29.975>the, <00:48:30.150>um, <00:48:30.325>string <00:48:30.500>to <00:48:30.675>an <00:48:30.850>inte <00:48:31.025>jar.

763
00:48:34.225 --> 00:48:37.765
<00:48:34.225>And <00:48:34.380>if <00:48:34.536>this <00:48:34.691>works, <00:48:34.847>I <00:48:35.002>add <00:48:35.158>this <00:48:35.313>to <00:48:35.469>the, <00:48:35.625>uh,

764
00:48:38.635 --> 00:48:42.205
<00:48:38.635>inte <00:48:38.775>jar <00:48:38.915>I <00:48:39.055>have <00:48:39.195>as <00:48:39.335>a <00:48:39.475>second <00:48:39.615>field <00:48:39.755>into <00:48:39.895>my <00:48:40.035>struct,

765
00:48:42.345 --> 00:48:44.885
<00:48:42.345>and <00:48:42.578>then <00:48:42.811>return <00:48:43.044>this <00:48:43.278>in <00:48:43.511>on <00:48:43.745>error.

766
00:48:45.505 --> 00:48:48.405
<00:48:45.505>And, <00:48:45.645>uh, <00:48:45.785>so <00:48:45.925>in <00:48:46.065>the <00:48:46.205>moment <00:48:46.345>I <00:48:46.485>have <00:48:46.625>these <00:48:46.765>kind <00:48:46.905>of

767
00:48:49.395 --> 00:48:52.005
<00:48:49.395>more <00:48:49.675>complex <00:48:49.955>operations, <00:48:50.235>I <00:48:50.515>need, <00:48:50.795>uh,

768
00:48:52.005 --> 00:48:54.605
<00:48:52.005>little <00:48:52.238>private <00:48:52.471>helper <00:48:52.705>types <00:48:52.938>like <00:48:53.171>here, <00:48:53.405>the,

769
00:48:54.625 --> 00:48:57.325
<00:48:54.625>the <00:48:54.858>ad <00:48:55.091>response <00:48:55.325>at <00:48:55.558>the <00:48:55.791>top, <00:48:56.025>um,

770
00:48:57.745 --> 00:49:00.325
<00:48:57.745>and <00:48:57.900>I <00:48:58.056>have <00:48:58.211>to <00:48:58.367>create <00:48:58.522>a <00:48:58.678>channel <00:48:58.833>for <00:48:58.989>it <00:48:59.145>again,

771
00:49:00.625 --> 00:49:04.925
<00:49:00.625>and, <00:49:00.800>uh, <00:49:00.975>I <00:49:01.150>have <00:49:01.325>to, <00:49:01.500>um, <00:49:01.675>send <00:49:01.850>it <00:49:02.025>again.

772
00:49:05.125 --> 00:49:06.245
<00:49:05.125>I <00:49:05.326>have <00:49:05.528>to <00:49:05.729>receive <00:49:05.931>it <00:49:06.133>again,

773
00:49:06.305 --> 00:49:08.845
<00:49:06.305>but <00:49:06.444>then <00:49:06.585>I <00:49:06.725>have <00:49:06.865>to <00:49:07.004>check <00:49:07.145>if <00:49:07.285>there's <00:49:07.424>an <00:49:07.565>error <00:49:07.705>inside,

774
00:49:08.905 --> 00:49:13.045
<00:49:08.905>and <00:49:09.032>then <00:49:09.159>I <00:49:09.286>have <00:49:09.414>to <00:49:09.541>return <00:49:09.668>my, <00:49:09.795>um, <00:49:09.923>zero <00:49:10.050>and <00:49:10.177>my <00:49:10.305>error,

775
00:49:13.545 --> 00:49:16.525
<00:49:13.545>or <00:49:13.745>I <00:49:13.945>have <00:49:14.145>to <00:49:14.345>return <00:49:14.545>the <00:49:14.745>correct <00:49:14.945>value

776
00:49:16.945 --> 00:49:19.925
<00:49:16.945>and <00:49:17.411>missing <00:49:17.878>a <00:49:18.345>little

777
00:49:20.485 --> 00:49:23.805
<00:49:20.485>because <00:49:20.718>errors, <00:49:20.951>no, <00:49:21.185>sorry, <00:49:21.418>uh, <00:49:21.651>we <00:49:21.885>change

778
00:49:23.805 --> 00:49:25.725
<00:49:23.805>that <00:49:24.038>on <00:49:24.271>the <00:49:24.504>slides, <00:49:24.738>you <00:49:24.971>will <00:49:25.205>get.

779
00:49:27.905 --> 00:49:30.165
<00:49:27.905>So, <00:49:28.255>uh, <00:49:28.605>the <00:49:28.955>backend <00:49:29.305>structure,

780
00:49:30.605 --> 00:49:33.365
<00:49:30.605>structure <00:49:30.760>then <00:49:30.916>normally <00:49:31.071>looks <00:49:31.227>this <00:49:31.382>way, <00:49:31.538>that <00:49:31.693>you <00:49:31.849>have, <00:49:32.005>um,

781
00:49:34.975 --> 00:49:39.795
<00:49:34.975>the <00:49:35.115>context <00:49:35.255>which <00:49:35.395>is <00:49:35.535>out <00:49:35.674>from <00:49:35.815>the <00:49:35.955>standard <00:49:36.095>library <00:49:36.235>to <00:49:36.375>manage

782
00:49:41.155 --> 00:49:44.835
<00:49:41.155>routines <00:49:41.355>to <00:49:41.555>stop <00:49:41.755>them, <00:49:41.955>for <00:49:42.155>example, <00:49:42.355>um, <00:49:42.555>by

783
00:49:45.995 --> 00:49:50.395
<00:49:45.995>external <00:49:46.228>cancel <00:49:46.461>functions <00:49:46.694>or, <00:49:46.928>uh, <00:49:47.161>by <00:49:47.395>timeouts

784
00:49:50.695 --> 00:49:52.195
<00:49:50.695>and, <00:49:51.370>uh, <00:49:52.045>durations.

785
00:49:52.975 --> 00:49:55.995
<00:49:52.975>Um, <00:49:53.208>there's <00:49:53.441>several <00:49:53.674>ways <00:49:53.908>to <00:49:54.141>use <00:49:54.375>them.

786
00:49:57.055 --> 00:50:01.255
<00:49:57.055>And, <00:49:57.335>uh, <00:49:57.615>this <00:49:57.895>select <00:49:58.174>statement <00:49:58.455>runs

787
00:50:01.315 --> 00:50:03.735
<00:50:01.315>inside <00:50:01.548>a <00:50:01.781>false <00:50:02.015>statement <00:50:02.248>statement <00:50:02.481>that <00:50:02.715>waits

788
00:50:03.735 --> 00:50:05.215
<00:50:03.735>for <00:50:04.068>the, <00:50:04.401>for <00:50:04.734>the <00:50:05.067>messages.

789
00:50:05.875 --> 00:50:07.815
<00:50:05.875>And <00:50:06.108>those <00:50:06.341>are <00:50:06.575>then <00:50:06.808>this <00:50:07.041>way <00:50:07.275>here.

790
00:50:07.955 --> 00:50:11.175
<00:50:07.955>Uh, <00:50:08.130>so <00:50:08.305>you <00:50:08.480>have <00:50:08.654>the <00:50:08.830>different <00:50:09.005>kind <00:50:09.180>of <00:50:09.355>receiving.

791
00:50:11.835 --> 00:50:14.895
<00:50:11.835>Um, <00:50:11.990>here, <00:50:12.146>for <00:50:12.301>example, <00:50:12.457>I <00:50:12.612>receive <00:50:12.768>from <00:50:12.923>the <00:50:13.079>B <00:50:13.235>gen,

792
00:50:14.895 --> 00:50:17.695
<00:50:14.895>which <00:50:15.175>means, <00:50:15.455>oh, <00:50:15.735>my, <00:50:16.015>my, <00:50:16.295>um,

793
00:50:19.515 --> 00:50:24.015
<00:50:19.515>center <00:50:19.670>is <00:50:19.826>interested <00:50:19.981>in <00:50:20.137>my <00:50:20.292>value <00:50:20.448>of <00:50:20.603>my <00:50:20.759>field <00:50:20.915>B,

794
00:50:24.075 --> 00:50:26.655
<00:50:24.075>and <00:50:24.214>then <00:50:24.355>I <00:50:24.495>send <00:50:24.634>it <00:50:24.774>to <00:50:24.915>it, <00:50:25.055>which <00:50:25.194>is <00:50:25.335>very <00:50:25.475>simple,

795
00:50:26.875 --> 00:50:31.485
<00:50:26.875>but <00:50:27.002>also <00:50:27.129>here <00:50:27.256>this <00:50:27.384>way <00:50:27.511>with <00:50:27.638>a, <00:50:27.765>um, <00:50:27.893>adding, <00:50:28.020>which <00:50:28.147>is <00:50:28.275>very,

796
00:50:31.955 --> 00:50:34.405
<00:50:31.955>yeah, <00:50:32.654>dump <00:50:33.355>example.

797
00:50:34.585 --> 00:50:37.845
<00:50:34.585>But <00:50:34.725>I <00:50:34.865>want <00:50:35.005>to <00:50:35.145>simply <00:50:35.285>show, <00:50:35.425>uh, <00:50:35.565>what <00:50:35.705>you <00:50:35.845>have <00:50:35.985>already

798
00:50:37.905 --> 00:50:42.095
<00:50:37.905>to <00:50:38.060>do <00:50:38.216>if <00:50:38.371>you <00:50:38.527>have <00:50:38.682>multiple <00:50:38.838>values <00:50:38.993>to <00:50:39.149>send <00:50:39.305>back.

799
00:50:42.635 --> 00:50:47.095
<00:50:42.635>Um, <00:50:42.868>so <00:50:43.101>as <00:50:43.335>a <00:50:43.568>quick <00:50:43.801>summary, <00:50:44.035>uh,

800
00:50:47.235 --> 00:50:49.775
<00:50:47.235>you <00:50:47.515>need, <00:50:47.795>uh, <00:50:48.075>much <00:50:48.355>extra <00:50:48.635>effort

801
00:50:49.805 --> 00:50:51.815
<00:50:49.805>with <00:50:50.038>these <00:50:50.271>type <00:50:50.504>channels <00:50:50.738>and <00:50:50.971>helper <00:50:51.205>types.

802
00:50:52.035 --> 00:50:55.575
<00:50:52.035>You <00:50:52.268>need, <00:50:52.501>um, <00:50:52.734>you <00:50:52.968>have <00:50:53.201>no, <00:50:53.435>uh,

803
00:50:55.715 --> 00:50:58.215
<00:50:55.715>or <00:50:55.890>this <00:50:56.065>example <00:50:56.240>here <00:50:56.415>does <00:50:56.590>not <00:50:56.765>care <00:50:56.940>if <00:50:57.115>the

804
00:50:58.215 --> 00:50:59.415
<00:50:58.215>context <00:50:58.575>is <00:50:58.935>already <00:50:59.295>canceled.

805
00:50:59.555 --> 00:51:03.455
<00:50:59.555>So <00:50:59.682>if <00:50:59.809>you <00:50:59.936>try <00:51:00.064>to <00:51:00.191>send <00:51:00.318>something, <00:51:00.445>uh, <00:51:00.573>your <00:51:00.700>sending <00:51:00.827>is <00:51:00.955>blocked

806
00:51:03.755 --> 00:51:05.135
<00:51:03.755>and, <00:51:04.003>uh, <00:51:04.251>this <00:51:04.500>is <00:51:04.748>not <00:51:04.997>good.

807
00:51:05.795 --> 00:51:10.055
<00:51:05.795>Um, <00:51:05.995>the, <00:51:06.195>the <00:51:06.395>public <00:51:06.595>methods <00:51:06.795>on <00:51:06.995>the <00:51:07.195>top

808
00:51:10.955 --> 00:51:15.255
<00:51:10.955>and <00:51:11.095>the <00:51:11.235>business <00:51:11.375>logic <00:51:11.515>somewhere <00:51:11.654>in <00:51:11.795>a, <00:51:11.935>in <00:51:12.075>a <00:51:12.215>possible <00:51:12.355>huge,

809
00:51:15.795 --> 00:51:18.455
<00:51:15.795>um, <00:51:16.075>loop <00:51:16.355>in <00:51:16.635>the <00:51:16.915>backend, <00:51:17.195>uh,

810
00:51:18.955 --> 00:51:20.975
<00:51:18.955>method <00:51:19.421>is <00:51:19.888>are <00:51:20.355>separated.

811
00:51:20.975 --> 00:51:25.695
<00:51:20.975>This <00:51:21.115>is <00:51:21.255>bad. <00:51:21.395>And <00:51:21.535>also, <00:51:21.674>um, <00:51:21.815>uh, <00:51:21.955>you <00:51:22.095>have <00:51:22.235>to <00:51:22.375>write

812
00:51:26.215 --> 00:51:28.135
<00:51:26.215>internal <00:51:26.495>private <00:51:26.775>helpers <00:51:27.055>to <00:51:27.335>make <00:51:27.615>it

813
00:51:28.755 --> 00:51:31.935
<00:51:28.755>at <00:51:28.930>least <00:51:29.105>a <00:51:29.280>bit <00:51:29.455>more <00:51:29.630>organized <00:51:29.805>and, <00:51:29.980>and <00:51:30.155>maintainable.

814
00:51:32.195 --> 00:51:33.655
<00:51:32.195>That's <00:51:32.523>not, <00:51:32.852>not <00:51:33.180>the <00:51:33.509>best.

815
00:51:34.715 --> 00:51:38.055
<00:51:34.715>So, <00:51:34.870>um, <00:51:35.026>there's <00:51:35.181>a <00:51:35.337>more <00:51:35.492>simple <00:51:35.648>way <00:51:35.803>to <00:51:35.959>do <00:51:36.115>it.

816
00:51:38.555 --> 00:51:41.295
<00:51:38.555>Um, <00:51:38.788>what's <00:51:39.021>the <00:51:39.254>time? <00:51:39.488>It's <00:51:39.721>too <00:51:39.955>late.

817
00:51:42.115 --> 00:51:44.895
<00:51:42.115>Um, <00:51:42.314>let <00:51:42.515>me <00:51:42.714>please <00:51:42.915>show <00:51:43.115>this <00:51:43.314>little <00:51:43.515>act

818
00:51:45.155 --> 00:51:47.015
<00:51:45.155>of <00:51:45.505>this <00:51:45.855>is <00:51:46.205>too <00:51:46.555>important.

819
00:51:47.045 --> 00:51:49.095
<00:51:47.045>It's <00:51:47.245>more <00:51:47.445>simple <00:51:47.645>and <00:51:47.845>you <00:51:48.045>can <00:51:48.245>do <00:51:48.445>it

820
00:51:49.095 --> 00:51:52.175
<00:51:49.095>with <00:51:49.270>one <00:51:49.444>simple <00:51:49.620>extra <00:51:49.794>type <00:51:49.970>to, <00:51:50.145>to <00:51:50.319>help <00:51:50.495>you

821
00:51:52.195 --> 00:51:54.495
<00:51:52.195>for <00:51:52.475>all <00:51:52.755>others <00:51:53.035>type <00:51:53.315>of <00:51:53.595>this.

822
00:51:54.765 --> 00:51:58.895
<00:51:54.765>This <00:51:54.998>is <00:51:55.231>having <00:51:55.464>a <00:51:55.698>structure <00:51:55.931>again <00:51:56.165>here

823
00:51:58.895 --> 00:52:00.295
<00:51:58.895>with <00:51:59.147>the <00:51:59.399>context <00:51:59.651>in <00:51:59.903>the <00:52:00.155>type

824
00:52:00.555 --> 00:52:04.735
<00:52:00.555>and <00:52:00.694>the, <00:52:00.835>the, <00:52:00.975>in <00:52:01.115>the <00:52:01.254>kind <00:52:01.395>of <00:52:01.535>action <00:52:01.674>channel <00:52:01.815>channel <00:52:01.955>just

825
00:52:04.835 --> 00:52:06.815
<00:52:04.835>for <00:52:05.185>sending <00:52:05.535>functions, <00:52:05.885>nothing <00:52:06.235>else,

826
00:52:07.595 --> 00:52:10.935
<00:52:07.595>and <00:52:07.828>starting <00:52:08.061>as <00:52:08.294>simple <00:52:08.528>like <00:52:08.761>seen <00:52:08.995>before.

827
00:52:11.955 --> 00:52:16.375
<00:52:11.955>And <00:52:12.095>then, <00:52:12.235>um, <00:52:12.375>the <00:52:12.515>backend <00:52:12.654>does <00:52:12.795>nothing <00:52:12.935>else <00:52:13.075>like <00:52:13.215>shown <00:52:13.355>here,

828
00:52:17.345 --> 00:52:21.815
<00:52:17.345>which <00:52:17.500>once <00:52:17.656>listens <00:52:17.811>to <00:52:17.967>the, <00:52:18.122>uh, <00:52:18.278>context <00:52:18.433>again <00:52:18.589>to <00:52:18.745>say,

829
00:52:22.795 --> 00:52:24.135
<00:52:22.795>am <00:52:23.096>I <00:52:23.398>terminated <00:52:23.699>or <00:52:24.001>not?

830
00:52:25.435 --> 00:52:28.215
<00:52:25.435>Or <00:52:25.668>it <00:52:25.901>listens <00:52:26.134>to <00:52:26.368>the <00:52:26.601>action <00:52:26.835>channel

831
00:52:28.635 --> 00:52:30.655
<00:52:28.635>and <00:52:28.835>gets <00:52:29.035>an <00:52:29.235>action, <00:52:29.435>which <00:52:29.635>is <00:52:29.835>a <00:52:30.035>function

832
00:52:31.315 --> 00:52:33.135
<00:52:31.315>and <00:52:31.665>simply <00:52:32.015>executes <00:52:32.365>this <00:52:32.715>function.

833
00:52:35.115 --> 00:52:39.935
<00:52:35.115>And, <00:52:35.581>um, <00:52:36.048>then, <00:52:36.515>uh,

834
00:52:40.735 --> 00:52:42.735
<00:52:40.735>a <00:52:41.015>little <00:52:41.295>help <00:52:41.575>function <00:52:41.855>that <00:52:42.135>cares

835
00:52:42.755 --> 00:52:45.415
<00:52:42.755>for <00:52:42.930>the <00:52:43.105>context <00:52:43.280>if <00:52:43.455>the <00:52:43.630>context <00:52:43.805>is <00:52:43.980>already <00:52:44.155>closed,

836
00:52:45.885 --> 00:52:49.175
<00:52:45.885>that <00:52:46.012>I <00:52:46.139>can <00:52:46.266>check <00:52:46.394>if <00:52:46.521>there's <00:52:46.648>an <00:52:46.775>error <00:52:46.903>and <00:52:47.030>return <00:52:47.157>this <00:52:47.285>error.

837
00:52:49.175 --> 00:52:52.975
<00:52:49.175>Otherwise, <00:52:49.350>I <00:52:49.525>certainly <00:52:49.700>sent <00:52:49.875>a <00:52:50.050>function <00:52:50.225>to <00:52:50.400>my <00:52:50.575>backend.

838
00:52:54.155 --> 00:52:58.675
<00:52:54.155>And <00:52:54.310>so <00:52:54.466>now <00:52:54.621>this <00:52:54.777>ad <00:52:54.932>function, <00:52:55.088>which <00:52:55.243>I <00:52:55.399>read, <00:52:55.555>uh,

839
00:52:58.775 --> 00:53:01.875
<00:52:58.775>had <00:52:59.055>been <00:52:59.335>in <00:52:59.615>for <00:52:59.895>two <00:53:00.175>parts

840
00:53:02.695 --> 00:53:06.115
<00:53:02.695>in <00:53:02.835>the <00:53:02.975>earlier <00:53:03.115>example, <00:53:03.255>is <00:53:03.395>now <00:53:03.535>in <00:53:03.675>one <00:53:03.815>part <00:53:03.955>it <00:53:04.095>is

841
00:53:06.115 --> 00:53:10.235
<00:53:06.115>that <00:53:06.270>I <00:53:06.426>simply <00:53:06.581>say, <00:53:06.737>uh, <00:53:06.892>here <00:53:07.048>my <00:53:07.203>little <00:53:07.359>actor <00:53:07.515>do,

842
00:53:10.655 --> 00:53:14.595
<00:53:10.655>and <00:53:10.782>then <00:53:10.909>I <00:53:11.036>send <00:53:11.164>a <00:53:11.291>function <00:53:11.418>where <00:53:11.545>I <00:53:11.673>do <00:53:11.800>my <00:53:11.927>business <00:53:12.055>logic.

843
00:53:15.535 --> 00:53:17.755
<00:53:15.535>And, <00:53:15.815>um, <00:53:16.095>if <00:53:16.375>everything <00:53:16.654>is <00:53:16.935>fine,

844
00:53:18.255 --> 00:53:20.555
<00:53:18.255>my <00:53:18.535>return <00:53:18.815>values <00:53:19.095>are <00:53:19.375>already <00:53:19.655>set.

845
00:53:21.215 --> 00:53:22.955
<00:53:21.215>You, <00:53:21.495>you <00:53:21.775>can <00:53:22.055>see <00:53:22.335>it <00:53:22.615>here.

846
00:53:23.255 --> 00:53:28.205
<00:53:23.255>And, <00:53:23.430>uh, <00:53:23.605>if <00:53:23.780>my, <00:53:23.955>um, <00:53:24.130>due <00:53:24.305>calling <00:53:24.480>is <00:53:24.655>wrong

847
00:53:28.425 --> 00:53:31.645
<00:53:28.425>or <00:53:28.580>has <00:53:28.736>had <00:53:28.891>is <00:53:29.047>an <00:53:29.202>error, <00:53:29.358>um, <00:53:29.513>then <00:53:29.669>I <00:53:29.825>will,

848
00:53:31.835 --> 00:53:33.725
<00:53:31.835>will <00:53:32.068>return <00:53:32.301>this <00:53:32.535>error <00:53:32.768>in <00:53:33.001>the <00:53:33.235>end.

849
00:53:34.265 --> 00:53:35.645
<00:53:34.265>So <00:53:34.513>it's <00:53:34.761>a <00:53:35.010>more <00:53:35.258>simple <00:53:35.507>one,

850
00:53:36.505 --> 00:53:38.605
<00:53:36.505>but <00:53:36.705>I'm <00:53:36.905>not <00:53:37.105>yet <00:53:37.305>done <00:53:37.505>with <00:53:37.705>the <00:53:37.905>slides,

851
00:53:38.665 --> 00:53:40.885
<00:53:38.665>but <00:53:38.865>the <00:53:39.065>time <00:53:39.265>is, <00:53:39.465>I <00:53:39.665>think <00:53:39.865>it's <00:53:40.065>over.

852
00:53:42.665 --> 00:53:46.925
<00:53:42.665>Uh, <00:53:42.945>if <00:53:43.225>you <00:53:43.505>still <00:53:43.785>listening, <00:53:44.065>yes.

853
00:53:47.795 --> 00:53:49.365
<00:53:47.795>Yeah, <00:53:48.075>yeah. <00:53:48.355>People <00:53:48.635>are <00:53:48.915>still <00:53:49.195>listening.

854
00:53:49.425 --> 00:53:52.565
<00:53:49.425>Uh, <00:53:49.580>I <00:53:49.736>just <00:53:49.891>wanted, <00:53:50.047>uh, <00:53:50.202>to <00:53:50.358>say <00:53:50.513>I <00:53:50.669>am, <00:53:50.825>uh,

855
00:53:52.865 --> 00:53:55.285
<00:53:52.865>you <00:53:53.020>have <00:53:53.176>full <00:53:53.331>screen <00:53:53.487>I <00:53:53.642>think <00:53:53.798>when <00:53:53.953>you <00:53:54.109>are <00:53:54.265>streaming.

856
00:53:55.305 --> 00:53:59.525
<00:53:55.305>So, <00:53:55.480>uh, <00:53:55.654>you <00:53:55.830>didn't <00:53:56.004>see <00:53:56.180>my <00:53:56.355>appearance, <00:53:56.529>so <00:53:56.705>I,

857
00:53:59.605 --> 00:54:01.805
<00:53:59.605>I <00:53:59.760>will <00:53:59.916>let <00:54:00.071>you <00:54:00.227>get <00:54:00.382>back <00:54:00.538>to <00:54:00.693>your <00:54:00.849>summary <00:54:01.005>quickly

858
00:54:01.945 --> 00:54:04.705
<00:54:01.945>and <00:54:02.145>be <00:54:02.345>back <00:54:02.545>with <00:54:02.745>you <00:54:02.945>in <00:54:03.145>one <00:54:03.345>minute.

859
00:54:07.255 --> 00:54:11.235
<00:54:07.255>Pardon? <00:54:07.410>I <00:54:07.566>will <00:54:07.721>be <00:54:07.877>back <00:54:08.032>with <00:54:08.188>you <00:54:08.343>in <00:54:08.499>one <00:54:08.655>minute.

860
00:54:11.515 --> 00:54:14.195
<00:54:11.515>I <00:54:11.714>will <00:54:11.915>let <00:54:12.115>you <00:54:12.315>summary <00:54:12.515>summarize <00:54:12.714>briefly <00:54:12.915>now.

861
00:54:15.205 --> 00:54:17.775
<00:54:15.205>Okay, <00:54:16.605>good.

862
00:54:19.195 --> 00:54:22.495
<00:54:19.195>So <00:54:19.370>I <00:54:19.545>will <00:54:19.720>use <00:54:19.895>this <00:54:20.070>this <00:54:20.245>last <00:54:20.420>time <00:54:20.595>here.

863
00:54:22.495 --> 00:54:24.055
<00:54:22.495>Summary <00:54:22.961>is <00:54:23.428>okay, <00:54:23.895>and,

864
00:54:24.115 --> 00:54:28.695
<00:54:24.115>and, <00:54:24.242>uh, <00:54:24.369>you <00:54:24.496>can <00:54:24.624>create <00:54:24.751>this <00:54:24.878>as <00:54:25.005>an, <00:54:25.133>as <00:54:25.260>an <00:54:25.387>extra <00:54:25.515>little,

865
00:54:28.995 --> 00:54:31.775
<00:54:28.995>uh, <00:54:29.275>helper <00:54:29.555>and <00:54:29.835>use <00:54:30.115>this <00:54:30.395>again.

866
00:54:32.115 --> 00:54:36.735
<00:54:32.115>And <00:54:32.270>so <00:54:32.426>all <00:54:32.581>your, <00:54:32.737>uh, <00:54:32.892>future <00:54:33.048>code <00:54:33.203>for, <00:54:33.359>uh, <00:54:33.515>concurrent

867
00:54:37.415 --> 00:54:39.415
<00:54:37.415>services <00:54:37.695>is <00:54:37.975>by <00:54:38.255>far <00:54:38.535>more <00:54:38.815>simple

868
00:54:39.995 --> 00:54:43.495
<00:54:39.995>and <00:54:40.122>can <00:54:40.249>be <00:54:40.376>even <00:54:40.504>by <00:54:40.631>far <00:54:40.758>more <00:54:40.885>flexible <00:54:41.013>if <00:54:41.140>you, <00:54:41.267>for <00:54:41.395>example,

869
00:54:43.675 --> 00:54:46.175
<00:54:43.675>add <00:54:43.875>a <00:54:44.075>little, <00:54:44.275>uh, <00:54:44.475>as <00:54:44.675>in <00:54:44.875>Kronos <00:54:45.075>worker.

870
00:54:47.205 --> 00:54:51.615
<00:54:47.205>Yeah, <00:54:47.345>I <00:54:47.485>have, <00:54:47.625>you <00:54:47.765>will <00:54:47.904>get <00:54:48.045>the <00:54:48.185>slides <00:54:48.325>on <00:54:48.465>the <00:54:48.605>slides.

871
00:54:51.615 --> 00:54:54.255
<00:54:51.615>There's <00:54:51.790>also <00:54:51.964>an <00:54:52.140>example <00:54:52.314>from <00:54:52.490>how <00:54:52.665>to <00:54:52.839>do <00:54:53.015>supervising

872
00:54:54.435 --> 00:54:56.415
<00:54:54.435>and <00:54:54.901>there's <00:54:55.368>some <00:54:55.835>pitfalls.

873
00:54:56.755 --> 00:55:01.575
<00:54:56.755>And, <00:54:56.955>uh, <00:54:57.155>so <00:54:57.355>let's <00:54:57.555>only <00:54:57.755>very <00:54:57.955>quick <00:54:58.155>jump

874
00:55:01.835 --> 00:55:05.575
<00:55:01.835>to <00:55:02.185>the <00:55:02.535>very <00:55:02.885>last <00:55:03.235>slide.

875
00:55:07.275 --> 00:55:09.935
<00:55:07.275>Uh, <00:55:07.741>so <00:55:08.208>final <00:55:08.675>summary.

876
00:55:11.595 --> 00:55:14.935
<00:55:11.595>Uh, <00:55:11.734>the <00:55:11.875>power <00:55:12.015>of <00:55:12.154>con, <00:55:12.294>uh, <00:55:12.435>concurrency <00:55:12.575>seems <00:55:12.714>to <00:55:12.855>be <00:55:12.995>complex.

877
00:55:15.235 --> 00:55:19.855
<00:55:15.235>Uh, <00:55:15.390>the <00:55:15.546>beginning, <00:55:15.701>um, <00:55:15.857>even, <00:55:16.012>especially <00:55:16.168>when <00:55:16.323>you <00:55:16.479>jump <00:55:16.635>very

878
00:55:20.865 --> 00:55:24.935
<00:55:20.865>first <00:55:21.040>time <00:55:21.214>into <00:55:21.390>it, <00:55:21.564>uh, <00:55:21.740>the <00:55:21.915>possibilities, <00:55:22.089>you <00:55:22.265>get

879
00:55:25.645 --> 00:55:27.255
<00:55:25.645>many <00:55:25.925>food, <00:55:26.205>so <00:55:26.485>it's <00:55:26.765>worth <00:55:27.045>it.

880
00:55:27.955 --> 00:55:32.855
<00:55:27.955>Um, <00:55:28.305>and <00:55:28.654>like <00:55:29.005>principle, <00:55:29.355>uh,

881
00:55:33.645 --> 00:55:37.895
<00:55:33.645>most, <00:55:33.845>uh, <00:55:34.045>uh, <00:55:34.245>use <00:55:34.445>cases <00:55:34.645>can <00:55:34.845>be <00:55:35.045>done

882
00:55:37.895 --> 00:55:39.095
<00:55:37.895>with <00:55:38.165>only <00:55:38.435>a <00:55:38.705>few <00:55:38.975>patterns.

883
00:55:39.275 --> 00:55:43.855
<00:55:39.275>So <00:55:39.415>if <00:55:39.555>you <00:55:39.695>have <00:55:39.835>those <00:55:39.975>interests, <00:55:40.115>it's <00:55:40.255>uh, <00:55:40.395>quite <00:55:40.535>simple, <00:55:40.675>uh,

884
00:55:44.285 --> 00:55:48.895
<00:55:44.285>here <00:55:44.460>own <00:55:44.634>or <00:55:44.810>third <00:55:44.984>party <00:55:45.160>packages <00:55:45.335>which <00:55:45.509>are <00:55:45.685>available.

885
00:55:49.315 --> 00:55:52.575
<00:55:49.315>Uh, <00:55:49.595>for <00:55:49.875>example, <00:55:50.155>for <00:55:50.435>me, <00:55:50.715>uh,

886
00:55:53.235 --> 00:55:54.455
<00:55:53.235>reduce <00:55:53.601>the <00:55:53.967>work <00:55:54.333>here.

887
00:55:54.835 --> 00:55:58.895
<00:55:54.835>And, <00:55:55.115>uh, <00:55:55.395>the <00:55:55.675>more <00:55:55.955>hard <00:55:56.235>task

888
00:55:58.995 --> 00:56:01.495
<00:55:58.995>to <00:55:59.194>do <00:55:59.395>is <00:55:59.595>the <00:55:59.795>design <00:55:59.995>of <00:56:00.194>elastic <00:56:00.395>software,

889
00:56:02.465 --> 00:56:06.615
<00:56:02.465>which <00:56:02.665>requires <00:56:02.865>a <00:56:03.065>bit <00:56:03.265>more <00:56:03.465>of <00:56:03.665>natural <00:56:03.865>rethink

890
00:56:07.035 --> 00:56:08.455
<00:56:07.035>of, <00:56:07.461>uh, <00:56:07.886>the <00:56:08.313>components.

891
00:56:10.115 --> 00:56:13.135
<00:56:10.115>Thanks <00:56:10.348>for <00:56:10.581>listening <00:56:10.814>and <00:56:11.048>have <00:56:11.281>a <00:56:11.515>nice.