WEBVTT

1
00:00:03.305 --> 00:00:05.005
<00:00:03.305>So <00:00:04.005>hello <00:00:04.705>everyone.

2
00:00:05.225 --> 00:00:07.525
<00:00:05.225>I'm <00:00:05.425>really <00:00:05.625>happy <00:00:05.824>to <00:00:06.024>give <00:00:06.225>this <00:00:06.425>talk <00:00:06.625>today.

3
00:00:09.175 --> 00:00:12.485
<00:00:09.175>Let's <00:00:09.408>introduce <00:00:09.641>myself <00:00:09.875>a <00:00:10.108>bit. <00:00:10.341>I'm <00:00:10.575>Patrick.

4
00:00:12.985 --> 00:00:15.285
<00:00:12.985>I'm <00:00:13.218>working <00:00:13.451>as <00:00:13.684>a <00:00:13.918>senior <00:00:14.151>software <00:00:14.385>engineer,

5
00:00:15.685 --> 00:00:17.885
<00:00:15.685>technique <00:00:15.885>software <00:00:16.085>architect, <00:00:16.285>however <00:00:16.485>you <00:00:16.685>wanna <00:00:16.885>call <00:00:17.085>it.

6
00:00:18.825 --> 00:00:21.525
<00:00:18.825>My <00:00:19.105>responsibilities <00:00:19.384>are <00:00:19.665>building <00:00:19.945>a <00:00:20.224>platform

7
00:00:21.525 --> 00:00:23.085
<00:00:21.525>as <00:00:21.758>a <00:00:21.991>service <00:00:22.224>in <00:00:22.458>our <00:00:22.691>own <00:00:22.924>cloud.

8
00:00:23.345 --> 00:00:25.085
<00:00:23.345>That's <00:00:23.578>why <00:00:23.811>I <00:00:24.044>have <00:00:24.278>a <00:00:24.511>stack <00:00:24.744>T-shirt.

9
00:00:25.225 --> 00:00:28.085
<00:00:25.225>Our <00:00:25.380>cloud <00:00:25.536>is <00:00:25.691>called <00:00:25.847>Stack <00:00:26.002>It, <00:00:26.158>it's <00:00:26.313>a <00:00:26.469>European <00:00:26.625>cloud.

10
00:00:29.265 --> 00:00:31.765
<00:00:29.265>And <00:00:29.420>in <00:00:29.576>there <00:00:29.731>I <00:00:29.887>have <00:00:30.042>the <00:00:30.198>services <00:00:30.353>like <00:00:30.509>an <00:00:30.665>observability

11
00:00:31.765 --> 00:00:35.725
<00:00:31.765>service <00:00:31.965>similar <00:00:32.165>to <00:00:32.365>AWS <00:00:32.564>CloudWatch, <00:00:32.765>some <00:00:32.965>DNS <00:00:33.165>service.

12
00:00:36.465 --> 00:00:38.485
<00:00:36.465>And <00:00:36.665>now <00:00:36.865>I'm <00:00:37.065>in <00:00:37.265>the <00:00:37.465>hype <00:00:37.665>of <00:00:37.865>ai.

13
00:00:38.625 --> 00:00:40.965
<00:00:38.625>That's <00:00:38.800>why <00:00:38.975>we <00:00:39.150>are <00:00:39.325>building <00:00:39.500>LLM <00:00:39.675>as <00:00:39.850>a <00:00:40.025>service.

14
00:00:41.905 --> 00:00:44.405
<00:00:41.905>Um, <00:00:42.080>but <00:00:42.255>I'm <00:00:42.430>not <00:00:42.605>giving <00:00:42.780>an <00:00:42.955>AI <00:00:43.130>talk <00:00:43.305>unfortunately.

15
00:00:45.905 --> 00:00:50.285
<00:00:45.905>So <00:00:46.032>we <00:00:46.159>will <00:00:46.286>stick <00:00:46.414>with <00:00:46.541>real <00:00:46.668>programming <00:00:46.795>and <00:00:46.923>see <00:00:47.050>how <00:00:47.177>it <00:00:47.305>goes.

16
00:00:51.025 --> 00:00:52.925
<00:00:51.025>In <00:00:51.258>my <00:00:51.491>free <00:00:51.725>time, <00:00:51.958>I'm <00:00:52.191>giving <00:00:52.425>lectures,

17
00:00:53.425 --> 00:00:55.005
<00:00:53.425>one <00:00:53.891>is <00:00:54.358>about <00:00:54.824>databases.

18
00:00:55.105 --> 00:00:57.365
<00:00:55.105>That's <00:00:55.279>why <00:00:55.455>I <00:00:55.629>also <00:00:55.805>have <00:00:55.980>written <00:00:56.154>my <00:00:56.330>own <00:00:56.504>database.

19
00:00:57.365 --> 00:00:59.485
<00:00:57.365>It's <00:00:57.645>called <00:00:57.925>Patrick <00:00:58.205>DB <00:00:58.485>in <00:00:58.765>Rust.

20
00:01:00.435 --> 00:01:01.445
<00:01:00.435>Obviously <00:01:00.889>that's <00:01:01.344>we,

21
00:01:01.445 --> 00:01:04.365
<00:01:01.445>that's <00:01:01.620>why <00:01:01.795>we <00:01:01.970>see <00:01:02.145>some <00:01:02.320>code <00:01:02.495>examples <00:01:02.670>from <00:01:02.845>it.

22
00:01:05.705 --> 00:01:09.165
<00:01:05.705>And <00:01:05.860>if <00:01:06.016>you <00:01:06.171>like <00:01:06.327>reading <00:01:06.482>blog <00:01:06.638>posts <00:01:06.793>about <00:01:06.949>programming <00:01:07.105>system

23
00:01:09.185 --> 00:01:12.525
<00:01:09.185>design <00:01:09.385>or <00:01:09.585>architecture, <00:01:09.785>I'm <00:01:09.985>writing <00:01:10.185>them <00:01:10.385>on <00:01:10.585>medium

24
00:01:12.705 --> 00:01:13.805
<00:01:12.705>so <00:01:12.903>you <00:01:13.101>can <00:01:13.299>find <00:01:13.497>me <00:01:13.695>there.

25
00:01:14.515 --> 00:01:15.645
<00:01:14.515>Also, <00:01:15.023>a <00:01:15.532>lot

26
00:01:15.645 --> 00:01:19.045
<00:01:15.645>of <00:01:15.772>this <00:01:15.899>content <00:01:16.026>in <00:01:16.154>the <00:01:16.281>Talk <00:01:16.408>is <00:01:16.535>published <00:01:16.663>on <00:01:16.790>Medium <00:01:16.917>as <00:01:17.045>well.

27
00:01:19.985 --> 00:01:22.565
<00:01:19.985>And <00:01:20.125>if <00:01:20.265>you <00:01:20.405>want <00:01:20.545>to <00:01:20.685>connect <00:01:20.825>with <00:01:20.965>me, <00:01:21.105>LinkedIn <00:01:21.245>is <00:01:21.385>my

28
00:01:23.305 --> 00:01:24.685
<00:01:23.305>social <00:01:23.926>media <00:01:24.547>platform.

29
00:01:25.665 --> 00:01:29.125
<00:01:25.664>So <00:01:25.792>what <00:01:25.919>led <00:01:26.046>to <00:01:26.174>the <00:01:26.301>talk, <00:01:26.428>I'm <00:01:26.555>a <00:01:26.683>big <00:01:26.810>fan <00:01:26.937>of <00:01:27.065>Rust.

30
00:01:29.285 --> 00:01:31.205
<00:01:29.285>I <00:01:29.460>fell <00:01:29.634>into <00:01:29.810>the <00:01:29.985>hype <00:01:30.160>because <00:01:30.335>I <00:01:30.509>saw, <00:01:30.685>oh,

31
00:01:31.205 --> 00:01:32.965
<00:01:31.205>it's <00:01:31.554>the <00:01:31.905>most <00:01:32.255>loved <00:01:32.605>language

32
00:01:33.105 --> 00:01:35.365
<00:01:33.104>for <00:01:33.338>years <00:01:33.571>now <00:01:33.804>in <00:01:34.038>the <00:01:34.271>stick <00:01:34.505>overflow

33
00:01:35.365 --> 00:01:36.765
<00:01:35.365>survey <00:01:35.680>you <00:01:35.995>might <00:01:36.310>know <00:01:36.625>that.

34
00:01:37.985 --> 00:01:41.645
<00:01:37.985>So <00:01:38.140>I <00:01:38.296>tried <00:01:38.451>it <00:01:38.607>out <00:01:38.762>and <00:01:38.918>it <00:01:39.073>was <00:01:39.229>really <00:01:39.385>cool.

35
00:01:42.055 --> 00:01:46.885
<00:01:42.055>First, <00:01:42.255>it <00:01:42.455>was <00:01:42.655>really <00:01:42.855>a <00:01:43.055>disappointing <00:01:43.255>uh, <00:01:43.455>experience

36
00:01:46.885 --> 00:01:50.405
<00:01:46.884>because <00:01:47.040>the <00:01:47.196>borrow <00:01:47.351>check <00:01:47.507>is <00:01:47.662>really <00:01:47.818>hard <00:01:47.973>to <00:01:48.129>get, <00:01:48.285>but

37
00:01:50.405 --> 00:01:53.445
<00:01:50.405>after <00:01:50.638>that <00:01:50.871>you <00:01:51.105>will <00:01:51.338>appreciate <00:01:51.571>the <00:01:51.805>safety.

38
00:01:54.055 --> 00:01:56.205
<00:01:54.055>Maybe <00:01:54.335>also <00:01:54.615>the <00:01:54.895>performance, <00:01:55.175>who <00:01:55.455>knows?

39
00:01:57.505 --> 00:02:02.325
<00:01:57.505>So <00:01:57.971>currently <00:01:58.438>there's <00:01:58.905>Um,

40
00:02:02.525 --> 00:02:05.925
<00:02:02.525>a <00:02:02.665>couple <00:02:02.805>of <00:02:02.945>selected <00:02:03.085>areas <00:02:03.225>where <00:02:03.365>you <00:02:03.505>see <00:02:03.645>rust, <00:02:03.785>for <00:02:03.925>example,

41
00:02:05.945 --> 00:02:08.765
<00:02:05.945>crypto, <00:02:06.178>maybe <00:02:06.411>a <00:02:06.645>data <00:02:06.878>transformation <00:02:07.111>and <00:02:07.345>ai,

42
00:02:09.465 --> 00:02:11.085
<00:02:09.465>but <00:02:09.698>not <00:02:09.931>so <00:02:10.164>much <00:02:10.398>in <00:02:10.631>the <00:02:10.865>web.

43
00:02:11.185 --> 00:02:15.045
<00:02:11.185>But <00:02:11.312>I'm <00:02:11.439>a <00:02:11.566>web <00:02:11.694>developer <00:02:11.821>so <00:02:11.948>I <00:02:12.075>use <00:02:12.203>it <00:02:12.330>for <00:02:12.457>backend <00:02:12.585>stuff.

44
00:02:16.665 --> 00:02:19.885
<00:02:16.665>And <00:02:16.864>let <00:02:17.065>me <00:02:17.265>explain <00:02:17.465>why <00:02:17.665>it's <00:02:17.864>so <00:02:18.065>great

45
00:02:19.885 --> 00:02:20.925
<00:02:19.885>for <00:02:20.353>backend <00:02:20.821>development.

46
00:02:20.925 --> 00:02:22.205
<00:02:20.925>That's <00:02:21.117>the <00:02:21.309>first <00:02:21.501>part <00:02:21.692>of <00:02:21.885>the <00:02:22.077>talk.

47
00:02:22.225 --> 00:02:24.365
<00:02:22.225>And <00:02:22.424>after <00:02:22.625>that <00:02:22.825>we <00:02:23.025>are <00:02:23.225>looking <00:02:23.424>into <00:02:23.625>frameworks

48
00:02:24.365 --> 00:02:25.845
<00:02:24.365>and <00:02:24.587>how <00:02:24.809>to <00:02:25.031>build <00:02:25.253>a <00:02:25.475>web <00:02:25.697>effort.

49
00:02:27.425 --> 00:02:30.845
<00:02:27.425>So <00:02:27.658>what <00:02:27.891>makes <00:02:28.125>frustrated, <00:02:28.358>I <00:02:28.591>think <00:02:28.825>one

50
00:02:30.845 --> 00:02:32.365
<00:02:30.845>of <00:02:31.118>the <00:02:31.392>things <00:02:31.665>is <00:02:31.939>error <00:02:32.213>handling

51
00:02:32.595 --> 00:02:34.845
<00:02:32.595>because <00:02:32.795>here <00:02:32.995>you <00:02:33.195>see <00:02:33.395>a <00:02:33.595>couple <00:02:33.795>of <00:02:33.995>examples.

52
00:02:35.105 --> 00:02:38.685
<00:02:35.105>The <00:02:35.260>one <00:02:35.416>is <00:02:35.571>from <00:02:35.727>JavaScript, <00:02:35.882>if <00:02:36.038>you <00:02:36.193>pass <00:02:36.349>uh, <00:02:36.505>J,

53
00:02:38.985 --> 00:02:41.245
<00:02:38.985>so <00:02:39.185>you're <00:02:39.385>getting <00:02:39.585>request <00:02:39.785>data <00:02:39.985>from <00:02:40.185>some <00:02:40.385>user

54
00:02:41.985 --> 00:02:44.925
<00:02:41.985>and <00:02:42.140>then <00:02:42.296>try <00:02:42.451>to <00:02:42.607>un <00:02:42.762>marsh <00:02:42.918>it <00:02:43.073>or <00:02:43.229>decellularize <00:02:43.385>it

55
00:02:44.925 --> 00:02:46.765
<00:02:44.925>or <00:02:45.125>you <00:02:45.325>wanna <00:02:45.525>call <00:02:45.725>it <00:02:45.925>into <00:02:46.125>a <00:02:46.325>glass,

56
00:02:46.875 --> 00:02:48.245
<00:02:46.875>into <00:02:47.183>a <00:02:47.491>extract <00:02:47.799>or <00:02:48.108>whatever.

57
00:02:49.785 --> 00:02:51.045
<00:02:49.785>And <00:02:49.974>most <00:02:50.163>of <00:02:50.352>the <00:02:50.541>time <00:02:50.730>it <00:02:50.919>works.

58
00:02:51.185 --> 00:02:52.685
<00:02:51.185>So <00:02:51.377>if <00:02:51.570>the <00:02:51.763>user <00:02:51.956>is <00:02:52.149>sending <00:02:52.342>correct <00:02:52.535>data,

59
00:02:52.785 --> 00:02:53.845
<00:02:52.785>it <00:02:53.103>works <00:02:53.421>as <00:02:53.739>expected.

60
00:02:54.505 --> 00:02:57.045
<00:02:54.505>But <00:02:54.660>what <00:02:54.816>happens <00:02:54.971>if <00:02:55.127>the <00:02:55.282>user <00:02:55.438>is <00:02:55.593>sending <00:02:55.749>wrong <00:02:55.905>data?

61
00:02:57.175 --> 00:02:58.605
<00:02:57.175>Maybe <00:02:57.604>it's <00:02:58.033>ill <00:02:58.462>formatted.

62
00:02:59.145 --> 00:03:00.365
<00:02:59.145>If <00:02:59.419>you <00:02:59.694>go <00:02:59.968>to <00:03:00.243>Postman

63
00:03:00.745 --> 00:03:05.045
<00:03:00.745>and <00:03:00.900>write <00:03:01.056>down <00:03:01.211>your <00:03:01.367>J <00:03:01.522>without <00:03:01.678>the <00:03:01.833>commas, <00:03:01.989>it'll <00:03:02.145>highlight,

64
00:03:05.045 --> 00:03:07.245
<00:03:05.045>oh <00:03:05.184>no, <00:03:05.325>this <00:03:05.464>is <00:03:05.605>wrong, <00:03:05.744>but <00:03:05.885>you <00:03:06.024>can <00:03:06.165>still <00:03:06.304>send <00:03:06.445>it.

65
00:03:07.755 --> 00:03:11.325
<00:03:07.755>Then <00:03:07.954>the <00:03:08.155>server <00:03:08.355>gets <00:03:08.555>it <00:03:08.755>and <00:03:08.954>frozen <00:03:09.155>error.

66
00:03:11.385 --> 00:03:13.205
<00:03:11.385>That's <00:03:11.560>what <00:03:11.734>happened <00:03:11.910>to <00:03:12.084>me <00:03:12.260>in <00:03:12.435>the <00:03:12.609>Python <00:03:12.785>world.

67
00:03:13.205 --> 00:03:14.605
<00:03:13.205>That's <00:03:13.415>why <00:03:13.625>we <00:03:13.835>see <00:03:14.045>this <00:03:14.255>three <00:03:14.465>request.

68
00:03:14.605 --> 00:03:16.045
<00:03:14.605>The <00:03:14.929>data <00:03:15.253>is <00:03:15.577>from <00:03:15.901>Django

69
00:03:16.545 --> 00:03:18.805
<00:03:16.545>and <00:03:16.700>I <00:03:16.856>was <00:03:17.011>really <00:03:17.167>surprised <00:03:17.322>that <00:03:17.478>it <00:03:17.633>could <00:03:17.789>actually <00:03:17.945>error

70
00:03:18.905 --> 00:03:20.605
<00:03:18.905>and <00:03:19.138>throw <00:03:19.371>in <00:03:19.605>500 <00:03:19.838>in <00:03:20.071>my <00:03:20.305>server.

71
00:03:21.035 --> 00:03:23.765
<00:03:21.035>This <00:03:21.174>was <00:03:21.315>kind <00:03:21.454>of <00:03:21.595>unexpected <00:03:21.734>and <00:03:21.875>I <00:03:22.015>really <00:03:22.155>didn't <00:03:22.295>like <00:03:22.435>it.

72
00:03:25.385 --> 00:03:26.965
<00:03:25.385>So <00:03:25.851>as <00:03:26.318>an <00:03:26.785>alternative

73
00:03:27.105 --> 00:03:29.005
<00:03:27.105>for <00:03:27.385>this <00:03:27.665>exception <00:03:27.945>stuff <00:03:28.225>there <00:03:28.505>is

74
00:03:29.005 --> 00:03:30.405
<00:03:29.005>returning <00:03:29.257>an <00:03:29.509>error <00:03:29.761>as <00:03:30.013>a <00:03:30.265>value.

75
00:03:30.405 --> 00:03:33.445
<00:03:30.405>That's <00:03:30.580>what <00:03:30.755>with <00:03:30.930>Russ <00:03:31.105>doing. <00:03:31.280>There <00:03:31.455>we <00:03:31.630>have <00:03:31.805>results.

76
00:03:33.925 --> 00:03:35.965
<00:03:33.925>A <00:03:34.100>result <00:03:34.275>is <00:03:34.450>returning <00:03:34.625>a <00:03:34.800>value <00:03:34.975>and <00:03:35.150>an <00:03:35.325>error

77
00:03:36.105 --> 00:03:37.885
<00:03:36.105>and <00:03:36.304>you <00:03:36.505>always <00:03:36.704>have <00:03:36.905>to <00:03:37.105>handle <00:03:37.304>the <00:03:37.505>error.

78
00:03:38.435 --> 00:03:40.765
<00:03:38.435>This <00:03:38.590>makes <00:03:38.746>it <00:03:38.901>kind <00:03:39.057>of <00:03:39.212>great <00:03:39.368>that <00:03:39.523>you <00:03:39.679>can <00:03:39.835>write

79
00:03:41.715 --> 00:03:44.325
<00:03:41.715>perfectly <00:03:41.995>coded <00:03:42.275>will <00:03:42.555>never <00:03:42.835>crash <00:03:43.115>unexpectedly.

80
00:03:46.435 --> 00:03:48.805
<00:03:46.435>Another <00:03:46.715>thing <00:03:46.995>is <00:03:47.275>the <00:03:47.555>mutual <00:03:47.835>ability.

81
00:03:49.995 --> 00:03:52.245
<00:03:49.995>This <00:03:50.195>is <00:03:50.395>one <00:03:50.595>thing <00:03:50.795>I <00:03:50.995>encountered <00:03:51.195>just <00:03:51.395>recently

82
00:03:53.065 --> 00:03:54.405
<00:03:53.065>and <00:03:53.366>the <00:03:53.668>first <00:03:53.969>code <00:03:54.271>snippet

83
00:03:54.405 --> 00:03:55.965
<00:03:54.405>with <00:03:54.638>this <00:03:54.871>new <00:03:55.105>stack <00:03:55.338>at <00:03:55.571>DNS <00:03:55.805>client,

84
00:03:57.065 --> 00:03:59.405
<00:03:57.065>we <00:03:57.265>have <00:03:57.465>built <00:03:57.665>an <00:03:57.865>extension <00:03:58.065>for <00:03:58.265>external <00:03:58.465>DNS

85
00:03:59.545 --> 00:04:04.445
<00:03:59.545>and <00:03:59.685>built <00:03:59.825>a <00:03:59.965>risk <00:04:00.105>client <00:04:00.245>to <00:04:00.385>send <00:04:00.525>request <00:04:00.665>to <00:04:00.805>our <00:04:00.945>D-N-S-A-P-I

86
00:04:04.445 --> 00:04:07.005
<00:04:04.445>and <00:04:04.620>stack <00:04:04.795>it <00:04:04.970>to <00:04:05.144>create <00:04:05.320>records <00:04:05.495>in <00:04:05.670>a <00:04:05.845>zone.

87
00:04:07.775 --> 00:04:10.885
<00:04:07.775>First <00:04:07.915>we <00:04:08.055>created <00:04:08.195>our <00:04:08.335>own <00:04:08.475>client <00:04:08.615>with <00:04:08.755>an <00:04:08.895>standard <00:04:09.035>HDP <00:04:09.175>client.

88
00:04:11.265 --> 00:04:14.885
<00:04:11.265>That's <00:04:11.404>why <00:04:11.545>we <00:04:11.684>are <00:04:11.825>seeing <00:04:11.964>a <00:04:12.105>stack <00:04:12.244>config <00:04:12.385>with <00:04:12.524>HTTP <00:04:12.665>client

89
00:04:14.985 --> 00:04:18.885
<00:04:14.985>and <00:04:15.125>we <00:04:15.265>are <00:04:15.405>passing <00:04:15.545>a <00:04:15.685>pointer <00:04:15.825>with <00:04:15.965>this <00:04:16.105>HTTP <00:04:16.245>client <00:04:16.385>drug,

90
00:04:20.145 --> 00:04:23.845
<00:04:20.144>but <00:04:20.320>after <00:04:20.495>some <00:04:20.669>while <00:04:20.844>the <00:04:21.019>stick <00:04:21.195>SK <00:04:21.370>was <00:04:21.544>published.

91
00:04:23.985 --> 00:04:26.485
<00:04:23.985>So <00:04:24.185>it's <00:04:24.385>a <00:04:24.585>wrap <00:04:24.785>with <00:04:24.985>some <00:04:25.185>nice <00:04:25.385>features.

92
00:04:27.145 --> 00:04:29.965
<00:04:27.145>So <00:04:27.320>we <00:04:27.495>replaced <00:04:27.669>our <00:04:27.844>own <00:04:28.020>implementation <00:04:28.195>with <00:04:28.370>this <00:04:28.544>SDK

93
00:04:31.625 --> 00:04:34.765
<00:04:31.625>and <00:04:31.825>suddenly <00:04:32.025>all <00:04:32.225>of <00:04:32.425>our <00:04:32.625>tests <00:04:32.825>were <00:04:33.025>failing

94
00:04:34.765 --> 00:04:36.605
<00:04:34.765>because <00:04:35.044>they <00:04:35.325>detected <00:04:35.604>a <00:04:35.885>race <00:04:36.164>condition.

95
00:04:36.705 --> 00:04:40.325
<00:04:36.705>And <00:04:36.860>I <00:04:37.016>was <00:04:37.171>like, <00:04:37.327>how, <00:04:37.482>why? <00:04:37.638>That's <00:04:37.793>kind <00:04:37.949>of <00:04:38.104>unexpected.

96
00:04:40.905 --> 00:04:43.685
<00:04:40.905>And <00:04:41.044>what <00:04:41.184>happened <00:04:41.325>under <00:04:41.465>the <00:04:41.604>hood <00:04:41.744>is <00:04:41.885>when <00:04:42.025>we <00:04:42.164>constructed <00:04:42.304>this

97
00:04:43.685 --> 00:04:46.125
<00:04:43.685>client, <00:04:43.965>they <00:04:44.245>mutated <00:04:44.525>the <00:04:44.805>HTDP <00:04:45.085>client

98
00:04:46.125 --> 00:04:47.965
<00:04:46.125>and <00:04:46.358>it <00:04:46.591>was <00:04:46.825>shared <00:04:47.058>across <00:04:47.291>multiple <00:04:47.525>threats.

99
00:04:48.905 --> 00:04:52.925
<00:04:48.905>And <00:04:49.032>what <00:04:49.159>happens <00:04:49.286>if <00:04:49.414>you <00:04:49.541>are <00:04:49.668>riding <00:04:49.795>a <00:04:49.923>in <00:04:50.050>a <00:04:50.177>multiple <00:04:50.304>threats

100
00:04:52.925 --> 00:04:55.365
<00:04:52.925>to <00:04:53.065>a <00:04:53.205>short <00:04:53.345>memory, <00:04:53.485>it'll <00:04:53.625>throw <00:04:53.765>the <00:04:53.905>race <00:04:54.045>condition <00:04:54.185>and <00:04:54.325>panic.

101
00:04:55.945 --> 00:04:59.845
<00:04:55.945>That's <00:04:56.085>kind <00:04:56.224>of <00:04:56.365>unexpected <00:04:56.505>and <00:04:56.645>you <00:04:56.784>really <00:04:56.925>want <00:04:57.065>to <00:04:57.205>avoid <00:04:57.344>it

102
00:05:00.075 --> 00:05:05.015
<00:05:00.075>because, <00:05:00.230>well <00:05:00.386>some <00:05:00.541>guys <00:05:00.697>are <00:05:00.852>not <00:05:01.008>catching <00:05:01.163>the <00:05:01.319>fret, <00:05:01.474>um,

103
00:05:05.595 --> 00:05:06.735
<00:05:05.595>the <00:05:06.108>race <00:05:06.621>conditions

104
00:05:07.445 --> 00:05:09.415
<00:05:07.445>because <00:05:07.795>they're <00:05:08.145>not <00:05:08.495>using <00:05:08.844>sanitizers,

105
00:05:09.415 --> 00:05:11.535
<00:05:09.415>they're <00:05:09.695>running <00:05:09.975>data <00:05:10.255>tests, <00:05:10.535>um, <00:05:10.815>serialized,

106
00:05:11.535 --> 00:05:12.735
<00:05:11.535>so <00:05:11.715>one <00:05:11.895>by <00:05:12.075>one <00:05:12.255>and <00:05:12.435>so <00:05:12.615>on.

107
00:05:14.645 --> 00:05:18.025
<00:05:14.645>And <00:05:14.772>this <00:05:14.899>is <00:05:15.026>what <00:05:15.154>makes <00:05:15.281>us <00:05:15.408>great <00:05:15.535>in <00:05:15.663>the <00:05:15.790>uh, <00:05:15.917>function <00:05:16.044>below

108
00:05:18.025 --> 00:05:21.305
<00:05:18.025>with <00:05:18.200>this <00:05:18.375>FN <00:05:18.549>with <00:05:18.724>HTB <00:05:18.900>client, <00:05:19.075>we <00:05:19.250>can <00:05:19.424>say,

109
00:05:21.325 --> 00:05:23.785
<00:05:21.325>oh <00:05:21.500>look <00:05:21.675>we <00:05:21.849>are <00:05:22.025>mutating <00:05:22.200>this <00:05:22.375>HT <00:05:22.550>B <00:05:22.724>client

110
00:05:24.885 --> 00:05:26.505
<00:05:24.885>and <00:05:25.351>signalizing <00:05:25.818>the <00:05:26.284>client.

111
00:05:26.535 --> 00:05:31.385
<00:05:26.535>Okay, <00:05:26.675>here's <00:05:26.815>what <00:05:26.955>we <00:05:27.095>are <00:05:27.235>doing. <00:05:27.375>The <00:05:27.515>next <00:05:27.655>thing <00:05:27.795>is <00:05:27.935>macros.

112
00:05:32.205 --> 00:05:35.745
<00:05:32.205>You <00:05:32.484>see <00:05:32.765>in <00:05:33.044>the <00:05:33.325>first <00:05:33.604>S-Q-L-X-Q-E-S

113
00:05:35.965 --> 00:05:37.945
<00:05:35.965>and <00:05:36.198>then <00:05:36.431>we <00:05:36.665>can <00:05:36.898>pass <00:05:37.131>some <00:05:37.365>parameters.

114
00:05:37.965 --> 00:05:41.345
<00:05:37.965>The <00:05:38.140>first <00:05:38.315>parameter <00:05:38.490>is <00:05:38.665>a <00:05:38.840>STR <00:05:39.015>where <00:05:39.190>we <00:05:39.365>want

115
00:05:41.345 --> 00:05:44.265
<00:05:41.345>to <00:05:41.500>pass <00:05:41.656>the <00:05:41.811>return <00:05:41.967>values <00:05:42.122>of <00:05:42.278>the <00:05:42.433>SQ <00:05:42.589>l <00:05:42.745>qi,

116
00:05:44.265 --> 00:05:45.585
<00:05:44.265>which <00:05:44.562>is <00:05:44.859>the <00:05:45.156>second <00:05:45.453>parameter.

117
00:05:45.925 --> 00:05:48.545
<00:05:45.925>And <00:05:46.065>the <00:05:46.205>third <00:05:46.345>and <00:05:46.485>fourth <00:05:46.625>and <00:05:46.765>so <00:05:46.905>on <00:05:47.045>parameter <00:05:47.185>are <00:05:47.325>the

118
00:05:49.795 --> 00:05:51.705
<00:05:49.795>parameters <00:05:50.145>for <00:05:50.495>the <00:05:50.845>SK <00:05:51.195>curie.

119
00:05:51.965 --> 00:05:55.905
<00:05:51.965>And <00:05:52.120>in <00:05:52.276>the <00:05:52.431>background, <00:05:52.587>um, <00:05:52.742>we <00:05:52.898>are <00:05:53.053>generating <00:05:53.209>actually <00:05:53.365>code

120
00:05:56.325 --> 00:05:58.565
<00:05:56.325>so <00:05:56.480>the <00:05:56.636>compiler <00:05:56.791>can <00:05:56.947>check <00:05:57.102>if <00:05:57.258>this <00:05:57.413>code <00:05:57.569>is <00:05:57.724>correct.

121
00:05:59.315 --> 00:06:03.405
<00:05:59.315>This <00:05:59.470>is <00:05:59.626>important <00:05:59.781>for <00:05:59.937>dynamic <00:06:00.092>stuff <00:06:00.248>like <00:06:00.403>SQ <00:06:00.559>curies, <00:06:00.715>HTML

122
00:06:03.755 --> 00:06:07.285
<00:06:03.755>because <00:06:03.910>now <00:06:04.066>we <00:06:04.221>can <00:06:04.377>validate <00:06:04.532>that <00:06:04.688>during <00:06:04.843>the <00:06:04.999>build <00:06:05.155>times

123
00:06:08.155 --> 00:06:11.245
<00:06:08.155>because <00:06:08.310>SQLX <00:06:08.466>is <00:06:08.621>opening <00:06:08.777>a <00:06:08.932>connection <00:06:09.088>to <00:06:09.243>a <00:06:09.399>real <00:06:09.554>database

124
00:06:11.245 --> 00:06:12.405
<00:06:11.245>during <00:06:11.593>a <00:06:11.941>cargo <00:06:12.289>build.

125
00:06:12.435 --> 00:06:14.565
<00:06:12.435>This <00:06:12.668>is <00:06:12.901>the <00:06:13.135>build <00:06:13.368>command <00:06:13.601>for <00:06:13.835>us

126
00:06:14.565 --> 00:06:15.925
<00:06:14.565>where <00:06:14.809>we <00:06:15.054>are <00:06:15.299>building <00:06:15.544>the <00:06:15.789>binary

127
00:06:17.265 --> 00:06:20.045
<00:06:17.265>and <00:06:17.440>then <00:06:17.615>checking <00:06:17.789>each <00:06:17.965>SKL <00:06:18.140>command <00:06:18.315>for <00:06:18.490>the <00:06:18.664>correctness

128
00:06:20.505 --> 00:06:23.565
<00:06:20.505>and <00:06:20.632>in <00:06:20.759>one <00:06:20.886>of <00:06:21.014>them <00:06:21.141>are <00:06:21.268>just <00:06:21.395>wrong, <00:06:21.523>it'll <00:06:21.650>throw <00:06:21.777>in <00:06:21.905>compiler.

129
00:06:23.705 --> 00:06:27.725
<00:06:23.705>So <00:06:23.860>we <00:06:24.016>are <00:06:24.171>not <00:06:24.327>never, <00:06:24.482>ever <00:06:24.638>passing <00:06:24.793>wrong <00:06:24.949>SKL <00:06:25.104>curries

130
00:06:27.785 --> 00:06:29.605
<00:06:27.785>to <00:06:28.251>our <00:06:28.718>production <00:06:29.185>system

131
00:06:29.605 --> 00:06:31.645
<00:06:29.605>because <00:06:29.745>the <00:06:29.885>build <00:06:30.025>system <00:06:30.165>says <00:06:30.305>no, <00:06:30.445>no <00:06:30.585>we <00:06:30.725>don't <00:06:30.865>do <00:06:31.005>that.

132
00:06:34.105 --> 00:06:37.685
<00:06:34.105>Um, <00:06:34.280>what <00:06:34.455>I <00:06:34.630>like <00:06:34.805>as <00:06:34.980>reading <00:06:35.155>code <00:06:35.330>is <00:06:35.505>chaining.

133
00:06:37.945 --> 00:06:41.165
<00:06:37.945>So <00:06:38.085>in <00:06:38.224>the <00:06:38.365>first <00:06:38.505>example <00:06:38.645>we <00:06:38.784>see <00:06:38.925>some <00:06:39.065>chaba <00:06:39.205>code <00:06:39.344>there,

134
00:06:41.165 --> 00:06:43.205
<00:06:41.165>we <00:06:41.340>have <00:06:41.515>a <00:06:41.690>request <00:06:41.865>that <00:06:42.040>we <00:06:42.215>call <00:06:42.390>get <00:06:42.565>inner.

135
00:06:44.075 --> 00:06:46.485
<00:06:44.075>This <00:06:44.308>means <00:06:44.541>we <00:06:44.775>are <00:06:45.008>unwrapping <00:06:45.241>our <00:06:45.474>object

136
00:06:46.625 --> 00:06:48.205
<00:06:46.625>and <00:06:46.858>get <00:06:47.091>some <00:06:47.325>value <00:06:47.558>out <00:06:47.791>of <00:06:48.025>it.

137
00:06:48.395 --> 00:06:53.005
<00:06:48.395>Then <00:06:48.522>get <00:06:48.649>key <00:06:48.776>value <00:06:48.904>is <00:06:49.031>we <00:06:49.158>are <00:06:49.285>getting <00:06:49.413>the <00:06:49.540>object <00:06:49.667>key <00:06:49.794>value,

138
00:06:53.005 --> 00:06:55.485
<00:06:53.005>which <00:06:53.145>is <00:06:53.284>an <00:06:53.425>optional, <00:06:53.565>that's <00:06:53.705>why <00:06:53.844>we <00:06:53.985>are <00:06:54.125>the <00:06:54.265>optional <00:06:54.405>key

139
00:06:55.485 --> 00:06:58.605
<00:06:55.485>value <00:06:55.685>in <00:06:55.885>uh, <00:06:56.085>the <00:06:56.285>definition <00:06:56.485>of <00:06:56.685>the <00:06:56.885>variable.

140
00:06:59.395 --> 00:07:01.925
<00:06:59.395>Then <00:06:59.534>we <00:06:59.674>may <00:06:59.815>want <00:06:59.955>to <00:07:00.094>check <00:07:00.234>if <00:07:00.375>this <00:07:00.515>optional <00:07:00.655>is <00:07:00.794>non.

141
00:07:02.625 --> 00:07:05.125
<00:07:02.625>So <00:07:02.765>if <00:07:02.905>the <00:07:03.045>user <00:07:03.185>is <00:07:03.325>not <00:07:03.465>sending <00:07:03.605>the <00:07:03.745>data, <00:07:03.885>we <00:07:04.025>want

142
00:07:05.125 --> 00:07:06.645
<00:07:05.125>to <00:07:05.398>throw <00:07:05.672>our, <00:07:05.945>that's <00:07:06.219>not <00:07:06.493>allowed.

143
00:07:06.645 --> 00:07:08.485
<00:07:06.645>That's <00:07:06.820>what <00:07:06.995>we <00:07:07.169>are <00:07:07.344>doing <00:07:07.520>with <00:07:07.695>this <00:07:07.870>three <00:07:08.044>new

144
00:07:08.485 --> 00:07:09.925
<00:07:08.485>illegal <00:07:09.133>argument <00:07:09.781>exception.

145
00:07:10.505 --> 00:07:12.605
<00:07:10.505>And <00:07:10.705>after <00:07:10.905>that <00:07:11.105>we <00:07:11.305>are <00:07:11.505>fetching <00:07:11.705>the <00:07:11.905>real

146
00:07:12.735 --> 00:07:13.805
<00:07:12.735>value <00:07:13.056>of <00:07:13.377>the <00:07:13.698>optional.

147
00:07:14.875 --> 00:07:19.125
<00:07:14.875>However, <00:07:15.002>in <00:07:15.129>rust <00:07:15.256>we <00:07:15.384>can <00:07:15.511>do <00:07:15.638>a <00:07:15.765>little <00:07:15.893>bit <00:07:16.020>of <00:07:16.147>training <00:07:16.275>so

148
00:07:19.125 --> 00:07:22.125
<00:07:19.125>to <00:07:19.280>called <00:07:19.436>and <00:07:19.591>can <00:07:19.747>write <00:07:19.902>the <00:07:20.058>method <00:07:20.213>under <00:07:20.369>each <00:07:20.525>other,

149
00:07:22.175 --> 00:07:25.085
<00:07:22.175>which <00:07:22.350>is <00:07:22.525>kind <00:07:22.700>of <00:07:22.875>this <00:07:23.050>functional <00:07:23.225>parama <00:07:23.400>in <00:07:23.575>Java.

150
00:07:25.105 --> 00:07:29.605
<00:07:25.105>You <00:07:25.260>can <00:07:25.416>also <00:07:25.571>implement <00:07:25.727>that <00:07:25.882>with <00:07:26.038>reactive <00:07:26.193>Java <00:07:26.349>I <00:07:26.505>think.

151
00:07:30.345 --> 00:07:33.205
<00:07:30.345>And <00:07:30.485>I <00:07:30.625>think <00:07:30.765>it's <00:07:30.905>just <00:07:31.045>more <00:07:31.185>readable <00:07:31.325>and <00:07:31.465>cool <00:07:31.605>to <00:07:31.745>use.

152
00:07:33.585 --> 00:07:35.725
<00:07:33.585>So <00:07:33.818>in <00:07:34.051>a <00:07:34.284>real <00:07:34.518>production <00:07:34.751>rust <00:07:34.984>code,

153
00:07:35.725 --> 00:07:38.605
<00:07:35.725>you've <00:07:35.958>never <00:07:36.191>ever <00:07:36.425>see <00:07:36.658>some <00:07:36.891>matching <00:07:37.125>statements,

154
00:07:38.605 --> 00:07:40.885
<00:07:38.605>some <00:07:38.805>miss <00:07:39.005>statements <00:07:39.205>because <00:07:39.405>they're <00:07:39.605>all <00:07:39.805>chaining <00:07:40.005>together.

155
00:07:42.865 --> 00:07:44.605
<00:07:42.865>So <00:07:43.098>we <00:07:43.331>already <00:07:43.565>talked <00:07:43.798>about <00:07:44.031>threat <00:07:44.265>safety

156
00:07:44.785 --> 00:07:47.205
<00:07:44.784>and <00:07:44.960>I <00:07:45.135>think <00:07:45.309>that's <00:07:45.484>really <00:07:45.659>important <00:07:45.835>for <00:07:46.010>web <00:07:46.184>servers

157
00:07:47.205 --> 00:07:49.285
<00:07:47.205>because <00:07:47.555>they're <00:07:47.905>usually <00:07:48.255>a <00:07:48.604>multi-feed,

158
00:07:49.285 --> 00:07:51.245
<00:07:49.284>but <00:07:49.484>we <00:07:49.684>don't <00:07:49.885>really <00:07:50.085>see <00:07:50.284>that <00:07:50.484>they're <00:07:50.684>multi-feed.

159
00:07:51.665 --> 00:07:53.925
<00:07:51.665>So <00:07:51.865>here <00:07:52.065>I <00:07:52.265>for <00:07:52.465>an <00:07:52.665>example <00:07:52.865>from <00:07:53.065>Golan,

160
00:07:54.255 --> 00:07:57.565
<00:07:54.255>first <00:07:54.410>we <00:07:54.566>have <00:07:54.721>this <00:07:54.877>type, <00:07:55.032>it's <00:07:55.188>kind <00:07:55.343>of <00:07:55.499>a <00:07:55.655>glass

161
00:07:57.595 --> 00:08:00.365
<00:07:57.595>that <00:07:57.770>has <00:07:57.945>some <00:07:58.120>primitive <00:07:58.295>types <00:07:58.470>like <00:07:58.645>Kira <00:07:58.820>hash <00:07:58.995>map

162
00:08:00.995 --> 00:08:02.085
<00:08:00.995>with <00:08:01.322>in <00:08:01.649>this <00:08:01.976>key

163
00:08:02.085 --> 00:08:04.485
<00:08:02.085>and <00:08:02.212>in <00:08:02.339>this <00:08:02.466>value <00:08:02.594>then <00:08:02.721>we <00:08:02.848>are <00:08:02.975>defining <00:08:03.103>some <00:08:03.230>effort <00:08:03.357>on <00:08:03.484>it.

164
00:08:04.695 --> 00:08:08.365
<00:08:04.695>Great. <00:08:04.850>So <00:08:05.006>we <00:08:05.161>are <00:08:05.317>creating <00:08:05.472>entry <00:08:05.628>and <00:08:05.783>this <00:08:05.939>hash <00:08:06.094>map

165
00:08:09.145 --> 00:08:11.365
<00:08:09.145>and <00:08:09.378>then <00:08:09.611>we <00:08:09.844>are <00:08:10.078>injecting <00:08:10.311>this <00:08:10.544>repository,

166
00:08:11.365 --> 00:08:13.805
<00:08:11.365>which <00:08:11.565>is <00:08:11.765>our <00:08:11.965>data <00:08:12.165>store <00:08:12.365>into <00:08:12.565>a <00:08:12.765>server.

167
00:08:14.385 --> 00:08:17.205
<00:08:14.385>And <00:08:14.540>on <00:08:14.696>the <00:08:14.851>server <00:08:15.007>we <00:08:15.162>are <00:08:15.318>defining <00:08:15.473>a <00:08:15.629>request <00:08:15.784>handler

168
00:08:17.205 --> 00:08:18.445
<00:08:17.205>that's <00:08:17.577>called <00:08:17.949>handle <00:08:18.320>request.

169
00:08:18.465 --> 00:08:19.845
<00:08:18.465>It <00:08:18.775>takes <00:08:19.086>on <00:08:19.396>response <00:08:19.707>rider

170
00:08:19.945 --> 00:08:22.885
<00:08:19.945>and <00:08:20.145>uh, <00:08:20.344>uh, <00:08:20.545>request <00:08:20.745>with <00:08:20.945>the <00:08:21.145>response <00:08:21.344>rider.

171
00:08:22.985 --> 00:08:24.765
<00:08:22.985>We <00:08:23.218>are <00:08:23.451>giving <00:08:23.685>back <00:08:23.918>the <00:08:24.151>status <00:08:24.385>code,

172
00:08:24.985 --> 00:08:26.405
<00:08:24.985>the <00:08:25.240>request <00:08:25.496>body <00:08:25.751>to <00:08:26.007>the <00:08:26.263>user.

173
00:08:26.465 --> 00:08:27.565
<00:08:26.465>And <00:08:26.630>with <00:08:26.794>the <00:08:26.960>re <00:08:27.125>request <00:08:27.289>we <00:08:27.455>are

174
00:08:27.565 --> 00:08:28.805
<00:08:27.565>fetching <00:08:27.788>the <00:08:28.011>data <00:08:28.234>from <00:08:28.457>the <00:08:28.681>user.

175
00:08:29.865 --> 00:08:34.525
<00:08:29.865>Um, <00:08:30.005>as <00:08:30.145>a <00:08:30.285>simplified <00:08:30.425>example, <00:08:30.565>we <00:08:30.705>are <00:08:30.845>just <00:08:30.985>writing <00:08:31.125>some <00:08:31.265>data

176
00:08:34.545 --> 00:08:37.005
<00:08:34.544>to <00:08:34.719>our <00:08:34.895>hash <00:08:35.069>map <00:08:35.245>and <00:08:35.419>it's <00:08:35.594>perfectly <00:08:35.770>fine, <00:08:35.944>right?

177
00:08:37.005 --> 00:08:40.085
<00:08:37.005>We <00:08:37.145>are <00:08:37.284>not <00:08:37.424>spa <00:08:37.564>threats <00:08:37.705>so <00:08:37.845>there <00:08:37.985>shouldn't <00:08:38.125>be <00:08:38.265>any <00:08:38.405>problem.

178
00:08:41.825 --> 00:08:44.165
<00:08:41.825>But <00:08:42.105>let's <00:08:42.385>consider <00:08:42.665>the <00:08:42.945>same <00:08:43.225>implementation.

179
00:08:44.385 --> 00:08:47.445
<00:08:44.385>rus, <00:08:44.585>yeah, <00:08:44.785>we <00:08:44.985>also <00:08:45.185>have <00:08:45.385>all <00:08:45.585>structured <00:08:45.785>repository

180
00:08:48.425 --> 00:08:50.645
<00:08:48.425>and <00:08:48.658>taking <00:08:48.891>the, <00:08:49.125>the <00:08:49.358>hash <00:08:49.591>map <00:08:49.824>in

181
00:08:51.105 --> 00:08:53.285
<00:08:51.105>as <00:08:51.305>a <00:08:51.505>in <00:08:51.705>memory <00:08:51.905>database <00:08:52.105>so <00:08:52.305>to <00:08:52.505>say.

182
00:08:54.315 --> 00:08:57.165
<00:08:54.315>Then <00:08:54.548>we <00:08:54.781>are <00:08:55.015>creating <00:08:55.248>this <00:08:55.481>HTP <00:08:55.715>handler.

183
00:08:57.705 --> 00:09:00.685
<00:08:57.705>I'm <00:08:57.938>using <00:08:58.171>ACT <00:08:58.405>S <00:08:58.638>in <00:08:58.871>this <00:08:59.105>example.

184
00:09:01.295 --> 00:09:02.725
<00:09:01.295>There <00:09:01.616>we <00:09:01.938>have <00:09:02.260>a <00:09:02.582>macro

185
00:09:03.035 --> 00:09:05.605
<00:09:03.035>that <00:09:03.175>says <00:09:03.314>this <00:09:03.454>should <00:09:03.594>be <00:09:03.735>a <00:09:03.875>post <00:09:04.015>request <00:09:04.155>with <00:09:04.295>the <00:09:04.435>web

186
00:09:05.785 --> 00:09:07.005
<00:09:05.785>and <00:09:06.151>the <00:09:06.516>route <00:09:06.883>maps.

187
00:09:07.475 --> 00:09:11.285
<00:09:07.475>Then <00:09:07.615>we <00:09:07.755>are <00:09:07.895>defining <00:09:08.035>the <00:09:08.175>logic <00:09:08.315>that <00:09:08.455>should <00:09:08.595>be, <00:09:08.735>uh, <00:09:08.875>executed

188
00:09:11.285 --> 00:09:12.325
<00:09:11.285>with <00:09:11.597>this <00:09:11.909>post <00:09:12.221>request.

189
00:09:12.505 --> 00:09:13.685
<00:09:12.505>Here's <00:09:13.036>grade <00:09:13.567>entry.

190
00:09:14.505 --> 00:09:18.485
<00:09:14.505>It <00:09:14.680>takes <00:09:14.855>a <00:09:15.030>dependency <00:09:15.205>that's <00:09:15.380>called <00:09:15.555>air <00:09:15.730>web <00:09:15.905>data.

191
00:09:19.035 --> 00:09:21.085
<00:09:19.035>This <00:09:19.268>all <00:09:19.501>dependency <00:09:19.735>where <00:09:19.968>we <00:09:20.201>interacting <00:09:20.435>with

192
00:09:21.665 --> 00:09:24.205
<00:09:21.665>and <00:09:21.820>as <00:09:21.976>well <00:09:22.131>we <00:09:22.287>are <00:09:22.442>creating <00:09:22.598>some <00:09:22.753>data <00:09:22.909>in <00:09:23.064>it.

193
00:09:25.345 --> 00:09:28.285
<00:09:25.345>And <00:09:25.472>now <00:09:25.599>the <00:09:25.726>rust <00:09:25.854>compiler <00:09:25.981>says, <00:09:26.108>oh, <00:09:26.235>let's <00:09:26.363>take <00:09:26.490>a <00:09:26.617>step <00:09:26.745>back.

194
00:09:28.285 --> 00:09:29.925
<00:09:28.285>That's <00:09:28.518>not <00:09:28.751>good <00:09:28.985>what <00:09:29.218>you're <00:09:29.451>doing <00:09:29.685>here.

195
00:09:30.585 --> 00:09:34.005
<00:09:30.585>So <00:09:30.712>it <00:09:30.839>says <00:09:30.966>cannot <00:09:31.094>borrow <00:09:31.221>data <00:09:31.348>in <00:09:31.475>an <00:09:31.603>arc <00:09:31.730>as <00:09:31.857>mu <00:09:31.985>text

196
00:09:36.585 --> 00:09:39.685
<00:09:36.585>and <00:09:36.740>we <00:09:36.896>are <00:09:37.051>kind <00:09:37.207>of <00:09:37.362>protected <00:09:37.518>from <00:09:37.673>doing <00:09:37.829>stupid <00:09:37.985>stuff

197
00:09:40.025 --> 00:09:44.165
<00:09:40.025>and <00:09:40.152>we <00:09:40.279>can <00:09:40.406>easily <00:09:40.534>fix <00:09:40.661>that <00:09:40.788>by <00:09:40.915>not <00:09:41.043>implementing <00:09:41.170>what <00:09:41.297>it <00:09:41.425>says

198
00:09:44.165 --> 00:09:49.085
<00:09:44.165>with <00:09:44.305>this <00:09:44.444>DRE <00:09:44.584>mutable <00:09:44.724>trade, <00:09:44.865>but <00:09:45.005>creating <00:09:45.145>a <00:09:45.285>mutt <00:09:45.425>around <00:09:45.564>it.

199
00:09:50.025 --> 00:09:51.085
<00:09:50.025>Simple <00:09:50.502>as <00:09:50.979>that.

200
00:09:53.825 --> 00:09:57.245
<00:09:53.825>Um, <00:09:53.980>the <00:09:54.136>now <00:09:54.291>pointer <00:09:54.447>de <00:09:54.602>referencing <00:09:54.758>is <00:09:54.913>usually <00:09:55.069>an <00:09:55.225>argument

201
00:09:57.245 --> 00:09:59.965
<00:09:57.245>from <00:09:57.385>CNC <00:09:57.525>plus <00:09:57.665>plus <00:09:57.805>because <00:09:57.945>there <00:09:58.085>are <00:09:58.225>a <00:09:58.365>lot <00:09:58.505>of <00:09:58.645>pointers.

202
00:10:00.545 --> 00:10:02.365
<00:10:00.545>But <00:10:00.778>also <00:10:01.011>in <00:10:01.245>go <00:10:01.478>there <00:10:01.711>are <00:10:01.944>pointers

203
00:10:02.465 --> 00:10:04.445
<00:10:02.465>and <00:10:02.665>later <00:10:02.865>on <00:10:03.065>we <00:10:03.265>will <00:10:03.465>see <00:10:03.665>another <00:10:03.865>example.

204
00:10:05.545 --> 00:10:07.805
<00:10:05.545>And <00:10:05.745>here <00:10:05.944>we <00:10:06.145>are <00:10:06.344>passing <00:10:06.545>our <00:10:06.745>pointers <00:10:06.944>around,

205
00:10:07.905 --> 00:10:09.725
<00:10:07.905>we <00:10:08.105>are <00:10:08.305>de <00:10:08.505>referencing <00:10:08.704>it <00:10:08.905>because <00:10:09.105>why <00:10:09.305>not?

206
00:10:10.095 --> 00:10:12.445
<00:10:10.095>Maybe <00:10:10.295>on <00:10:10.495>the <00:10:10.695>pointer <00:10:10.895>we <00:10:11.095>have <00:10:11.295>another <00:10:11.495>pointer

207
00:10:12.445 --> 00:10:14.765
<00:10:12.445>with <00:10:12.645>this <00:10:12.845>value <00:10:13.045>end <00:10:13.245>in <00:10:13.445>the <00:10:13.645>value <00:10:13.845>object.

208
00:10:15.705 --> 00:10:18.365
<00:10:15.705>So <00:10:15.938>if <00:10:16.171>this <00:10:16.405>vo <00:10:16.638>is <00:10:16.871>also <00:10:17.105>null,

209
00:10:18.365 --> 00:10:20.125
<00:10:18.365>this <00:10:18.598>will <00:10:18.831>throw <00:10:19.065>an <00:10:19.298>exception <00:10:19.531>in <00:10:19.765>rust.

210
00:10:20.125 --> 00:10:22.645
<00:10:20.125>However, <00:10:20.405>we <00:10:20.685>can't <00:10:20.965>really <00:10:21.245>implement <00:10:21.525>that.

211
00:10:23.705 --> 00:10:26.045
<00:10:23.705>If <00:10:23.845>we <00:10:23.985>are <00:10:24.125>typing <00:10:24.265>it <00:10:24.405>like <00:10:24.545>this <00:10:24.685>in <00:10:24.825>the <00:10:24.965>right <00:10:25.105>example,

212
00:10:26.495 --> 00:10:27.605
<00:10:26.495>it'll <00:10:26.994>always <00:10:27.494>work

213
00:10:28.395 --> 00:10:31.085
<00:10:28.395>because <00:10:28.595>it, <00:10:28.795>the <00:10:28.995>compiler <00:10:29.194>will <00:10:29.395>simply <00:10:29.595>not <00:10:29.795>allow

214
00:10:31.085 --> 00:10:33.325
<00:10:31.085>to <00:10:31.285>stay <00:10:31.485>referencing <00:10:31.685>because <00:10:31.885>there <00:10:32.085>are <00:10:32.285>these <00:10:32.485>lifetimes

215
00:10:33.345 --> 00:10:35.525
<00:10:33.345>and <00:10:33.520>there <00:10:33.695>we <00:10:33.870>have <00:10:34.045>to, <00:10:34.220>uh, <00:10:34.395>convince <00:10:34.570>the <00:10:34.745>compiler.

216
00:10:35.715 --> 00:10:37.045
<00:10:35.715>This <00:10:35.954>will <00:10:36.193>never <00:10:36.433>ever <00:10:36.672>be <00:10:36.911>null.

217
00:10:37.045 --> 00:10:40.405
<00:10:37.045>There <00:10:37.245>will <00:10:37.444>never <00:10:37.645>ever <00:10:37.844>be <00:10:38.045>a <00:10:38.245>dangling <00:10:38.444>reference.

218
00:10:41.265 --> 00:10:42.845
<00:10:41.265>But <00:10:41.545>what's <00:10:41.824>really <00:10:42.105>annoying <00:10:42.385>me <00:10:42.665>is

219
00:10:42.845 --> 00:10:45.845
<00:10:42.845>that <00:10:43.020>interfaces <00:10:43.195>can <00:10:43.370>be <00:10:43.545>null <00:10:43.720>in <00:10:43.895>almost <00:10:44.070>any <00:10:44.245>language.

220
00:10:45.985 --> 00:10:48.365
<00:10:45.985>So <00:10:46.140>also <00:10:46.296>in <00:10:46.451>Java <00:10:46.607>where <00:10:46.762>we <00:10:46.918>have <00:10:47.073>the <00:10:47.229>garbage <00:10:47.385>collector

221
00:10:48.365 --> 00:10:51.525
<00:10:48.365>and <00:10:48.565>almost <00:10:48.765>no <00:10:48.965>pointers, <00:10:49.165>you <00:10:49.365>may <00:10:49.565>say, <00:10:49.765>oh,

222
00:10:51.595 --> 00:10:52.765
<00:10:51.595>it's <00:10:51.858>just <00:10:52.121>a <00:10:52.384>skill <00:10:52.648>issue.

223
00:10:53.015 --> 00:10:56.965
<00:10:53.015>Don't <00:10:53.215>pass <00:10:53.415>null <00:10:53.615>as <00:10:53.814>an <00:10:54.015>object <00:10:54.215>or <00:10:54.415>interface.

224
00:10:57.665 --> 00:10:59.245
<00:10:57.665>But <00:10:58.015>it <00:10:58.365>actually <00:10:58.714>happened <00:10:59.064>in,

225
00:10:59.665 --> 00:11:01.605
<00:10:59.665>in <00:10:59.898>the <00:11:00.131>deaf <00:11:00.365>environment <00:11:00.598>in <00:11:00.831>our <00:11:01.064>system

226
00:11:02.795 --> 00:11:05.165
<00:11:02.795>because <00:11:03.074>I <00:11:03.354>was <00:11:03.635>adding <00:11:03.915>some <00:11:04.194>logic

227
00:11:05.825 --> 00:11:09.325
<00:11:05.825>and <00:11:06.025>didn't <00:11:06.225>want <00:11:06.425>to <00:11:06.625>uh, <00:11:06.825>initialize <00:11:07.025>an <00:11:07.225>interface.

228
00:11:09.345 --> 00:11:10.765
<00:11:09.345>That's <00:11:09.600>why <00:11:09.856>I <00:11:10.111>was <00:11:10.367>passing <00:11:10.623>null

229
00:11:10.765 --> 00:11:13.605
<00:11:10.765>and <00:11:10.905>said, <00:11:11.045>okay, <00:11:11.185>I <00:11:11.324>will <00:11:11.465>do <00:11:11.605>it <00:11:11.745>later, <00:11:11.885>but <00:11:12.025>I <00:11:12.165>didn't.

230
00:11:14.025 --> 00:11:15.325
<00:11:14.025>And <00:11:14.259>then <00:11:14.493>it <00:11:14.727>went <00:11:14.961>to <00:11:15.195>deaf

231
00:11:15.325 --> 00:11:17.565
<00:11:15.325>because <00:11:15.525>the <00:11:15.725>code <00:11:15.925>reviewer <00:11:16.125>also <00:11:16.325>didn't <00:11:16.525>notice <00:11:16.725>it

232
00:11:18.065 --> 00:11:21.005
<00:11:18.065>and <00:11:18.205>it <00:11:18.345>caused <00:11:18.485>some <00:11:18.625>end-to-end <00:11:18.765>test <00:11:18.905>to <00:11:19.045>fail, <00:11:19.185>which <00:11:19.325>is <00:11:19.465>kind

233
00:11:21.005 --> 00:11:22.365
<00:11:21.005>of <00:11:21.209>great <00:11:21.413>because <00:11:21.617>we <00:11:21.821>still <00:11:22.025>catching <00:11:22.229>it.

234
00:11:23.905 --> 00:11:27.245
<00:11:23.905>So <00:11:24.032>in <00:11:24.159>ware <00:11:24.286>we <00:11:24.414>all, <00:11:24.541>we <00:11:24.668>are <00:11:24.795>protected <00:11:24.923>by <00:11:25.050>the <00:11:25.177>build <00:11:25.305>system.

235
00:11:27.255 --> 00:11:31.535
<00:11:27.255>Again, <00:11:27.410>here <00:11:27.566>we <00:11:27.721>can <00:11:27.877>do <00:11:28.032>something <00:11:28.188>like <00:11:28.343>the <00:11:28.499>standard <00:11:28.655>point

236
00:11:31.595 --> 00:11:34.615
<00:11:31.595>or <00:11:31.875>null <00:11:32.155>thing <00:11:32.435>where <00:11:32.715>this <00:11:32.995>kind

237
00:11:34.615 --> 00:11:36.095
<00:11:34.615>of <00:11:34.837>the <00:11:35.059>equivalent <00:11:35.281>of <00:11:35.503>a <00:11:35.725>null <00:11:35.947>object.

238
00:11:36.995 --> 00:11:38.975
<00:11:36.995>Now <00:11:37.170>here <00:11:37.345>the <00:11:37.520>compiler <00:11:37.695>says, <00:11:37.870>no, <00:11:38.045>no, <00:11:38.220>no, <00:11:38.395>no.

239
00:11:40.235 --> 00:11:44.535
<00:11:40.235>Um, <00:11:40.390>the <00:11:40.546>next <00:11:40.701>point <00:11:40.857>gives <00:11:41.012>into <00:11:41.168>the <00:11:41.323>direction <00:11:41.479>of <00:11:41.635>performance.

240
00:11:45.805 --> 00:11:47.695
<00:11:45.805>This <00:11:46.084>is <00:11:46.364>an <00:11:46.645>example <00:11:46.925>from <00:11:47.204>Java.

241
00:11:47.895 --> 00:11:49.775
<00:11:47.895>I <00:11:48.128>re <00:11:48.361>actually <00:11:48.595>really <00:11:48.828>like <00:11:49.061>Java <00:11:49.295>spring

242
00:11:49.775 --> 00:11:52.535
<00:11:49.775>because <00:11:49.902>it <00:11:50.029>takes <00:11:50.156>a, <00:11:50.284>it <00:11:50.411>does <00:11:50.538>a <00:11:50.665>lot <00:11:50.793>of <00:11:50.920>magic <00:11:51.047>for <00:11:51.175>us

243
00:11:53.105 --> 00:11:55.085
<00:11:53.105>to <00:11:53.455>simplify <00:11:53.805>the <00:11:54.155>development <00:11:54.505>lifecycle.

244
00:11:55.545 --> 00:11:56.605
<00:11:55.545>But <00:11:55.735>it <00:11:55.926>comes <00:11:56.117>with <00:11:56.308>the <00:11:56.499>cost.

245
00:11:56.605 --> 00:11:58.645
<00:11:56.605>Here <00:11:56.780>we <00:11:56.955>see <00:11:57.130>we <00:11:57.305>have <00:11:57.480>to <00:11:57.655>add <00:11:57.830>service <00:11:58.005>annotation,

246
00:11:58.645 --> 00:12:00.445
<00:11:58.645>then <00:11:58.819>we <00:11:58.995>have <00:11:59.170>some <00:11:59.345>auto <00:11:59.520>wire <00:11:59.694>which <00:11:59.870>is <00:12:00.045>doing

247
00:12:00.445 --> 00:12:01.525
<00:12:00.445>the <00:12:00.931>dependency <00:12:01.417>injection.

248
00:12:01.865 --> 00:12:06.085
<00:12:01.865>So <00:12:01.992>we <00:12:02.119>don't <00:12:02.246>have <00:12:02.374>a <00:12:02.501>huge <00:12:02.628>main <00:12:02.755>method <00:12:02.883>where <00:12:03.010>we <00:12:03.137>initialize <00:12:03.265>all

249
00:12:06.085 --> 00:12:07.365
<00:12:06.085>of <00:12:06.661>our <00:12:07.237>struts

250
00:12:07.365 --> 00:12:09.725
<00:12:07.365>and <00:12:07.540>then <00:12:07.715>passing <00:12:07.890>it <00:12:08.065>down <00:12:08.240>to <00:12:08.415>the <00:12:08.590>corresponding <00:12:08.765>glasses.

251
00:12:11.135 --> 00:12:13.245
<00:12:11.135>It'll <00:12:11.335>do <00:12:11.535>it <00:12:11.735>automatically <00:12:11.935>with <00:12:12.135>this <00:12:12.335>auto <00:12:12.535>wire,

252
00:12:13.345 --> 00:12:14.445
<00:12:13.345>but <00:12:13.543>it <00:12:13.741>comes <00:12:13.939>with <00:12:14.137>a <00:12:14.335>cost.

253
00:12:14.585 --> 00:12:16.445
<00:12:14.585>So <00:12:14.865>spring <00:12:15.145>is <00:12:15.425>starting <00:12:15.705>the <00:12:15.985>application

254
00:12:16.865 --> 00:12:20.525
<00:12:16.865>and <00:12:17.065>then <00:12:17.265>checking <00:12:17.465>all <00:12:17.665>the <00:12:17.865>paths <00:12:18.065>and <00:12:18.265>reflections

255
00:12:20.865 --> 00:12:24.765
<00:12:20.865>and <00:12:21.040>then <00:12:21.215>injecting <00:12:21.390>them <00:12:21.565>during <00:12:21.740>the <00:12:21.915>runtime <00:12:22.090>in <00:12:22.265>rust.

256
00:12:24.765 --> 00:12:26.725
<00:12:24.765>However, <00:12:24.965>we <00:12:25.165>can <00:12:25.365>do <00:12:25.564>it <00:12:25.765>during <00:12:25.965>compiled <00:12:26.165>time.

257
00:12:27.785 --> 00:12:30.285
<00:12:27.785>And <00:12:27.940>this <00:12:28.096>is <00:12:28.251>the <00:12:28.407>argument <00:12:28.562>of <00:12:28.718>the <00:12:28.873>zero <00:12:29.029>cost <00:12:29.185>abstraction.

258
00:12:30.555 --> 00:12:32.645
<00:12:30.555>Here <00:12:30.729>we <00:12:30.905>have <00:12:31.079>again <00:12:31.255>a <00:12:31.430>repository <00:12:31.604>and <00:12:31.780>a <00:12:31.954>service

259
00:12:32.745 --> 00:12:35.885
<00:12:32.745>and <00:12:32.945>we <00:12:33.145>want <00:12:33.345>to <00:12:33.545>dependency, <00:12:33.745>injector, <00:12:33.945>dependency <00:12:34.145>injected.

260
00:12:36.265 --> 00:12:38.325
<00:12:36.265>That's <00:12:36.498>why <00:12:36.731>we <00:12:36.965>are <00:12:37.198>starting <00:12:37.431>a <00:12:37.665>constructor

261
00:12:38.355 --> 00:12:39.965
<00:12:38.355>with <00:12:38.635>the <00:12:38.915>new <00:12:39.195>keyword, <00:12:39.475>new <00:12:39.755>service.

262
00:12:40.145 --> 00:12:42.845
<00:12:40.145>And <00:12:40.319>there <00:12:40.495>we <00:12:40.670>are <00:12:40.845>passing <00:12:41.020>uh, <00:12:41.194>a <00:12:41.370>generic <00:12:41.545>T

263
00:12:43.545 --> 00:12:46.485
<00:12:43.545>and <00:12:43.685>then <00:12:43.824>we <00:12:43.964>can <00:12:44.104>uh, <00:12:44.245>restrict <00:12:44.385>the <00:12:44.525>T <00:12:44.665>on <00:12:44.805>a <00:12:44.944>trade.

264
00:12:46.625 --> 00:12:48.725
<00:12:46.625>The <00:12:46.800>trade <00:12:46.975>is <00:12:47.150>like <00:12:47.325>an <00:12:47.500>interface <00:12:47.675>here <00:12:47.850>we <00:12:48.025>stated

265
00:12:49.265 --> 00:12:52.855
<00:12:49.265>the <00:12:49.545>team <00:12:49.824>must <00:12:50.105>implement <00:12:50.385>repository <00:12:50.665>and

266
00:12:53.005 --> 00:12:55.975
<00:12:53.005>therefore <00:12:53.160>we <00:12:53.316>can <00:12:53.471>use <00:12:53.627>it <00:12:53.782>and <00:12:53.938>we <00:12:54.093>are <00:12:54.249>giving <00:12:54.405>back.

267
00:12:56.355 --> 00:12:57.735
<00:12:56.355>Um, <00:12:57.597>interface.

268
00:12:57.745 --> 00:13:02.675
<00:12:57.745>Again, <00:12:58.211>If <00:12:58.678>you're <00:12:59.145>working

269
00:13:02.675 --> 00:13:05.555
<00:13:02.675>with <00:13:02.849>ports <00:13:03.025>and <00:13:03.199>adapters, <00:13:03.375>you <00:13:03.550>may <00:13:03.724>have <00:13:03.900>some <00:13:04.074>kind

270
00:13:05.555 --> 00:13:08.315
<00:13:05.555>of <00:13:05.710>presentation <00:13:05.866>layer <00:13:06.021>where <00:13:06.177>you're <00:13:06.332>taking <00:13:06.488>in <00:13:06.643>the <00:13:06.799>data <00:13:06.954>of

271
00:13:09.215 --> 00:13:10.955
<00:13:09.215>the <00:13:09.495>user <00:13:09.775>and <00:13:10.055>then <00:13:10.335>transforming <00:13:10.615>it

272
00:13:10.955 --> 00:13:12.755
<00:13:10.955>to <00:13:11.421>some <00:13:11.888>internal <00:13:12.355>representation.

273
00:13:14.375 --> 00:13:16.755
<00:13:14.375>And <00:13:14.550>most <00:13:14.725>guys <00:13:14.900>are <00:13:15.075>calling <00:13:15.250>it <00:13:15.425>like <00:13:15.600>map <00:13:15.775>something,

274
00:13:17.135 --> 00:13:18.755
<00:13:17.135>do <00:13:17.601>something, <00:13:18.068>transform <00:13:18.535>something.

275
00:13:18.755 --> 00:13:22.635
<00:13:18.755>There's <00:13:18.882>no <00:13:19.009>real <00:13:19.136>standard. <00:13:19.264>So <00:13:19.391>we <00:13:19.518>have <00:13:19.645>a <00:13:19.773>lot <00:13:19.900>of <00:13:20.027>weird <00:13:20.155>code.

276
00:13:22.875 --> 00:13:23.995
<00:13:22.875>Everyone <00:13:23.076>is <00:13:23.278>doing <00:13:23.479>their <00:13:23.681>own <00:13:23.883>stuff.

277
00:13:25.335 --> 00:13:27.875
<00:13:25.335>But <00:13:25.475>in <00:13:25.615>Russia <00:13:25.755>there's <00:13:25.895>a <00:13:26.035>biased <00:13:26.175>way <00:13:26.315>to <00:13:26.455>transform <00:13:26.595>the <00:13:26.735>logic.

278
00:13:27.985 --> 00:13:29.115
<00:13:27.985>It's <00:13:28.239>called <00:13:28.493>the <00:13:28.747>from <00:13:29.002>trade.

279
00:13:29.335 --> 00:13:31.475
<00:13:29.335>That's <00:13:29.490>what <00:13:29.646>we <00:13:29.801>are <00:13:29.957>seeing <00:13:30.112>there <00:13:30.268>in <00:13:30.423>the <00:13:30.579>first <00:13:30.735>example.

280
00:13:31.575 --> 00:13:33.435
<00:13:31.575>In <00:13:31.750>per <00:13:31.925>from <00:13:32.100>there <00:13:32.275>we <00:13:32.450>have <00:13:32.625>the <00:13:32.800>user <00:13:32.975>request

281
00:13:34.095 --> 00:13:36.395
<00:13:34.095>and <00:13:34.270>we <00:13:34.445>want <00:13:34.620>to <00:13:34.795>map <00:13:34.970>it <00:13:35.145>to <00:13:35.320>our <00:13:35.495>domain.

282
00:13:37.235 --> 00:13:38.875
<00:13:37.235>I <00:13:37.515>really <00:13:37.795>like <00:13:38.075>domain <00:13:38.355>driven <00:13:38.635>design,

283
00:13:38.875 --> 00:13:40.395
<00:13:38.875>that's <00:13:39.070>why <00:13:39.265>I <00:13:39.461>called <00:13:39.656>it <00:13:39.852>a <00:13:40.047>domain <00:13:40.242>user.

284
00:13:41.495 --> 00:13:45.035
<00:13:41.495>And <00:13:41.775>it's <00:13:42.055>just <00:13:42.335>implementing <00:13:42.615>one <00:13:42.895>method

285
00:13:45.255 --> 00:13:46.835
<00:13:45.255>of <00:13:45.535>the <00:13:45.814>trade <00:13:46.095>it's <00:13:46.375>called <00:13:46.655>from.

286
00:13:48.015 --> 00:13:50.395
<00:13:48.015>And <00:13:48.215>we <00:13:48.415>are <00:13:48.615>taking <00:13:48.814>what <00:13:49.015>we <00:13:49.215>wanna <00:13:49.415>transform

287
00:13:50.415 --> 00:13:51.995
<00:13:50.415>and <00:13:50.881>give <00:13:51.348>back <00:13:51.814>ourself.

288
00:13:53.375 --> 00:13:56.915
<00:13:53.375>And <00:13:53.515>with <00:13:53.655>that <00:13:53.795>we <00:13:53.935>are <00:13:54.075>getting <00:13:54.215>a <00:13:54.355>a <00:13:54.495>consistent <00:13:54.635>code <00:13:54.775>base

289
00:13:57.055 --> 00:13:59.635
<00:13:57.055>and <00:13:57.334>really <00:13:57.614>slim <00:13:57.895>handlers <00:13:58.175>in <00:13:58.454>there.

290
00:13:59.705 --> 00:14:01.915
<00:13:59.705>Like <00:13:59.880>if <00:14:00.055>we <00:14:00.230>are <00:14:00.405>having <00:14:00.580>the <00:14:00.755>function <00:14:00.930>grade <00:14:01.105>user,

291
00:14:02.495 --> 00:14:05.275
<00:14:02.495>we <00:14:02.635>are <00:14:02.775>taking <00:14:02.915>in <00:14:03.055>the <00:14:03.195>user <00:14:03.335>request, <00:14:03.475>we <00:14:03.615>are <00:14:03.755>transforming <00:14:03.895>it

292
00:14:05.275 --> 00:14:08.595
<00:14:05.275>to <00:14:05.475>domain <00:14:05.675>with <00:14:05.875>this <00:14:06.074>into <00:14:06.275>method, <00:14:06.475>into <00:14:06.675>sales.

293
00:14:08.655 --> 00:14:12.195
<00:14:08.655>We <00:14:08.795>are <00:14:08.935>unwrapping <00:14:09.074>the <00:14:09.214>object <00:14:09.355>so <00:14:09.495>to <00:14:09.635>say <00:14:09.775>to <00:14:09.915>another <00:14:10.055>object

294
00:14:13.615 --> 00:14:14.835
<00:14:13.615>and <00:14:13.889>then <00:14:14.164>we <00:14:14.438>process <00:14:14.713>it

295
00:14:16.185 --> 00:14:17.605
<00:14:16.185>and <00:14:16.397>what <00:14:16.611>we, <00:14:16.824>what <00:14:17.037>would <00:14:17.250>be <00:14:17.463>raised

296
00:14:17.605 --> 00:14:18.805
<00:14:17.605>without <00:14:18.145>performance <00:14:18.685>testing.

297
00:14:20.195 --> 00:14:23.525
<00:14:20.195>Here <00:14:20.370>we <00:14:20.545>can <00:14:20.720>see <00:14:20.895>a <00:14:21.070>diaphragm <00:14:21.245>on <00:14:21.420>the <00:14:21.595>left.

298
00:14:23.555 --> 00:14:25.925
<00:14:23.555>It's <00:14:23.729>a <00:14:23.905>one <00:14:24.079>start <00:14:24.255>performance <00:14:24.430>of <00:14:24.604>a <00:14:24.780>lambda <00:14:24.954>function.

299
00:14:26.345 --> 00:14:29.645
<00:14:26.345>On <00:14:26.472>the <00:14:26.599>Y <00:14:26.726>axis <00:14:26.854>we <00:14:26.981>see <00:14:27.108>at <00:14:27.235>the <00:14:27.363>time <00:14:27.490>in <00:14:27.617>milliseconds <00:14:27.745>there's

300
00:14:29.645 --> 00:14:32.445
<00:14:29.645>like <00:14:29.925>zero <00:14:30.204>1000, <00:14:30.485>2000, <00:14:30.765>3000, <00:14:31.045>4,000.

301
00:14:32.865 --> 00:14:35.845
<00:14:32.865>On <00:14:33.020>the <00:14:33.176>x <00:14:33.331>axis <00:14:33.487>we <00:14:33.642>see <00:14:33.798>at <00:14:33.953>the <00:14:34.109>memory <00:14:34.265>usage

302
00:14:35.845 --> 00:14:39.285
<00:14:35.845>of <00:14:36.020>the <00:14:36.195>lambda <00:14:36.370>function, <00:14:36.545>it <00:14:36.720>starts <00:14:36.895>with <00:14:37.070>128 <00:14:37.245>megabytes

303
00:14:39.285 --> 00:14:41.845
<00:14:39.285>and <00:14:39.518>goes <00:14:39.751>up <00:14:39.985>to <00:14:40.218>thousand <00:14:40.451>and <00:14:40.685>24.

304
00:14:42.225 --> 00:14:44.565
<00:14:42.225>So <00:14:42.380>if <00:14:42.536>you <00:14:42.691>use <00:14:42.847>more <00:14:43.002>memory, <00:14:43.158>it's <00:14:43.313>usually <00:14:43.469>getting <00:14:43.625>faster

305
00:14:44.585 --> 00:14:46.605
<00:14:44.585>and <00:14:44.740>that's <00:14:44.896>what <00:14:45.051>we <00:14:45.207>are <00:14:45.362>seeing <00:14:45.518>with <00:14:45.673>this <00:14:45.829>pipe <00:14:45.985>example.

306
00:14:47.115 --> 00:14:49.605
<00:14:47.115>Less <00:14:47.395>memory <00:14:47.675>slow, <00:14:47.955>more <00:14:48.235>memory <00:14:48.515>fast.

307
00:14:50.385 --> 00:14:52.845
<00:14:50.385>But <00:14:50.560>in <00:14:50.735>rust <00:14:50.910>we <00:14:51.085>can <00:14:51.260>save <00:14:51.435>quite <00:14:51.610>a <00:14:51.785>lot

308
00:14:52.845 --> 00:14:54.245
<00:14:52.845>of <00:14:53.160>resources <00:14:53.475>in <00:14:53.790>the <00:14:54.105>memory.

309
00:14:54.665 --> 00:14:56.845
<00:14:54.665>And <00:14:54.865>this <00:14:55.064>is <00:14:55.265>reflecting <00:14:55.464>also <00:14:55.665>in <00:14:55.865>the <00:14:56.064>price

310
00:14:56.995 --> 00:14:59.125
<00:14:56.995>because <00:14:57.228>if <00:14:57.461>you're <00:14:57.695>losing <00:14:57.928>using <00:14:58.161>less <00:14:58.395>memory

311
00:14:59.265 --> 00:15:00.765
<00:14:59.265>for <00:14:59.490>the <00:14:59.715>alumni <00:14:59.939>function, <00:15:00.165>you <00:15:00.390>pay <00:15:00.615>less.

312
00:15:01.305 --> 00:15:03.765
<00:15:01.305>And <00:15:01.460>that's <00:15:01.616>what <00:15:01.771>the <00:15:01.927>guys <00:15:02.082>and <00:15:02.238>this <00:15:02.393>example <00:15:02.549>found <00:15:02.704>out.

313
00:15:04.435 --> 00:15:07.685
<00:15:04.435>They <00:15:04.562>listed <00:15:04.689>all <00:15:04.816>the <00:15:04.944>buckets <00:15:05.071>in <00:15:05.198>their <00:15:05.325>A <00:15:05.453>AWS <00:15:05.580>account <00:15:05.707>then <00:15:05.834>try

314
00:15:07.685 --> 00:15:09.965
<00:15:07.685>to <00:15:07.840>figure <00:15:07.996>out <00:15:08.151>the <00:15:08.307>region <00:15:08.462>with <00:15:08.618>a <00:15:08.773>couple <00:15:08.929>of <00:15:09.084>requests

315
00:15:11.345 --> 00:15:12.845
<00:15:11.345>and <00:15:11.570>first <00:15:11.795>they <00:15:12.020>implement <00:15:12.245>it <00:15:12.470>in <00:15:12.695>Python

316
00:15:12.845 --> 00:15:15.165
<00:15:12.845>and <00:15:13.020>that's <00:15:13.195>why <00:15:13.370>they <00:15:13.545>have <00:15:13.720>this <00:15:13.895>Python <00:15:14.070>sample <00:15:14.245>there

317
00:15:15.265 --> 00:15:17.125
<00:15:15.265>and <00:15:15.498>then <00:15:15.731>wrote, <00:15:15.965>rewrote <00:15:16.198>it <00:15:16.431>in <00:15:16.665>rust

318
00:15:17.625 --> 00:15:20.525
<00:15:17.625>and <00:15:17.765>at <00:15:17.905>the <00:15:18.045>end <00:15:18.185>of <00:15:18.325>the <00:15:18.465>day <00:15:18.605>they <00:15:18.745>saved <00:15:18.885>$6 <00:15:19.025>pair

319
00:15:20.525 --> 00:15:21.725
<00:15:20.525>of <00:15:20.885>1 <00:15:21.245>million <00:15:21.605>invocations.

320
00:15:22.025 --> 00:15:24.005
<00:15:22.025>So <00:15:22.225>depending <00:15:22.425>how <00:15:22.625>much <00:15:22.824>load <00:15:23.025>you <00:15:23.225>have, <00:15:23.425>that

321
00:15:24.625 --> 00:15:27.205
<00:15:24.625>can <00:15:24.905>quite <00:15:25.185>a <00:15:25.465>huge <00:15:25.745>cost <00:15:26.025>factor.

322
00:15:29.385 --> 00:15:31.725
<00:15:29.385>Um, <00:15:29.525>in <00:15:29.665>this <00:15:29.805>example <00:15:29.944>we <00:15:30.085>see <00:15:30.225>kind <00:15:30.365>of <00:15:30.505>the <00:15:30.645>same <00:15:30.785>thing.

323
00:15:32.025 --> 00:15:36.045
<00:15:32.025>We <00:15:32.199>have <00:15:32.375>the <00:15:32.550>old <00:15:32.725>languages <00:15:32.900>Python <00:15:33.074>from <00:15:33.250>Java <00:15:33.425>compared

324
00:15:36.045 --> 00:15:37.645
<00:15:36.045>to <00:15:36.278>the <00:15:36.511>new <00:15:36.745>languages <00:15:36.978>go <00:15:37.211>and <00:15:37.444>rust

325
00:15:38.425 --> 00:15:40.125
<00:15:38.425>and <00:15:38.704>there's <00:15:38.984>this <00:15:39.265>pattern <00:15:39.545>that <00:15:39.824>go

326
00:15:40.125 --> 00:15:44.125
<00:15:40.125>and <00:15:40.325>rust <00:15:40.525>are <00:15:40.725>really <00:15:40.925>resource <00:15:41.125>re <00:15:41.325>of <00:15:41.525>saving

327
00:15:45.655 --> 00:15:46.755
<00:15:45.655>and <00:15:45.985>also <00:15:46.314>quite <00:15:46.645>fast.

328
00:15:47.535 --> 00:15:50.835
<00:15:47.535>So <00:15:47.662>it <00:15:47.789>is <00:15:47.916>what <00:15:48.044>you <00:15:48.171>should <00:15:48.298>do <00:15:48.425>um, <00:15:48.553>to <00:15:48.680>consider <00:15:48.807>during <00:15:48.935>uh,

329
00:15:50.835 --> 00:15:51.955
<00:15:50.835>riding <00:15:51.171>a <00:15:51.507>huge <00:15:51.843>project.

330
00:15:52.665 --> 00:15:55.795
<00:15:52.665>It's <00:15:52.820>great, <00:15:52.976>great <00:15:53.131>to <00:15:53.287>get <00:15:53.442>started <00:15:53.598>fast <00:15:53.753>with <00:15:53.909>JavaScript <00:15:54.064>Python

331
00:15:55.795 --> 00:15:57.475
<00:15:55.795>because <00:15:56.074>you <00:15:56.354>can <00:15:56.635>prototype <00:15:56.915>really <00:15:57.194>fast

332
00:15:57.495 --> 00:16:00.995
<00:15:57.495>but <00:15:57.635>later <00:15:57.775>on <00:15:57.915>you <00:15:58.055>should <00:15:58.195>have <00:15:58.335>the <00:15:58.475>cost <00:15:58.615>in <00:15:58.755>your <00:15:58.895>view.

333
00:16:02.415 --> 00:16:04.475
<00:16:02.415>So <00:16:02.694>this <00:16:02.974>was <00:16:03.255>the <00:16:03.535>first <00:16:03.814>part.

334
00:16:04.575 --> 00:16:08.155
<00:16:04.575>Now <00:16:04.702>we <00:16:04.829>look <00:16:04.956>into, <00:16:05.084>uh, <00:16:05.211>can <00:16:05.338>we <00:16:05.465>actually <00:16:05.593>build <00:16:05.720>a <00:16:05.847>web <00:16:05.975>app?

335
00:16:08.215 --> 00:16:10.755
<00:16:08.215>So <00:16:08.342>we <00:16:08.469>need <00:16:08.596>maybe <00:16:08.724>a <00:16:08.851>front <00:16:08.978>end, <00:16:09.105>we <00:16:09.233>need <00:16:09.360>some <00:16:09.487>backend <00:16:09.615>stuff,

336
00:16:11.105 --> 00:16:13.635
<00:16:11.105>usually <00:16:11.385>rest <00:16:11.665>API <00:16:11.945>is <00:16:12.225>good <00:16:12.505>enough

337
00:16:14.855 --> 00:16:17.195
<00:16:14.855>but <00:16:15.055>maybe <00:16:15.255>we <00:16:15.455>also <00:16:15.655>want <00:16:15.855>to <00:16:16.055>build <00:16:16.255>A-G-R-P-C-A-P-I.

338
00:16:17.195 --> 00:16:19.355
<00:16:17.195>Then <00:16:17.322>we <00:16:17.449>have <00:16:17.576>to <00:16:17.704>look <00:16:17.831>as <00:16:17.958>this <00:16:18.085>possible <00:16:18.213>as <00:16:18.340>it's <00:16:18.467>not <00:16:18.595>possible.

339
00:16:20.055 --> 00:16:22.275
<00:16:20.055>I'm <00:16:20.288>big <00:16:20.521>fan <00:16:20.755>of <00:16:20.988>specify <00:16:21.221>my <00:16:21.454>API.

340
00:16:22.295 --> 00:16:25.635
<00:16:22.295>So <00:16:22.402>we <00:16:22.510>need <00:16:22.618>to <00:16:22.725>have <00:16:22.833>a <00:16:22.941>way <00:16:23.048>to <00:16:23.156>uh, <00:16:23.264>specify <00:16:23.371>our <00:16:23.479>rest <00:16:23.587>A <00:16:23.694>P

341
00:16:25.635 --> 00:16:27.035
<00:16:25.635>with <00:16:25.949>the <00:16:26.265>open <00:16:26.579>API <00:16:26.895>spec.

342
00:16:27.695 --> 00:16:29.915
<00:16:27.695>And <00:16:27.870>finally <00:16:28.045>we <00:16:28.220>need <00:16:28.395>to <00:16:28.570>get <00:16:28.745>some <00:16:28.920>of <00:16:29.095>observability.

343
00:16:30.015 --> 00:16:31.715
<00:16:30.015>We <00:16:30.295>want <00:16:30.574>to <00:16:30.855>go <00:16:31.135>metrics, <00:16:31.415>traces

344
00:16:31.815 --> 00:16:34.595
<00:16:31.815>and <00:16:32.015>maybe <00:16:32.215>logs <00:16:32.415>out <00:16:32.615>of <00:16:32.815>of <00:16:33.015>our <00:16:33.215>application.

345
00:16:36.005 --> 00:16:38.735
<00:16:36.005>Then <00:16:36.205>uh, <00:16:36.405>backend <00:16:36.605>is <00:16:36.805>nothing <00:16:37.005>without <00:16:37.205>this <00:16:37.405>database.

346
00:16:38.735 --> 00:16:40.855
<00:16:38.735>That's <00:16:38.935>why <00:16:39.135>we're <00:16:39.335>looking <00:16:39.535>at <00:16:39.735>some <00:16:39.935>database <00:16:40.135>frameworks.

347
00:16:41.475 --> 00:16:44.175
<00:16:41.475>And <00:16:41.650>finally <00:16:41.825>we <00:16:42.000>want <00:16:42.175>to <00:16:42.350>have <00:16:42.525>some <00:16:42.700>async <00:16:42.875>processing.

348
00:16:44.175 --> 00:16:45.935
<00:16:44.175>That's <00:16:44.408>why <00:16:44.641>we're <00:16:44.875>looking <00:16:45.108>in <00:16:45.341>message <00:16:45.574>queues.

349
00:16:46.755 --> 00:16:50.335
<00:16:46.755>So <00:16:46.895>front <00:16:47.035>end <00:16:47.175>is <00:16:47.314>almost <00:16:47.455>always <00:16:47.595>written <00:16:47.735>in <00:16:47.875>a <00:16:48.015>Java <00:16:48.155>script.

350
00:16:50.535 --> 00:16:51.735
<00:16:50.535>HDML <00:16:51.075>and <00:16:51.615>CSS.

351
00:16:51.965 --> 00:16:55.975
<00:16:51.965>It's <00:16:52.120>quite <00:16:52.276>hard <00:16:52.431>to <00:16:52.587>get <00:16:52.742>this <00:16:52.898>language <00:16:53.053>like <00:16:53.209>go <00:16:53.365>rust,

352
00:16:56.105 --> 00:16:57.455
<00:16:56.105>maybe <00:16:56.408>Java <00:16:56.712>into <00:16:57.016>the <00:16:57.320>browser.

353
00:16:58.075 --> 00:17:00.895
<00:16:58.075>And <00:16:58.215>for <00:16:58.355>that <00:16:58.495>there <00:16:58.635>is <00:16:58.775>some <00:16:58.915>cool <00:16:59.055>thing <00:16:59.195>called <00:16:59.335>web <00:16:59.475>assembly.

354
00:17:01.685 --> 00:17:04.455
<00:17:01.685>It's <00:17:01.918>similar <00:17:02.151>to <00:17:02.385>the <00:17:02.618>JVM <00:17:02.851>for <00:17:03.084>Java.

355
00:17:05.695 --> 00:17:07.815
<00:17:05.694>'cause <00:17:05.811>what <00:17:05.928>you <00:17:06.044>do <00:17:06.161>with <00:17:06.278>Java <00:17:06.395>is <00:17:06.511>you <00:17:06.628>compile <00:17:06.744>it <00:17:06.861>to <00:17:06.978>some <00:17:07.095>kind

356
00:17:07.815 --> 00:17:10.495
<00:17:07.815>of <00:17:07.955>bike <00:17:08.095>code <00:17:08.235>and <00:17:08.375>then <00:17:08.515>the <00:17:08.655>JVM <00:17:08.795>is <00:17:08.935>running <00:17:09.075>it <00:17:09.215>somewhere

357
00:17:10.495 --> 00:17:12.495
<00:17:10.494>to <00:17:10.728>machine <00:17:10.961>and <00:17:11.194>the <00:17:11.428>same <00:17:11.661>is <00:17:11.895>happening

358
00:17:12.495 --> 00:17:13.815
<00:17:12.494>with <00:17:12.791>web <00:17:13.089>assembly <00:17:13.386>and <00:17:13.683>rust.

359
00:17:13.815 --> 00:17:16.015
<00:17:13.815>And <00:17:14.015>rust. <00:17:14.215>You're <00:17:14.415>compiling <00:17:14.615>to <00:17:14.815>some <00:17:15.015>by <00:17:15.215>code

360
00:17:16.015 --> 00:17:17.975
<00:17:16.015>and <00:17:16.190>the <00:17:16.365>web <00:17:16.540>assembly <00:17:16.715>is <00:17:16.890>running <00:17:17.065>inside <00:17:17.240>the <00:17:17.415>browser.

361
00:17:18.155 --> 00:17:21.015
<00:17:18.155>So <00:17:18.329>kind <00:17:18.504>of <00:17:18.680>for <00:17:18.855>machine <00:17:19.030>interpreting <00:17:19.204>the <00:17:19.379>by <00:17:19.555>code

362
00:17:21.115 --> 00:17:25.175
<00:17:21.115>and <00:17:21.231>then <00:17:21.348>we <00:17:21.464>can <00:17:21.581>get <00:17:21.698>our <00:17:21.815>RA <00:17:21.931>code <00:17:22.048>to <00:17:22.165>run <00:17:22.281>inside <00:17:22.398>the <00:17:22.515>browser.

363
00:17:26.365 --> 00:17:27.695
<00:17:26.365>Here <00:17:26.763>we <00:17:27.163>see <00:17:27.561>leptos.

364
00:17:27.775 --> 00:17:29.775
<00:17:27.775>I <00:17:27.930>really <00:17:28.086>like <00:17:28.241>this <00:17:28.397>framework, <00:17:28.552>that's <00:17:28.708>why <00:17:28.863>I've <00:17:29.019>brought <00:17:29.175>it.

365
00:17:30.475 --> 00:17:32.535
<00:17:30.475>Um, <00:17:30.675>let <00:17:30.875>me <00:17:31.074>explain <00:17:31.274>what <00:17:31.475>the <00:17:31.675>code <00:17:31.875>means.

366
00:17:33.075 --> 00:17:37.295
<00:17:33.075>So <00:17:33.215>in <00:17:33.355>the <00:17:33.495>very <00:17:33.635>top <00:17:33.775>we <00:17:33.915>have <00:17:34.055>um, <00:17:34.195>a <00:17:34.335>procedural <00:17:34.475>macro

367
00:17:37.885 --> 00:17:38.895
<00:17:37.885>with <00:17:38.339>this <00:17:38.793>hashtag

368
00:17:39.155 --> 00:17:41.135
<00:17:39.155>and <00:17:39.621>component <00:17:40.088>the <00:17:40.555>signalizes,

369
00:17:41.135 --> 00:17:43.175
<00:17:41.135>our <00:17:41.368>compile <00:17:41.601>locator <00:17:41.835>is <00:17:42.068>now <00:17:42.301>a <00:17:42.535>component.

370
00:17:43.595 --> 00:17:45.535
<00:17:43.595>It <00:17:43.828>looks <00:17:44.061>quite <00:17:44.295>similar <00:17:44.528>to <00:17:44.761>view <00:17:44.995>J.

371
00:17:45.865 --> 00:17:48.055
<00:17:45.865>There <00:17:46.040>we <00:17:46.215>have <00:17:46.390>a <00:17:46.565>function <00:17:46.740>app <00:17:46.915>and <00:17:47.090>it <00:17:47.265>returns

372
00:17:48.235 --> 00:17:50.205
<00:17:48.235>and <00:17:48.701>uh, <00:17:49.168>trade <00:17:49.635>interview

373
00:17:51.305 --> 00:17:54.925
<00:17:51.305>and <00:17:51.460>we <00:17:51.616>can <00:17:51.771>create <00:17:51.927>this <00:17:52.082>interview <00:17:52.238>with <00:17:52.393>another <00:17:52.549>macro <00:17:52.705>view

374
00:17:55.115 --> 00:18:00.025
<00:17:55.115>with <00:17:55.315>this <00:17:55.515>um, <00:17:55.715>sign, <00:17:55.915>I <00:17:56.115>dunno <00:17:56.315>the <00:17:56.515>word

375
00:18:00.805 --> 00:18:03.825
<00:18:00.805>but <00:18:01.005>only <00:18:01.205>writing <00:18:01.405>HML <00:18:01.605>is <00:18:01.805>kind <00:18:02.005>of <00:18:02.205>me

376
00:18:03.825 --> 00:18:06.065
<00:18:03.825>because <00:18:04.025>we <00:18:04.225>also <00:18:04.425>want <00:18:04.625>to <00:18:04.825>have <00:18:05.025>some <00:18:05.225>interaction

377
00:18:06.925 --> 00:18:09.905
<00:18:06.925>and <00:18:07.065>to <00:18:07.205>get <00:18:07.345>interaction <00:18:07.485>of <00:18:07.625>we <00:18:07.764>have <00:18:07.905>to <00:18:08.044>define <00:18:08.185>some <00:18:08.325>variable

378
00:18:09.905 --> 00:18:10.905
<00:18:09.905>and <00:18:10.355>they're <00:18:10.805>mutated.

379
00:18:11.485 --> 00:18:13.105
<00:18:11.485>So <00:18:11.951>something <00:18:12.418>is <00:18:12.885>happening.

380
00:18:14.205 --> 00:18:16.345
<00:18:14.205>That's <00:18:14.360>why <00:18:14.516>we <00:18:14.671>have <00:18:14.827>this <00:18:14.982>next <00:18:15.138>line <00:18:15.293>with <00:18:15.449>lead <00:18:15.605>count

381
00:18:16.805 --> 00:18:19.625
<00:18:16.805>and <00:18:17.085>set <00:18:17.365>count <00:18:17.645>equals <00:18:17.925>grade <00:18:18.205>signal.

382
00:18:21.405 --> 00:18:24.585
<00:18:21.405>Um, <00:18:21.580>a <00:18:21.754>signal <00:18:21.930>is <00:18:22.105>contrary <00:18:22.280>to <00:18:22.455>a <00:18:22.629>virtual <00:18:22.805>do

383
00:18:25.565 --> 00:18:26.985
<00:18:25.565>if <00:18:25.778>you <00:18:25.991>are <00:18:26.204>in <00:18:26.417>the <00:18:26.629>frontend <00:18:26.842>stuff.

384
00:18:27.045 --> 00:18:30.385
<00:18:27.045>So <00:18:27.200>however <00:18:27.356>it <00:18:27.511>dom <00:18:27.667>works <00:18:27.822>is <00:18:27.978>you <00:18:28.133>have <00:18:28.289>some <00:18:28.445>data

385
00:18:31.365 --> 00:18:33.665
<00:18:31.365>and <00:18:31.565>then <00:18:31.765>the <00:18:31.965>framework <00:18:32.165>is <00:18:32.365>generating <00:18:32.565>some <00:18:32.765>virtual

386
00:18:33.665 --> 00:18:35.865
<00:18:33.665>representation <00:18:33.898>of <00:18:34.131>the <00:18:34.365>HTML <00:18:34.598>that <00:18:34.831>it <00:18:35.065>wants

387
00:18:36.005 --> 00:18:38.705
<00:18:36.005>and <00:18:36.145>compares <00:18:36.285>it <00:18:36.425>to <00:18:36.565>the <00:18:36.705>real <00:18:36.845>HT <00:18:36.985>ML <00:18:37.125>that <00:18:37.265>it <00:18:37.405>has.

388
00:18:39.165 --> 00:18:40.505
<00:18:39.165>And <00:18:39.406>if <00:18:39.647>there <00:18:39.888>are <00:18:40.129>some <00:18:40.371>differences,

389
00:18:40.755 --> 00:18:43.985
<00:18:40.755>it'll <00:18:40.955>re-render <00:18:41.155>all <00:18:41.355>the <00:18:41.555>HTML <00:18:41.755>from <00:18:41.955>the <00:18:42.155>node

390
00:18:43.985 --> 00:18:45.545
<00:18:43.985>that <00:18:44.264>they've <00:18:44.544>recognized <00:18:44.824>that <00:18:45.104>it's <00:18:45.385>different

391
00:18:46.085 --> 00:18:48.585
<00:18:46.085>but <00:18:46.260>in <00:18:46.435>signals <00:18:46.610>we <00:18:46.785>are <00:18:46.960>also <00:18:47.135>defining <00:18:47.310>this <00:18:47.485>data

392
00:18:48.605 --> 00:18:50.225
<00:18:48.605>and <00:18:48.838>then <00:18:49.071>passing <00:18:49.305>it <00:18:49.538>to <00:18:49.771>our <00:18:50.005>components

393
00:18:50.605 --> 00:18:51.825
<00:18:50.605>and <00:18:50.879>if <00:18:51.154>the <00:18:51.428>signal <00:18:51.703>changes,

394
00:18:52.405 --> 00:18:54.945
<00:18:52.405>the <00:18:52.638>component <00:18:52.871>is <00:18:53.105>re <00:18:53.338>rendered <00:18:53.571>without <00:18:53.805>re

395
00:18:54.945 --> 00:18:56.465
<00:18:54.945>rendering <00:18:55.400>the <00:18:55.857>entire <00:18:56.312>tree.

396
00:18:57.365 --> 00:18:59.705
<00:18:57.365>And <00:18:57.540>that's <00:18:57.715>what <00:18:57.890>happening <00:18:58.065>with <00:18:58.240>this <00:18:58.415>create <00:18:58.590>signal <00:18:58.765>stuff.

397
00:19:00.095 --> 00:19:01.145
<00:19:00.095>Here <00:19:00.331>we <00:19:00.567>have <00:19:00.803>a <00:19:01.040>button

398
00:19:01.325 --> 00:19:02.785
<00:19:01.325>and <00:19:01.512>if <00:19:01.700>you <00:19:01.888>are <00:19:02.075>clicking <00:19:02.263>on <00:19:02.451>the <00:19:02.639>button,

399
00:19:02.785 --> 00:19:05.745
<00:19:02.785>this <00:19:02.960>is <00:19:03.135>on <00:19:03.310>click <00:19:03.485>event <00:19:03.660>handler, <00:19:03.835>we <00:19:04.010>are <00:19:04.185>having

400
00:19:10.535 --> 00:19:13.915
<00:19:10.535>um, <00:19:10.710>I <00:19:10.885>forgot <00:19:11.060>the <00:19:11.235>word, <00:19:11.410>I'm <00:19:11.585>missing <00:19:11.760>the <00:19:11.935>word

401
00:19:15.705 --> 00:19:18.795
<00:19:15.705>this <00:19:16.054>anonymous <00:19:16.405>function, <00:19:16.754>uh, <00:19:17.105>closure.

402
00:19:18.795 --> 00:19:22.475
<00:19:18.795>That's <00:19:18.950>what <00:19:19.106>I'm <00:19:19.261>missing. <00:19:19.417>Where <00:19:19.572>we <00:19:19.728>are <00:19:19.883>defining <00:19:20.039>equal <00:19:20.195>move

403
00:19:22.625 --> 00:19:25.235
<00:19:22.625>with <00:19:22.765>move, <00:19:22.905>we <00:19:23.045>are <00:19:23.185>saying <00:19:23.325>we <00:19:23.465>are <00:19:23.605>capturing <00:19:23.745>all <00:19:23.885>the <00:19:24.025>variables

404
00:19:25.865 --> 00:19:28.235
<00:19:25.865>that <00:19:26.065>the <00:19:26.265>closure <00:19:26.465>uses <00:19:26.665>and <00:19:26.865>take <00:19:27.065>the <00:19:27.265>ownership.

405
00:19:28.775 --> 00:19:31.475
<00:19:28.775>So <00:19:28.930>if <00:19:29.086>there <00:19:29.241>is <00:19:29.397>the <00:19:29.552>set <00:19:29.708>count <00:19:29.863>in <00:19:30.019>this <00:19:30.175>closure,

406
00:19:32.135 --> 00:19:33.515
<00:19:32.135>we <00:19:32.383>are <00:19:32.631>taking <00:19:32.880>ownership <00:19:33.128>of <00:19:33.377>it.

407
00:19:33.585 --> 00:19:36.835
<00:19:33.585>That <00:19:33.712>means <00:19:33.839>we <00:19:33.966>can <00:19:34.094>no <00:19:34.221>longer <00:19:34.348>use <00:19:34.475>it <00:19:34.603>inside <00:19:34.730>the <00:19:34.857>other <00:19:34.985>context

408
00:19:37.185 --> 00:19:40.795
<00:19:37.185>outside <00:19:37.534>this <00:19:37.885>viewer <00:19:38.235>macro, <00:19:38.585>Um,

409
00:19:40.795 --> 00:19:43.395
<00:19:40.795>inside <00:19:40.970>the <00:19:41.145>button <00:19:41.320>we <00:19:41.495>are <00:19:41.670>just <00:19:41.845>updating <00:19:42.020>our <00:19:42.195>signal.

410
00:19:43.575 --> 00:19:45.875
<00:19:43.575>By <00:19:43.730>clicking <00:19:43.886>on <00:19:44.041>the <00:19:44.197>button, <00:19:44.352>we <00:19:44.508>are <00:19:44.663>increasing <00:19:44.819>the <00:19:44.975>counter

411
00:19:47.095 --> 00:19:48.315
<00:19:47.095>and <00:19:47.644>that's <00:19:48.193>great.

412
00:19:48.695 --> 00:19:50.275
<00:19:48.695>And <00:19:48.895>now <00:19:49.095>we <00:19:49.294>want <00:19:49.495>to <00:19:49.695>track <00:19:49.895>the <00:19:50.095>brokers

413
00:19:50.295 --> 00:19:51.835
<00:19:50.295>how <00:19:50.526>many <00:19:50.757>times <00:19:50.988>the <00:19:51.219>user <00:19:51.450>has <00:19:51.681>clicked.

414
00:19:51.835 --> 00:19:54.035
<00:19:51.835>That's <00:19:51.990>why <00:19:52.146>there <00:19:52.301>is <00:19:52.457>this <00:19:52.612>progress <00:19:52.768>bar <00:19:52.923>on <00:19:53.079>the <00:19:53.235>bottom.

415
00:19:54.355 --> 00:19:55.875
<00:19:54.355>I <00:19:54.507>also <00:19:54.659>want <00:19:54.811>to <00:19:54.963>show <00:19:55.115>you <00:19:55.267>that <00:19:55.419>you <00:19:55.571>can <00:19:55.723>uh,

416
00:19:56.335 --> 00:19:57.835
<00:19:56.335>do <00:19:56.785>this <00:19:57.235>complex <00:19:57.685>components

417
00:19:57.975 --> 00:20:01.475
<00:19:57.975>and <00:19:58.254>um, <00:19:58.534>injected <00:19:58.814>into <00:19:59.094>each <00:19:59.375>other.

418
00:20:01.655 --> 00:20:03.275
<00:20:01.655>That's <00:20:01.888>why <00:20:02.121>I <00:20:02.355>have <00:20:02.588>this <00:20:02.821>progress <00:20:03.055>bar

419
00:20:03.275 --> 00:20:04.595
<00:20:03.275>with <00:20:03.572>the <00:20:03.869>brokers <00:20:04.166>equals <00:20:04.463>count.

420
00:20:04.985 --> 00:20:08.115
<00:20:04.985>This <00:20:05.140>brokers <00:20:05.296>is <00:20:05.451>another <00:20:05.607>parameter. <00:20:05.762>It <00:20:05.918>takes <00:20:06.073>a <00:20:06.229>read <00:20:06.385>signal.

421
00:20:08.585 --> 00:20:11.555
<00:20:08.585>That <00:20:08.712>means <00:20:08.839>if <00:20:08.966>we <00:20:09.094>are <00:20:09.221>modifying <00:20:09.348>our <00:20:09.475>signal, <00:20:09.603>we <00:20:09.730>at <00:20:09.857>the <00:20:09.985>right,

422
00:20:12.375 --> 00:20:14.035
<00:20:12.375>um, <00:20:12.608>we <00:20:12.841>are <00:20:13.075>now <00:20:13.308>re <00:20:13.541>rendering <00:20:13.775>the

423
00:20:14.035 --> 00:20:15.355
<00:20:14.035>component <00:20:14.332>with <00:20:14.629>this <00:20:14.926>read <00:20:15.223>signal.

424
00:20:16.305 --> 00:20:18.675
<00:20:16.305>Here <00:20:16.460>we <00:20:16.616>have <00:20:16.771>this <00:20:16.927>progress <00:20:17.082>and <00:20:17.238>it <00:20:17.393>takes <00:20:17.549>the <00:20:17.705>value.

425
00:20:18.735 --> 00:20:22.235
<00:20:18.735>So <00:20:18.890>if <00:20:19.046>you're <00:20:19.201>clicking <00:20:19.357>it, <00:20:19.512>the <00:20:19.668>progress <00:20:19.823>bar <00:20:19.979>will <00:20:20.135>increase.

426
00:20:26.215 --> 00:20:28.545
<00:20:26.215>Then <00:20:26.448>there <00:20:26.681>are <00:20:26.915>also <00:20:27.148>server <00:20:27.381>components <00:20:27.615>similar

427
00:20:28.765 --> 00:20:30.225
<00:20:28.765>to <00:20:29.203>react <00:20:29.641>server <00:20:30.079>components.

428
00:20:30.625 --> 00:20:31.865
<00:20:30.625>I <00:20:30.811>just <00:20:30.997>want <00:20:31.183>to <00:20:31.369>uh, <00:20:31.555>mention <00:20:31.741>it

429
00:20:31.865 --> 00:20:33.185
<00:20:31.865>because <00:20:32.034>I'm <00:20:32.204>running <00:20:32.374>a <00:20:32.543>bit <00:20:32.713>out <00:20:32.883>of <00:20:33.053>time.

430
00:20:34.725 --> 00:20:36.185
<00:20:34.725>Um, <00:20:34.987>just <00:20:35.250>the <00:20:35.513>same <00:20:35.776>story <00:20:36.039>here.

431
00:20:36.185 --> 00:20:38.185
<00:20:36.185>We <00:20:36.312>have <00:20:36.439>a <00:20:36.566>button <00:20:36.694>and <00:20:36.821>if <00:20:36.948>we <00:20:37.075>are <00:20:37.203>clicking <00:20:37.330>on <00:20:37.457>the <00:20:37.585>button,

432
00:20:38.205 --> 00:20:42.105
<00:20:38.205>we <00:20:38.405>want <00:20:38.605>to <00:20:38.804>execute <00:20:39.004>logic <00:20:39.205>inside <00:20:39.405>the <00:20:39.605>server,

433
00:20:42.335 --> 00:20:44.785
<00:20:42.335>therefore <00:20:42.510>we <00:20:42.685>have <00:20:42.860>to <00:20:43.035>move <00:20:43.210>again <00:20:43.385>capturing <00:20:43.560>the <00:20:43.735>environment

434
00:20:45.025 --> 00:20:47.610
<00:20:45.025>variables <00:20:45.225>then <00:20:45.425>could <00:20:45.625>be <00:20:45.825>spawning <00:20:46.025>a <00:20:46.225>new <00:20:46.425>threat.

435
00:20:47.635 --> 00:20:48.885
<00:20:47.635>This <00:20:47.916>is <00:20:48.197>returning <00:20:48.478>a <00:20:48.760>future

436
00:20:49.985 --> 00:20:52.125
<00:20:49.985>and <00:20:50.185>to <00:20:50.385>wait <00:20:50.584>until <00:20:50.784>the <00:20:50.985>future <00:20:51.185>is <00:20:51.385>done.

437
00:20:52.125 --> 00:20:53.525
<00:20:52.125>We <00:20:52.440>have <00:20:52.755>this <00:20:53.070>AWAI <00:20:53.385>um,

438
00:20:54.355 --> 00:20:57.755
<00:20:54.355>keyword <00:20:54.530>at <00:20:54.705>the <00:20:54.880>very <00:20:55.055>end <00:20:55.230>in <00:20:55.405>the <00:20:55.580>spawn <00:20:55.755>oak.

439
00:20:57.855 --> 00:21:00.315
<00:20:57.855>We <00:20:57.971>are <00:20:58.088>calling <00:20:58.205>the <00:20:58.321>function <00:20:58.438>of <00:20:58.555>the <00:20:58.671>thermo <00:20:58.788>with <00:20:58.905>this <00:20:59.021>A <00:20:59.138>to <00:20:59.255>do

440
00:21:00.315 --> 00:21:02.435
<00:21:00.315>and <00:21:00.470>we <00:21:00.626>are <00:21:00.781>passing <00:21:00.937>at <00:21:01.092>a <00:21:01.248>to <00:21:01.403>do <00:21:01.559>uh, <00:21:01.715>name

441
00:21:03.255 --> 00:21:04.555
<00:21:03.255>and <00:21:03.489>the <00:21:03.723>right <00:21:03.957>we <00:21:04.191>are <00:21:04.425>setting,

442
00:21:05.535 --> 00:21:07.715
<00:21:05.535>we <00:21:05.735>are <00:21:05.935>seeing <00:21:06.135>what <00:21:06.335>happens <00:21:06.535>on <00:21:06.735>the <00:21:06.935>server.

443
00:21:07.735 --> 00:21:10.275
<00:21:07.735>We <00:21:07.909>have <00:21:08.084>some <00:21:08.260>database <00:21:08.435>storing <00:21:08.610>the <00:21:08.784>to <00:21:08.959>do <00:21:09.135>command

444
00:21:10.655 --> 00:21:13.035
<00:21:10.655>and <00:21:10.830>then <00:21:11.004>giving <00:21:11.180>back <00:21:11.355>some <00:21:11.530>response <00:21:11.705>to <00:21:11.879>the <00:21:12.055>user.

445
00:21:13.935 --> 00:21:16.475
<00:21:13.935>Um, <00:21:14.075>there <00:21:14.215>other <00:21:14.355>frameworks <00:21:14.495>if <00:21:14.635>you <00:21:14.774>want <00:21:14.915>to <00:21:15.054>check <00:21:15.195>them <00:21:15.335>out.

446
00:21:17.655 --> 00:21:21.195
<00:21:17.655>So <00:21:17.771>the <00:21:17.888>last <00:21:18.004>words <00:21:18.121>I <00:21:18.238>want <00:21:18.355>to <00:21:18.471>say <00:21:18.588>is, <00:21:18.705>is <00:21:18.821>web <00:21:18.938>assembly <00:21:19.055>really

447
00:21:21.195 --> 00:21:22.755
<00:21:21.195>that <00:21:21.428>slow <00:21:21.661>and <00:21:21.895>wise <00:21:22.128>nobody <00:21:22.361>using <00:21:22.595>it.

448
00:21:23.575 --> 00:21:26.155
<00:21:23.575>So <00:21:23.808>we <00:21:24.041>see <00:21:24.275>here <00:21:24.508>a <00:21:24.741>small <00:21:24.975>comparison

449
00:21:26.505 --> 00:21:29.075
<00:21:26.505>besides <00:21:26.855>frameworks <00:21:27.205>like <00:21:27.555>vanilla <00:21:27.905>js,

450
00:21:29.075 --> 00:21:30.275
<00:21:29.075>which <00:21:29.345>is <00:21:29.615>usually <00:21:29.885>the <00:21:30.155>fastest.

451
00:21:31.065 --> 00:21:33.995
<00:21:31.065>Then <00:21:31.205>we <00:21:31.345>have <00:21:31.485>solid <00:21:31.625>js, <00:21:31.765>which <00:21:31.905>is <00:21:32.045>also <00:21:32.185>built <00:21:32.325>around <00:21:32.465>signals.

452
00:21:33.995 --> 00:21:35.035
<00:21:33.995>Then <00:21:34.307>we <00:21:34.619>see <00:21:34.931>leptos

453
00:21:35.255 --> 00:21:37.235
<00:21:35.255>and <00:21:35.455>then <00:21:35.655>we <00:21:35.855>see <00:21:36.055>other <00:21:36.255>major <00:21:36.455>frameworks <00:21:36.655>view

454
00:21:37.385 --> 00:21:38.595
<00:21:37.385>annular <00:21:37.929>and <00:21:38.474>react.

455
00:21:39.615 --> 00:21:41.595
<00:21:39.615>And <00:21:39.790>the <00:21:39.965>most <00:21:40.140>important <00:21:40.315>thing <00:21:40.490>is <00:21:40.665>the <00:21:40.840>last <00:21:41.015>row.

456
00:21:41.895 --> 00:21:43.595
<00:21:41.895>The <00:21:42.245>way <00:21:42.595>the <00:21:42.945>geometry <00:21:43.295>means.

457
00:21:44.615 --> 00:21:48.075
<00:21:44.615>Um, <00:21:44.815>so <00:21:45.015>the <00:21:45.215>benchmark <00:21:45.415>is <00:21:45.615>doing <00:21:45.815>a <00:21:46.015>couple

458
00:21:48.075 --> 00:21:49.955
<00:21:48.075>of <00:21:48.308>tests <00:21:48.541>like <00:21:48.775>rating <00:21:49.008>roles, <00:21:49.241>selecting <00:21:49.475>roles,

459
00:21:49.955 --> 00:21:51.115
<00:21:49.955>clearing <00:21:50.216>roles <00:21:50.476>and <00:21:50.738>so <00:21:50.999>on.

460
00:21:51.335 --> 00:21:52.555
<00:21:51.335>And <00:21:51.554>then <00:21:51.774>we <00:21:51.993>normalize <00:21:52.213>the <00:21:52.433>data

461
00:21:52.615 --> 00:21:54.595
<00:21:52.615>and <00:21:52.815>can <00:21:53.015>compare <00:21:53.215>the <00:21:53.415>frameworks <00:21:53.615>by <00:21:53.815>each <00:21:54.015>other.

462
00:21:55.015 --> 00:21:57.235
<00:21:55.015>And <00:21:55.170>there <00:21:55.326>we <00:21:55.481>see <00:21:55.637>that <00:21:55.792>laptops <00:21:55.948>is <00:21:56.103>still <00:21:56.259>faster <00:21:56.415>than

463
00:21:57.235 --> 00:21:58.275
<00:21:57.235>the <00:21:57.703>major <00:21:58.171>framework.

464
00:21:58.295 --> 00:21:59.955
<00:21:58.295>So <00:21:58.575>it's <00:21:58.855>not <00:21:59.135>a <00:21:59.415>bad <00:21:59.695>result.

465
00:22:01.365 --> 00:22:03.155
<00:22:01.365>Let's <00:22:01.598>switch <00:22:01.831>over <00:22:02.065>to <00:22:02.298>the <00:22:02.531>backend <00:22:02.765>side

466
00:22:03.155 --> 00:22:06.115
<00:22:03.155>because <00:22:03.282>now <00:22:03.409>we <00:22:03.536>are <00:22:03.664>can <00:22:03.791>we <00:22:03.918>now <00:22:04.045>can <00:22:04.173>build <00:22:04.300>some <00:22:04.427>nice <00:22:04.555>little

467
00:22:06.115 --> 00:22:09.395
<00:22:06.115>front <00:22:06.255>end <00:22:06.395>but <00:22:06.535>we <00:22:06.675>also <00:22:06.815>want <00:22:06.955>to <00:22:07.095>uh, <00:22:07.235>maybe <00:22:07.375>decouple <00:22:07.515>it

468
00:22:09.395 --> 00:22:11.435
<00:22:09.395>and <00:22:09.628>not <00:22:09.861>use <00:22:10.095>the <00:22:10.328>laptop <00:22:10.561>server <00:22:10.795>functions.

469
00:22:13.095 --> 00:22:15.315
<00:22:13.095>Um, <00:22:13.250>what <00:22:13.406>we're <00:22:13.561>seeing <00:22:13.717>here <00:22:13.872>is <00:22:14.028>the <00:22:14.183>two <00:22:14.339>P <00:22:14.495>path.

470
00:22:15.375 --> 00:22:17.275
<00:22:15.375>So <00:22:15.608>this <00:22:15.841>is <00:22:16.075>the <00:22:16.308>rest <00:22:16.541>API <00:22:16.775>generator.

471
00:22:17.485 --> 00:22:20.555
<00:22:17.485>There <00:22:17.625>we <00:22:17.764>are <00:22:17.905>passing <00:22:18.044>in <00:22:18.185>the <00:22:18.324>open <00:22:18.465>API <00:22:18.604>spec <00:22:18.745>if <00:22:18.885>you

472
00:22:20.555 --> 00:22:21.595
<00:22:20.555>have <00:22:20.789>ever <00:22:21.023>seen <00:22:21.257>it <00:22:21.491>there.

473
00:22:21.595 --> 00:22:23.795
<00:22:21.595>We <00:22:21.770>can <00:22:21.945>define <00:22:22.120>some <00:22:22.295>responses <00:22:22.470>made <00:22:22.645>re <00:22:22.820>request <00:22:22.995>body,

474
00:22:24.365 --> 00:22:27.315
<00:22:24.365>maybe <00:22:24.645>some <00:22:24.925>description <00:22:25.205>and <00:22:25.485>so <00:22:25.765>on.

475
00:22:27.315 --> 00:22:30.715
<00:22:27.315>This <00:22:27.455>is <00:22:27.595>kind <00:22:27.735>of <00:22:27.875>a <00:22:28.015>wrap <00:22:28.155>around <00:22:28.295>this <00:22:28.435>open <00:22:28.575>API <00:22:28.715>spec,

476
00:22:31.005 --> 00:22:34.875
<00:22:31.005>which <00:22:31.160>is <00:22:31.316>then <00:22:31.471>generating <00:22:31.627>this <00:22:31.782>nice <00:22:31.938>little <00:22:32.093>colors <00:22:32.249>over <00:22:32.405>there

477
00:22:34.875 --> 00:22:36.435
<00:22:34.875>with <00:22:35.155>a <00:22:35.435>get <00:22:35.715>route <00:22:35.995>slash <00:22:36.275>students

478
00:22:36.545 --> 00:22:39.275
<00:22:36.545>with <00:22:36.661>a <00:22:36.778>post <00:22:36.895>row <00:22:37.011>slash <00:22:37.128>students <00:22:37.245>with <00:22:37.361>a <00:22:37.478>put <00:22:37.595>route <00:22:37.711>and <00:22:37.828>so <00:22:37.945>on.

479
00:22:40.575 --> 00:22:44.475
<00:22:40.575>And <00:22:40.691>as <00:22:40.808>we <00:22:40.925>have <00:22:41.041>seen <00:22:41.158>before, <00:22:41.275>we <00:22:41.391>are <00:22:41.508>creating <00:22:41.625>uh, <00:22:41.741>the <00:22:41.858>best <00:22:41.975>API

480
00:22:44.475 --> 00:22:46.195
<00:22:44.475>with <00:22:44.754>and <00:22:45.034>it <00:22:45.314>has <00:22:45.594>a <00:22:45.875>macro

481
00:22:47.175 --> 00:22:50.875
<00:22:47.175>and <00:22:47.315>it <00:22:47.455>starts <00:22:47.595>with <00:22:47.735>this <00:22:47.875>hashtag <00:22:48.014>get, <00:22:48.155>which <00:22:48.294>is <00:22:48.435>signifying <00:22:48.575>the

482
00:22:51.615 --> 00:22:53.195
<00:22:51.615>web <00:22:51.965>of <00:22:52.315>the <00:22:52.665>HTP <00:22:53.015>route.

483
00:22:53.775 --> 00:22:55.755
<00:22:53.775>And <00:22:53.930>then <00:22:54.086>the <00:22:54.241>actual <00:22:54.397>L <00:22:54.552>HT <00:22:54.708>P <00:22:54.863>route <00:22:55.019>is <00:22:55.175>uh,

484
00:22:55.755 --> 00:22:57.195
<00:22:55.755>which <00:22:56.187>is <00:22:56.619>slash <00:22:57.051>students.

485
00:22:57.485 --> 00:23:00.315
<00:22:57.485>After <00:22:57.718>that <00:22:57.951>we <00:22:58.185>are <00:22:58.418>defying <00:22:58.651>our <00:22:58.885>method.

486
00:23:00.945 --> 00:23:02.595
<00:23:00.945>It's <00:23:01.411>called <00:23:01.878>list <00:23:02.345>students.

487
00:23:02.735 --> 00:23:05.155
<00:23:02.735>It <00:23:02.909>takes <00:23:03.084>a <00:23:03.260>student <00:23:03.435>service <00:23:03.610>which <00:23:03.784>is <00:23:03.959>our <00:23:04.135>dependency.

488
00:23:05.775 --> 00:23:08.155
<00:23:05.775>Um, <00:23:05.950>the <00:23:06.125>service <00:23:06.300>is <00:23:06.475>doing <00:23:06.650>kind <00:23:06.825>of <00:23:07.000>validation <00:23:07.175>maybe

489
00:23:08.175 --> 00:23:10.555
<00:23:08.175>and <00:23:08.375>then <00:23:08.575>interacting <00:23:08.774>with <00:23:08.975>a <00:23:09.175>database, <00:23:09.375>maybe <00:23:09.575>interacting

490
00:23:10.555 --> 00:23:11.755
<00:23:10.555>with <00:23:10.735>a <00:23:10.915>unit <00:23:11.095>of <00:23:11.275>work <00:23:11.455>or <00:23:11.635>whatever.

491
00:23:13.215 --> 00:23:16.275
<00:23:13.215>And <00:23:13.342>after <00:23:13.469>that <00:23:13.596>we <00:23:13.724>are <00:23:13.851>giving <00:23:13.978>back <00:23:14.105>a <00:23:14.233>result, <00:23:14.360>which <00:23:14.487>is <00:23:14.615>a

492
00:23:16.995 --> 00:23:18.755
<00:23:16.995>HDP <00:23:17.228>response, <00:23:17.461>which <00:23:17.695>is <00:23:17.928>a <00:23:18.161>good <00:23:18.395>path.

493
00:23:19.455 --> 00:23:22.915
<00:23:19.455>And <00:23:19.571>an <00:23:19.688>API <00:23:19.804>error, <00:23:19.921>an <00:23:20.038>API <00:23:20.155>error <00:23:20.271>in <00:23:20.388>this <00:23:20.504>case <00:23:20.621>it's <00:23:20.738>an <00:23:20.855>EAM

494
00:23:22.945 --> 00:23:24.995
<00:23:22.945>that <00:23:23.225>is <00:23:23.504>catching <00:23:23.784>all <00:23:24.064>the <00:23:24.345>errors

495
00:23:24.995 --> 00:23:26.595
<00:23:24.995>that <00:23:25.228>can <00:23:25.461>happen <00:23:25.695>in <00:23:25.928>the <00:23:26.161>layers <00:23:26.395>below.

496
00:23:27.175 --> 00:23:30.035
<00:23:27.175>For <00:23:27.315>example, <00:23:27.455>if <00:23:27.595>your <00:23:27.735>database <00:23:27.875>is <00:23:28.014>giving <00:23:28.155>back, <00:23:28.294>uh, <00:23:28.435>not <00:23:28.575>found,

497
00:23:30.375 --> 00:23:32.235
<00:23:30.375>you <00:23:30.575>can <00:23:30.775>catch <00:23:30.975>that <00:23:31.175>with <00:23:31.375>this <00:23:31.575>API <00:23:31.775>error

498
00:23:32.255 --> 00:23:35.915
<00:23:32.255>and <00:23:32.395>then <00:23:32.535>build <00:23:32.675>a <00:23:32.815>global <00:23:32.955>middleware <00:23:33.095>where <00:23:33.235>you <00:23:33.375>map <00:23:33.515>the <00:23:33.655>uh,

499
00:23:36.055 --> 00:23:37.635
<00:23:36.055>not <00:23:36.255>found <00:23:36.455>error <00:23:36.655>2 <00:23:36.855>0 <00:23:37.055>4, <00:23:37.255>0 <00:23:37.455>4.

500
00:23:37.855 --> 00:23:41.035
<00:23:37.855>That's <00:23:38.010>why <00:23:38.166>we <00:23:38.321>have <00:23:38.477>an <00:23:38.632>API <00:23:38.788>error, <00:23:38.943>API <00:23:39.099>error <00:23:39.255>here.

501
00:23:41.625 --> 00:23:44.235
<00:23:41.625>Then <00:23:41.858>as <00:23:42.091>in <00:23:42.325>any <00:23:42.558>any <00:23:42.791>other <00:23:43.025>language,

502
00:23:45.945 --> 00:23:49.045
<00:23:45.945>we <00:23:46.085>are <00:23:46.225>transforming <00:23:46.365>the <00:23:46.504>data <00:23:46.645>of <00:23:46.784>our <00:23:46.925>request <00:23:47.064>to <00:23:47.205>some <00:23:47.345>kind

503
00:23:49.045 --> 00:23:51.485
<00:23:49.045>of <00:23:49.200>domain <00:23:49.356>model, <00:23:49.511>maybe <00:23:49.667>a <00:23:49.822>kind <00:23:49.978>of <00:23:50.133>a <00:23:50.289>core <00:23:50.445>model,

504
00:23:52.555 --> 00:23:53.965
<00:23:52.555>them <00:23:52.808>passing <00:23:53.062>it <00:23:53.316>to <00:23:53.570>our <00:23:53.823>service

505
00:23:54.305 --> 00:23:57.925
<00:23:54.305>and <00:23:54.460>depending <00:23:54.616>on <00:23:54.771>the <00:23:54.927>results <00:23:55.082>we <00:23:55.238>are <00:23:55.393>giving <00:23:55.549>back, <00:23:55.705>um,

506
00:23:57.985 --> 00:23:59.645
<00:23:57.985>the <00:23:58.185>success <00:23:58.385>or <00:23:58.584>the <00:23:58.784>error <00:23:58.985>to <00:23:59.185>the <00:23:59.385>user

507
00:24:02.045 --> 00:24:04.995
<00:24:02.045>There <00:24:02.200>Other <00:24:02.356>frameworks <00:24:02.511>if <00:24:02.667>to <00:24:02.822>want <00:24:02.978>to <00:24:03.133>check <00:24:03.289>them <00:24:03.445>out.

508
00:24:07.295 --> 00:24:08.875
<00:24:07.295>Um, <00:24:07.575>the <00:24:07.855>next <00:24:08.135>thing <00:24:08.415>is <00:24:08.695>observability.

509
00:24:10.395 --> 00:24:12.195
<00:24:10.395>I <00:24:10.595>just <00:24:10.795>want <00:24:10.995>to <00:24:11.195>show <00:24:11.395>that <00:24:11.595>it's <00:24:11.795>possible

510
00:24:12.215 --> 00:24:14.955
<00:24:12.215>to <00:24:12.355>create <00:24:12.495>a <00:24:12.635>metrics <00:24:12.774>endpoint <00:24:12.915>if <00:24:13.054>you <00:24:13.195>are <00:24:13.334>working <00:24:13.475>in <00:24:13.615>this

511
00:24:14.955 --> 00:24:16.275
<00:24:14.955>cloud <00:24:15.549>native <00:24:16.143>environment,

512
00:24:16.715 --> 00:24:19.795
<00:24:16.715>a <00:24:16.870>metrics <00:24:17.026>endpoint <00:24:17.181>is <00:24:17.337>giving <00:24:17.492>a <00:24:17.648>data <00:24:17.803>in <00:24:17.959>the <00:24:18.115>uh,

513
00:24:19.795 --> 00:24:21.995
<00:24:19.795>Prometheus <00:24:19.995>format <00:24:20.195>is <00:24:20.395>called <00:24:20.595>the <00:24:20.795>open <00:24:20.995>metrics <00:24:21.195>format.

514
00:24:22.065 --> 00:24:24.475
<00:24:22.065>It's <00:24:22.220>kind <00:24:22.376>of <00:24:22.531>a <00:24:22.687>text <00:24:22.842>format <00:24:22.998>where <00:24:23.153>you <00:24:23.309>say, <00:24:23.465>oh

515
00:24:24.535 --> 00:24:27.275
<00:24:24.535>how <00:24:24.710>many <00:24:24.885>times <00:24:25.060>a <00:24:25.235>request <00:24:25.410>came <00:24:25.585>in, <00:24:25.760>how <00:24:25.935>many

516
00:24:27.335 --> 00:24:28.915
<00:24:27.335>of <00:24:27.685>these <00:24:28.035>requests <00:24:28.385>are <00:24:28.735>400?

517
00:24:29.095 --> 00:24:31.915
<00:24:29.095>How <00:24:29.270>many <00:24:29.445>of <00:24:29.620>them <00:24:29.795>are <00:24:29.970>500 <00:24:30.145>and <00:24:30.320>so <00:24:30.495>on.

518
00:24:31.915 --> 00:24:35.235
<00:24:31.915>And <00:24:32.115>then <00:24:32.315>you <00:24:32.514>can <00:24:32.715>visualize <00:24:32.915>it <00:24:33.115>with <00:24:33.315>Grafana

519
00:24:35.235 --> 00:24:37.795
<00:24:35.235>that <00:24:35.409>we <00:24:35.584>are <00:24:35.760>seeing <00:24:35.935>at <00:24:36.110>the <00:24:36.284>very, <00:24:36.459>very <00:24:36.635>top.

520
00:24:41.765 --> 00:24:44.065
<00:24:41.765>And <00:24:41.920>there <00:24:42.076>we <00:24:42.231>see <00:24:42.387>some <00:24:42.542>code <00:24:42.698>how <00:24:42.853>to <00:24:43.009>implement <00:24:43.165>it.

521
00:24:44.065 --> 00:24:45.905
<00:24:44.065>Usually <00:24:44.265>you <00:24:44.465>have <00:24:44.665>a <00:24:44.865>framework <00:24:45.065>where <00:24:45.265>you <00:24:45.465>need

522
00:24:45.905 --> 00:24:48.065
<00:24:45.905>to <00:24:46.138>implement <00:24:46.371>trades <00:24:46.605>in <00:24:46.838>ActX, <00:24:47.071>you <00:24:47.305>need

523
00:24:48.065 --> 00:24:50.185
<00:24:48.065>to <00:24:48.240>implement <00:24:48.415>a <00:24:48.590>transform <00:24:48.765>trade <00:24:48.940>in <00:24:49.115>the <00:24:49.290>service <00:24:49.465>trade

524
00:24:50.765 --> 00:24:53.105
<00:24:50.765>and <00:24:50.998>it's <00:24:51.231>quite <00:24:51.465>straightforward <00:24:51.698>if <00:24:51.931>you <00:24:52.165>know

525
00:24:53.105 --> 00:24:55.225
<00:24:53.105>how <00:24:53.280>a <00:24:53.455>middleware <00:24:53.630>works, <00:24:53.805>you <00:24:53.980>usually <00:24:54.155>have <00:24:54.330>to <00:24:54.505>uh,

526
00:24:55.615 --> 00:24:57.385
<00:24:55.615>implement <00:24:55.895>them <00:24:56.175>by <00:24:56.455>executing <00:24:56.735>some <00:24:57.015>logic

527
00:24:57.385 --> 00:24:59.785
<00:24:57.385>before <00:24:57.618>then <00:24:57.851>calling <00:24:58.085>the <00:24:58.318>next <00:24:58.551>route <00:24:58.785>function

528
00:24:59.845 --> 00:25:02.305
<00:24:59.845>and <00:25:00.078>then <00:25:00.311>executing <00:25:00.545>some <00:25:00.778>logic <00:25:01.011>after <00:25:01.245>that.

529
00:25:03.935 --> 00:25:06.625
<00:25:03.935>Then <00:25:04.135>traces <00:25:04.335>is <00:25:04.534>kind <00:25:04.735>of <00:25:04.935>easy <00:25:05.135>to <00:25:05.335>implement

530
00:25:07.175 --> 00:25:10.105
<00:25:07.175>because <00:25:07.455>there's <00:25:07.735>another <00:25:08.014>macro <00:25:08.294>for <00:25:08.575>that.

531
00:25:10.105 --> 00:25:11.905
<00:25:10.105>It's <00:25:10.338>called <00:25:10.571>the <00:25:10.805>instrument <00:25:11.038>macro <00:25:11.271>over <00:25:11.505>there.

532
00:25:12.055 --> 00:25:16.705
<00:25:12.055>Then <00:25:12.182>we <00:25:12.309>can <00:25:12.436>give <00:25:12.564>it <00:25:12.691>some <00:25:12.818>nice <00:25:12.945>little <00:25:13.073>name <00:25:13.200>And <00:25:13.327>annotate <00:25:13.455>this

533
00:25:16.705 --> 00:25:19.985
<00:25:16.705>with <00:25:16.845>our <00:25:16.985>function <00:25:17.125>here <00:25:17.264>we <00:25:17.405>have <00:25:17.544>a <00:25:17.685>user <00:25:17.824>repository <00:25:17.965>which <00:25:18.105>is

534
00:25:20.185 --> 00:25:22.745
<00:25:20.185>starting <00:25:20.360>a <00:25:20.534>transaction <00:25:20.710>with <00:25:20.885>this <00:25:21.060>begin <00:25:21.235>then <00:25:21.409>executing <00:25:21.585>some

535
00:25:22.745 --> 00:25:26.065
<00:25:22.745>logic <00:25:22.978>commit <00:25:23.211>and <00:25:23.445>after <00:25:23.678>they <00:25:23.911>commit <00:25:24.145>and

536
00:25:28.095 --> 00:25:29.165
<00:25:28.095>after <00:25:28.335>all <00:25:28.576>this <00:25:28.817>is <00:25:29.058>done

537
00:25:29.165 --> 00:25:31.685
<00:25:29.165>and <00:25:29.305>executed, <00:25:29.445>we <00:25:29.585>see <00:25:29.725>the <00:25:29.865>nice <00:25:30.004>little <00:25:30.145>craft <00:25:30.284>of <00:25:30.425>the <00:25:30.565>trace

538
00:25:31.695 --> 00:25:35.125
<00:25:31.695>where <00:25:31.870>we <00:25:32.044>can <00:25:32.220>see <00:25:32.395>the <00:25:32.570>time <00:25:32.745>each <00:25:32.919>method <00:25:33.095>took.

539
00:25:40.345 --> 00:25:45.045
<00:25:40.345>So <00:25:40.472>if <00:25:40.599>you <00:25:40.726>want <00:25:40.854>to <00:25:40.981>build <00:25:41.108>some <00:25:41.235>GRPC <00:25:41.363>stuff, <00:25:41.490>there <00:25:41.617>is <00:25:41.745>rules

540
00:25:46.505 --> 00:25:48.765
<00:25:46.505>and <00:25:46.855>other <00:25:47.205>tooling <00:25:47.555>around <00:25:47.905>it,

541
00:25:48.865 --> 00:25:50.925
<00:25:48.865>but <00:25:49.145>is <00:25:49.425>a <00:25:49.705>schema <00:25:49.985>registry <00:25:50.265>similar

542
00:25:51.705 --> 00:25:53.845
<00:25:51.705>to <00:25:51.860>any <00:25:52.016>other <00:25:52.171>schema <00:25:52.327>registry <00:25:52.482>where <00:25:52.638>we <00:25:52.793>can <00:25:52.949>see, <00:25:53.105>oh,

543
00:25:53.965 --> 00:25:55.045
<00:25:53.965>I <00:25:54.207>want <00:25:54.451>to <00:25:54.694>validate <00:25:54.937>something.

544
00:25:55.895 --> 00:26:00.885
<00:25:55.895>Maybe <00:25:56.175>I <00:25:56.455>have <00:25:56.735>some <00:25:57.014>external <00:25:57.295>strt.

545
00:26:00.885 --> 00:26:03.845
<00:26:00.885>I <00:26:01.025>want <00:26:01.165>to, <00:26:01.305>IM <00:26:01.445>uh, <00:26:01.585>external <00:26:01.725>message <00:26:01.865>I <00:26:02.004>want <00:26:02.145>to <00:26:02.285>import.

546
00:26:04.715 --> 00:26:06.645
<00:26:04.715>This <00:26:04.948>is <00:26:05.181>what <00:26:05.415>we <00:26:05.648>can <00:26:05.881>see <00:26:06.115>here.

547
00:26:06.865 --> 00:26:08.765
<00:26:06.865>We <00:26:07.215>have <00:26:07.565>gnostic <00:26:07.915>as <00:26:08.265>a

548
00:26:09.945 --> 00:26:12.845
<00:26:09.945>transformation <00:26:10.178>from <00:26:10.411>our <00:26:10.645>GRPC, <00:26:10.878>well <00:26:11.111>to <00:26:11.345>HTP

549
00:26:12.845 --> 00:26:14.645
<00:26:12.845>because <00:26:13.078>maybe <00:26:13.311>we <00:26:13.545>want <00:26:13.778>to <00:26:14.011>provide <00:26:14.245>both.

550
00:26:16.025 --> 00:26:18.365
<00:26:16.025>Um, <00:26:16.375>That's <00:26:16.725>kind <00:26:17.075>of <00:26:17.425>it.

551
00:26:20.945 --> 00:26:23.285
<00:26:20.945>So <00:26:21.100>in <00:26:21.256>the <00:26:21.411>database <00:26:21.567>world <00:26:21.722>there <00:26:21.878>are <00:26:22.033>I <00:26:22.189>think <00:26:22.345>three

552
00:26:23.895 --> 00:26:26.085
<00:26:23.895>major <00:26:24.128>databases <00:26:24.361>that <00:26:24.595>we <00:26:24.828>want <00:26:25.061>to <00:26:25.295>support

553
00:26:26.145 --> 00:26:27.405
<00:26:26.145>and <00:26:26.371>see <00:26:26.598>if <00:26:26.825>this <00:26:27.052>is <00:26:27.279>working.

554
00:26:28.225 --> 00:26:29.365
<00:26:28.225>One <00:26:28.567>is <00:26:28.908>the <00:26:29.251>MongoDB.

555
00:26:29.605 --> 00:26:32.845
<00:26:29.605>I <00:26:29.745>think <00:26:29.885>everyone <00:26:30.025>uh, <00:26:30.165>fell <00:26:30.305>for <00:26:30.445>the <00:26:30.585>hype <00:26:30.725>in <00:26:30.865>around <00:26:31.005>2017.

556
00:26:32.985 --> 00:26:35.965
<00:26:32.985>Now <00:26:33.125>it's <00:26:33.264>going <00:26:33.405>back <00:26:33.544>to <00:26:33.685>uh, <00:26:33.824>use <00:26:33.965>Postgres <00:26:34.104>all <00:26:34.245>the <00:26:34.385>time.

557
00:26:36.275 --> 00:26:38.925
<00:26:36.275>It's <00:26:36.430>kind <00:26:36.586>of <00:26:36.741>easier <00:26:36.897>to <00:26:37.052>use <00:26:37.208>if <00:26:37.363>you're <00:26:37.519>doing <00:26:37.675>straightforward

558
00:26:38.925 --> 00:26:41.085
<00:26:38.925>stuff <00:26:39.158>but <00:26:39.391>it <00:26:39.625>can <00:26:39.858>get <00:26:40.091>really <00:26:40.325>complicated

559
00:26:41.385 --> 00:26:42.405
<00:26:41.385>and <00:26:41.538>I <00:26:41.691>know <00:26:41.844>a <00:26:41.997>lot <00:26:42.150>of <00:26:42.303>guys

560
00:26:42.405 --> 00:26:45.805
<00:26:42.405>that <00:26:42.560>are <00:26:42.716>complaining <00:26:42.871>about <00:26:43.027>the <00:26:43.182>MongoDB <00:26:43.338>crate, <00:26:43.493>so <00:26:43.649>you <00:26:43.805>have

561
00:26:45.805 --> 00:26:50.435
<00:26:45.805>to <00:26:45.921>be <00:26:46.038>careful <00:26:46.155>while <00:26:46.271>checking <00:26:46.388>if <00:26:46.505>you <00:26:46.621>want <00:26:46.738>to <00:26:46.855>use <00:26:46.971>it <00:26:47.088>or <00:26:47.205>not.

562
00:26:51.465 --> 00:26:54.755
<00:26:51.465>Then <00:26:51.620>SQL <00:26:51.776>is <00:26:51.931>kind <00:26:52.087>of <00:26:52.242>the <00:26:52.398>standard <00:26:52.553>I <00:26:52.709>would <00:26:52.865>say

563
00:26:54.935 --> 00:26:56.555
<00:26:54.935>for <00:26:55.401>the <00:26:55.868>data <00:26:56.335>storing.

564
00:26:56.735 --> 00:26:58.675
<00:26:56.735>That's <00:26:56.909>why <00:26:57.084>there's <00:26:57.260>a <00:26:57.435>lot <00:26:57.610>of <00:26:57.784>support <00:26:57.959>for <00:26:58.135>it.

565
00:26:58.905 --> 00:27:03.035
<00:26:58.905>There's <00:26:59.080>an <00:26:59.254>ORM <00:26:59.430>called <00:26:59.605>CRM <00:26:59.780>made <00:26:59.955>us <00:27:00.129>also <00:27:00.305>diesel.

566
00:27:03.185 --> 00:27:06.715
<00:27:03.185>There's <00:27:03.360>an <00:27:03.534>ASIC <00:27:03.710>one, <00:27:03.885>A <00:27:04.060>think <00:27:04.235>variant <00:27:04.409>of <00:27:04.585>diesel

567
00:27:07.335 --> 00:27:10.155
<00:27:07.335>and <00:27:07.510>I <00:27:07.685>think <00:27:07.860>the <00:27:08.035>most <00:27:08.210>popular <00:27:08.385>one <00:27:08.560>is <00:27:08.735>SQLX

568
00:27:10.185 --> 00:27:12.715
<00:27:10.185>that <00:27:10.360>we <00:27:10.534>also <00:27:10.710>saw <00:27:10.885>in <00:27:11.060>the <00:27:11.235>very, <00:27:11.409>very <00:27:11.585>beginning.

569
00:27:14.655 --> 00:27:17.035
<00:27:14.655>Um, <00:27:14.855>I <00:27:15.055>will <00:27:15.254>go <00:27:15.455>over <00:27:15.655>the <00:27:15.855>example <00:27:16.055>quickly.

570
00:27:17.495 --> 00:27:19.995
<00:27:17.495>So <00:27:17.635>here <00:27:17.774>we <00:27:17.915>want <00:27:18.054>to <00:27:18.195>get <00:27:18.334>the <00:27:18.475>countries <00:27:18.614>of <00:27:18.754>our <00:27:18.895>database.

571
00:27:20.295 --> 00:27:21.835
<00:27:20.295>The <00:27:20.526>country <00:27:20.757>has <00:27:20.988>an <00:27:21.219>id, <00:27:21.450>a <00:27:21.681>name

572
00:27:22.775 --> 00:27:25.275
<00:27:22.775>and <00:27:23.475>so <00:27:24.175>on

573
00:27:27.205 --> 00:27:29.275
<00:27:27.205>there <00:27:27.438>we <00:27:27.671>are <00:27:27.905>just <00:27:28.138>executing <00:27:28.371>the <00:27:28.605>cur

574
00:27:30.415 --> 00:27:32.435
<00:27:30.415>and <00:27:30.615>it'll <00:27:30.815>be <00:27:31.014>checked <00:27:31.215>during <00:27:31.415>the <00:27:31.615>compiler <00:27:31.815>time.

575
00:27:32.435 --> 00:27:35.475
<00:27:32.435>It <00:27:32.668>will <00:27:32.901>be <00:27:33.135>passed <00:27:33.368>into <00:27:33.601>our <00:27:33.835>instruct.

576
00:27:37.655 --> 00:27:39.235
<00:27:37.655>The <00:27:38.121>final <00:27:38.588>step, <00:27:39.055>Cassandra,

577
00:27:39.435 --> 00:27:42.915
<00:27:39.435>I <00:27:39.590>think <00:27:39.746>there <00:27:39.901>was <00:27:40.057>a <00:27:40.212>cool <00:27:40.368>talk <00:27:40.523>yesterday <00:27:40.679>evening, <00:27:40.835>um,

578
00:27:42.965 --> 00:27:45.555
<00:27:42.965>about <00:27:43.198>the <00:27:43.431>difference <00:27:43.665>between <00:27:43.898>Cassandra <00:27:44.131>and <00:27:44.365>SQL

579
00:27:45.555 --> 00:27:46.795
<00:27:45.555>and <00:27:45.834>how <00:27:46.113>they <00:27:46.392>approach <00:27:46.671>it.

580
00:27:47.905 --> 00:27:49.465
<00:27:47.905>I <00:27:48.138>think <00:27:48.371>Cassandra <00:27:48.605>is <00:27:48.838>a <00:27:49.071>great <00:27:49.305>database

581
00:27:50.245 --> 00:27:54.325
<00:27:50.245>and <00:27:50.372>depending <00:27:50.499>on <00:27:50.626>the <00:27:50.754>use <00:27:50.881>case, <00:27:51.008>if <00:27:51.135>you <00:27:51.263>really <00:27:51.390>want <00:27:51.517>to <00:27:51.645>uh,

582
00:27:54.455 --> 00:27:56.525
<00:27:54.455>scale <00:27:54.629>very <00:27:54.804>highly, <00:27:54.980>you <00:27:55.155>may <00:27:55.330>want <00:27:55.504>to <00:27:55.679>use <00:27:55.855>it

583
00:27:56.985 --> 00:27:58.885
<00:27:56.985>and <00:27:57.264>it's <00:27:57.544>very <00:27:57.824>possible <00:27:58.104>in <00:27:58.385>rust

584
00:27:58.915 --> 00:28:01.445
<00:27:58.915>because <00:27:59.195>there's <00:27:59.475>the <00:27:59.754>Cassandra <00:28:00.034>CPP <00:28:00.315>trade

585
00:28:03.105 --> 00:28:04.605
<00:28:03.105>and <00:28:03.442>that's <00:28:03.780>kind <00:28:04.117>of <00:28:04.455>interesting

586
00:28:04.605 --> 00:28:08.845
<00:28:04.605>because <00:28:04.760>CPP <00:28:04.916>is <00:28:05.071>using <00:28:05.227>another <00:28:05.382>trade <00:28:05.538>called <00:28:05.693>the <00:28:05.849>CXX <00:28:06.005>bridge

587
00:28:09.235 --> 00:28:12.805
<00:28:09.235>because <00:28:09.390>c <00:28:09.546>plus <00:28:09.701>plus <00:28:09.857>has <00:28:10.012>a <00:28:10.168>different <00:28:10.323>implementation <00:28:10.479>than <00:28:10.635>the

588
00:28:12.875 --> 00:28:13.965
<00:28:12.875>rust <00:28:13.365>memory <00:28:13.856>model.

589
00:28:14.505 --> 00:28:17.685
<00:28:14.505>And <00:28:14.632>we <00:28:14.759>want <00:28:14.886>to <00:28:15.014>use <00:28:15.141>the <00:28:15.268>c <00:28:15.395>plus <00:28:15.523>plus <00:28:15.650>implementation <00:28:15.777>for <00:28:15.905>it

590
00:28:17.685 --> 00:28:19.845
<00:28:17.685>because <00:28:17.860>we <00:28:18.034>don't <00:28:18.210>want <00:28:18.385>to <00:28:18.560>implement <00:28:18.735>it <00:28:18.909>from <00:28:19.085>scratch.

591
00:28:20.305 --> 00:28:22.405
<00:28:20.305>That's <00:28:20.480>why <00:28:20.655>we <00:28:20.830>want <00:28:21.005>to <00:28:21.180>use <00:28:21.355>some <00:28:21.530>external <00:28:21.705>stuff

592
00:28:22.745 --> 00:28:23.885
<00:28:22.745>to <00:28:23.001>save <00:28:23.258>us <00:28:23.514>some <00:28:23.771>time.

593
00:28:24.145 --> 00:28:26.725
<00:28:24.145>And <00:28:24.345>it <00:28:24.545>is <00:28:24.745>possible <00:28:24.945>we <00:28:25.145>are <00:28:25.345>this <00:28:25.545>bridging

594
00:28:26.725 --> 00:28:30.125
<00:28:26.725>where <00:28:26.880>we <00:28:27.036>are <00:28:27.191>mapping <00:28:27.347>the <00:28:27.502>memory <00:28:27.658>around <00:28:27.813>just <00:28:27.969>to <00:28:28.125>uh,

595
00:28:30.155 --> 00:28:31.205
<00:28:30.155>highlight <00:28:30.470>that <00:28:30.784>a <00:28:31.100>bit.

596
00:28:32.865 --> 00:28:35.885
<00:28:32.865>The <00:28:33.020>last <00:28:33.176>thing <00:28:33.331>to <00:28:33.487>build <00:28:33.642>a <00:28:33.798>solid <00:28:33.953>backend <00:28:34.109>is <00:28:34.265>message

597
00:28:35.945 --> 00:28:36.965
<00:28:35.945>queues <00:28:36.404>and <00:28:36.862>streaming.

598
00:28:37.565 --> 00:28:40.005
<00:28:37.565>I <00:28:37.705>think <00:28:37.845>Kafka <00:28:37.985>is <00:28:38.125>the <00:28:38.265>way <00:28:38.405>to <00:28:38.545>go <00:28:38.685>in <00:28:38.825>most <00:28:38.965>cases.

599
00:28:41.695 --> 00:28:43.885
<00:28:41.695>Maybe <00:28:41.895>it's <00:28:42.095>a <00:28:42.294>little <00:28:42.495>bit <00:28:42.695>overused <00:28:42.895>for <00:28:43.095>messages

600
00:28:43.885 --> 00:28:45.885
<00:28:43.885>because <00:28:44.351>Kafka's <00:28:44.818>quite <00:28:45.285>complex

601
00:28:46.425 --> 00:28:50.125
<00:28:46.425>and <00:28:46.552>you <00:28:46.679>need <00:28:46.806>to <00:28:46.934>get <00:28:47.061>a <00:28:47.188>managed <00:28:47.315>service <00:28:47.443>most <00:28:47.570>of <00:28:47.697>the <00:28:47.825>time

602
00:28:50.125 --> 00:28:53.165
<00:28:50.125>because <00:28:50.358>running <00:28:50.591>yourself <00:28:50.825>is <00:28:51.058>kind <00:28:51.291>of <00:28:51.525>troublesome.

603
00:28:54.385 --> 00:28:55.845
<00:28:54.385>And <00:28:54.604>here <00:28:54.823>we <00:28:55.042>see <00:28:55.261>the <00:28:55.480>same <00:28:55.699>thing.

604
00:28:55.845 --> 00:28:58.685
<00:28:55.845>We <00:28:56.078>have <00:28:56.311>some <00:28:56.545>c <00:28:56.778>plus <00:28:57.011>plus <00:28:57.245>import,

605
00:28:59.755 --> 00:29:02.525
<00:28:59.755>then <00:28:59.955>it's <00:29:00.155>really <00:29:00.355>straightforward <00:29:00.555>as <00:29:00.755>in <00:29:00.955>any <00:29:01.155>other

606
00:29:03.085 --> 00:29:05.365
<00:29:03.085>language <00:29:03.285>we <00:29:03.485>are <00:29:03.685>defining <00:29:03.885>some <00:29:04.085>consumer, <00:29:04.285>some <00:29:04.485>producer.

607
00:29:06.035 --> 00:29:07.885
<00:29:06.035>Then <00:29:06.315>we <00:29:06.595>are <00:29:06.875>consuming <00:29:07.155>the <00:29:07.435>message

608
00:29:07.885 --> 00:29:09.885
<00:29:07.885>with <00:29:08.118>this <00:29:08.351>match <00:29:08.585>consumer <00:29:08.818>receive <00:29:09.051>a <00:29:09.285>wait

609
00:29:11.265 --> 00:29:13.725
<00:29:11.265>and <00:29:11.545>we <00:29:11.825>are <00:29:12.105>receiving <00:29:12.385>the <00:29:12.665>message

610
00:29:13.865 --> 00:29:16.445
<00:29:13.865>and <00:29:14.020>then <00:29:14.176>publishing <00:29:14.331>it <00:29:14.487>to <00:29:14.642>something <00:29:14.798>else <00:29:14.953>with <00:29:15.109>this <00:29:15.265>producer.

611
00:29:18.835 --> 00:29:23.775
<00:29:18.835>The <00:29:18.962>same <00:29:19.089>goes <00:29:19.216>for <00:29:19.344>Rabbit <00:29:19.471>mq. <00:29:19.598>It's <00:29:19.725>kind <00:29:19.853>of <00:29:19.980>the <00:29:20.107>same <00:29:20.235>thing.

612
00:29:23.775 --> 00:29:25.295
<00:29:23.775>That's <00:29:24.003>why <00:29:24.231>we'll, <00:29:24.459>I <00:29:24.687>will <00:29:24.915>skip <00:29:25.143>it.

613
00:29:25.875 --> 00:29:27.735
<00:29:25.875>And <00:29:26.050>this <00:29:26.225>brings <00:29:26.400>us <00:29:26.575>to, <00:29:26.750>uh, <00:29:26.925>the <00:29:27.100>very <00:29:27.275>end.

614
00:29:28.075 --> 00:29:31.055
<00:29:28.075>It <00:29:28.308>was <00:29:28.541>quite <00:29:28.775>a <00:29:29.008>full <00:29:29.241>pack <00:29:29.475>talk

615
00:29:31.055 --> 00:29:34.295
<00:29:31.055>because <00:29:31.195>I <00:29:31.335>wanted <00:29:31.475>really <00:29:31.615>to <00:29:31.755>show <00:29:31.895>the, <00:29:32.035>uh, <00:29:32.175>adventures <00:29:32.315>it <00:29:32.455>is

616
00:29:34.295 --> 00:29:37.535
<00:29:34.295>that <00:29:34.435>Russ <00:29:34.575>brings <00:29:34.715>for <00:29:34.855>the <00:29:34.995>web <00:29:35.135>environment <00:29:35.275>that <00:29:35.415>is <00:29:35.555>really <00:29:35.695>safe

617
00:29:37.675 --> 00:29:38.695
<00:29:37.675>and <00:29:38.134>quite <00:29:38.592>easy

618
00:29:38.695 --> 00:29:40.975
<00:29:38.695>because <00:29:38.928>all <00:29:39.161>the <00:29:39.395>code <00:29:39.628>examples <00:29:39.861>were <00:29:40.095>quite

619
00:29:41.085 --> 00:29:42.245
<00:29:41.085>easy <00:29:41.433>to <00:29:41.781>understand, <00:29:42.129>right?

620
00:29:43.515 --> 00:29:46.015
<00:29:43.515>So <00:29:43.631>if <00:29:43.748>you <00:29:43.865>really <00:29:43.981>want <00:29:44.098>to <00:29:44.215>use <00:29:44.331>it, <00:29:44.448>you <00:29:44.565>can <00:29:44.681>try <00:29:44.798>it <00:29:44.915>out.

621
00:29:46.335 --> 00:29:49.795
<00:29:46.335>I <00:29:46.490>think <00:29:46.646>for <00:29:46.801>the <00:29:46.957>web <00:29:47.112>world <00:29:47.268>it's <00:29:47.423>convenient <00:29:47.579>to <00:29:47.735>use

622
00:29:49.795 --> 00:29:53.715
<00:29:49.795>because <00:29:49.995>all <00:29:50.195>the <00:29:50.395>difficult <00:29:50.595>stuff <00:29:50.795>like <00:29:50.995>lifetimes, <00:29:51.195>async

623
00:29:54.535 --> 00:29:57.035
<00:29:54.535>and <00:29:54.675>so <00:29:54.815>on <00:29:54.955>is <00:29:55.095>hidden <00:29:55.235>way <00:29:55.375>by <00:29:55.515>the <00:29:55.655>libraries <00:29:55.795>like <00:29:55.935>Tokyo,

624
00:29:57.225 --> 00:29:59.995
<00:29:57.225>like <00:29:57.425>the <00:29:57.625>rest <00:29:57.824>framework, <00:29:58.024>like <00:29:58.225>the <00:29:58.425>TC <00:29:58.625>framework.

625
00:30:01.895 --> 00:30:04.195
<00:30:01.895>And <00:30:02.175>yeah, <00:30:02.455>that's <00:30:02.735>it <00:30:03.014>for <00:30:03.295>today.