WEBVTT

1
00:00.000 --> 00:04.170
So friends, in this particular video, what I want to do to talk to you about

2
00:04.170 --> 00:04.880
the concept

3
00:04.880 --> 00:06.840
of serialization.

4
00:06.840 --> 00:08.280
And no, I know what you're thinking.

5
00:08.280 --> 00:12.620
This is not about watching a whole bunch of serial killer documentaries on

6
00:12.620 --> 00:13.400
Netflix.

7
00:13.400 --> 00:17.040
This is actually related to the management of data.

8
00:17.040 --> 00:21.830
Yeah, no, much, much less exciting, but we have to talk about it, so let's get

9
00:21.830 --> 00:22.600
to it.

10
00:22.600 --> 00:26.560
No, but seriously, serialization is actually very, very useful.

11
00:26.560 --> 00:27.560
Okay, John.

12
00:27.560 --> 00:31.410
What actually is it? Well, when we're talking about serialization, all we're
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

12
00:27.560 --> 00:31.410
What actually is it? Well, when we're talking about serialization, all we're

13
00:31.410 --> 00:31.880
talking about

14
00:31.880 --> 00:36.680
is the ability to transform data based on a particular real set.

15
00:36.680 --> 00:40.920
Now, the question is, is what set of roles are we even actually talking about?

16
00:40.920 --> 00:46.000
We're talking about the roles of the actual file format that the data is adher

17
00:46.000 --> 00:47.160
ing to.

18
00:47.160 --> 00:49.680
Hmm, okay, that sounds not so clear.

19
00:49.680 --> 00:52.160
Well, what file formats could this be?

20
00:52.160 --> 00:57.040
Well, we're talking about things like JSON or XML, or perhaps one we have

21
00:57.040 --> 00:57.520
definitely

22
00:57.520 --> 00:58.520
seen already.

23
00:58.520 --> 01:00.720
And this is the YAML file format.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

23
00:58.520 --> 01:00.720
And this is the YAML file format.

24
01:00.720 --> 01:04.680
So when we happen to be utilizing these particular file formats, we really are

25
01:04.680 --> 01:05.640
utilizing data

26
01:05.640 --> 01:06.640
serialization.

27
01:06.640 --> 01:11.010
Take, for example, YAML, as we have already seen it, we know when we happen to

28
01:11.010 --> 01:12.040
utilize YAML,

29
01:12.040 --> 01:14.280
we're not just getting a big string blob.

30
01:14.280 --> 01:17.920
We're actually getting data in a programmatic manner, meaning that if we want

31
01:17.920 --> 01:18.440
to access

32
01:18.440 --> 01:22.120
particular object, you know, so that means we can specify particular keys to

33
01:22.120 --> 01:22.880
return very

34
01:22.880 --> 01:25.240
particular values within the data sets.

35
01:25.240 --> 01:28.440
And ultimately, what this is all about, it's about giving us the ability to

36
01:28.440 --> 01:29.800
store this data

37
01:29.800 --> 01:34.520
in a programmatic manner or even perhaps transmit the data over the wire.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

37
01:29.800 --> 01:34.520
in a programmatic manner or even perhaps transmit the data over the wire.

38
01:34.520 --> 01:37.760
Safe example, you want to share this data over a network.

39
01:37.760 --> 01:41.520
Then we would like that data to be serialized in one of these type of file

40
01:41.520 --> 01:42.200
formats.

41
01:42.200 --> 01:46.230
Now, the question that I had when I first heard about this is, why do we even

42
01:46.230 --> 01:46.800
need to do

43
01:46.800 --> 01:47.800
such a thing?

44
01:47.800 --> 01:48.800
This makes no sense.

45
01:48.800 --> 01:50.360
We have programming languages.

46
01:50.360 --> 01:54.020
Safe example, if I happen to create a Python dictionary, well, this is

47
01:54.020 --> 01:55.200
definitely program

48
01:55.200 --> 01:56.200
logic data.

49
01:56.200 --> 01:58.560
This data can be stored with any Python file.

50
01:58.560 --> 02:02.000
Why use something different like YAML or JSON or XML?
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

50
01:58.560 --> 02:02.000
Why use something different like YAML or JSON or XML?

51
02:02.000 --> 02:05.280
This just seems like unnecessary information that I need to know about.

52
02:05.280 --> 02:06.880
Ah, but it actually is not.

53
02:06.880 --> 02:07.960
Let me show you why.

54
02:07.960 --> 02:11.720
So let's imagine we have a little application over here.

55
02:11.720 --> 02:13.240
And let's imagine that, oh, I don't know.

56
02:13.240 --> 02:16.920
Let's say it's written in the Rust programming language.

57
02:16.920 --> 02:21.520
And also, let's imagine we have another application all the way over here.

58
02:21.520 --> 02:24.040
And let's imagine this one was written in Python.

59
02:24.040 --> 02:29.270
So let's suppose I had some data that I wanted to share across the network and

60
02:29.270 --> 02:30.040
be accessible
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

60
02:29.270 --> 02:30.040
be accessible

61
02:30.040 --> 02:32.840
or processed by a completely different application entirely.

62
02:32.840 --> 02:33.840
This one over here.

63
02:33.840 --> 02:37.920
Well, let's say I happen to store this data in a programmatic manner, utilizing

64
02:37.920 --> 02:38.360
things

65
02:38.360 --> 02:40.360
like Python dictionaries.

66
02:40.360 --> 02:44.830
And then I send this over to this other application, which uses a completely

67
02:44.830 --> 02:45.960
different programming

68
02:45.960 --> 02:46.960
language.

69
02:46.960 --> 02:50.330
Well, quite simply, the Rust programming language, if you had to show it a

70
02:50.330 --> 02:51.360
Python dictionary,

71
02:51.360 --> 02:54.000
it would just shrug its shoulders and say, who are you?

72
02:54.000 --> 02:55.000
What are you?

73
02:55.000 --> 02:56.000
Where did you come from?

74
02:56.000 --> 02:57.000
What is this?

75
02:57.000 --> 02:59.280
Rust has a completely different way of processing data.

76
02:59.280 --> 03:01.720
The objects in Python do not make sense in Rust.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

76
02:59.280 --> 03:01.720
The objects in Python do not make sense in Rust.

77
03:01.720 --> 03:06.600
It's almost kind of like this application here, store to information in German.

78
03:06.600 --> 03:11.160
And it sent it over to this application here, the only spoke French.

79
03:11.160 --> 03:14.360
How useful is the data that we have encoded in German?

80
03:14.360 --> 03:18.640
If it's been sent only to a French reading application, not very useful as it's

81
03:18.640 --> 03:18.800
.

82
03:18.800 --> 03:23.200
But essentially, what we're looking for here is some type of neutrality.

83
03:23.200 --> 03:26.320
So we can store our data in a manner that we don't have to worry about.

84
03:26.320 --> 03:30.070
It being locked in to some type of programming language, whilst retaining the
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

84
03:26.320 --> 03:30.070
It being locked in to some type of programming language, whilst retaining the

85
03:30.070 --> 03:30.760
benefits of

86
03:30.760 --> 03:32.080
programmability.

87
03:32.080 --> 03:36.000
And we have a way to transmit that data across different code bases.

88
03:36.000 --> 03:38.760
So now the transaction looks much more like this.

89
03:38.760 --> 03:39.760
Here is our application.

90
03:39.760 --> 03:42.920
Let's maybe say it's written in the Go programming language.

91
03:42.920 --> 03:44.880
And the second application is over here.

92
03:44.880 --> 03:47.160
Again, let's just say it's written in Python.

93
03:47.160 --> 03:52.180
Now if this application stores its data, say for example, in JSON, this can be

94
03:52.180 --> 03:53.160
freely transmitted

95
03:53.160 --> 03:56.320
over the wire and ingested by the Go application.

96
03:56.320 --> 03:59.480
And the data can effectively be reconstructed within Go.

97
03:59.480 --> 04:01.840
And now the application can make sense of it.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

97
03:59.480 --> 04:01.840
And now the application can make sense of it.

98
04:01.840 --> 04:04.200
This is the type of thing that we're talking about here.

99
04:04.200 --> 04:07.080
Now, like I say, there are different implementations and different rules.

100
04:07.080 --> 04:09.120
It's depending on the file format we use.

101
04:09.120 --> 04:12.960
We can have like I say, JSON, XML, YAML, a whole bunch of others.

102
04:12.960 --> 04:16.400
But the first one that I want to talk about is this one right here.

103
04:16.400 --> 04:18.080
It is super, super popular.

104
04:18.080 --> 04:19.960
And that one is JSON.

105
04:19.960 --> 04:22.360
So let's talk about that in the very next video.
