WEBVTT - This file was automatically generated by VIMEO

1
00:00:10.200 --> 00:00:13.200
 Hello, everyone. Welcome back. It

2
00:00:13.200 --> 00:00:16.900
 is pretty low. Section 2, will be taking a look at HTTP

3
00:00:16.900 --> 00:00:19.200
 protocol itself. And how are they different ways?

4
00:00:19.200 --> 00:00:22.200
 We can Implement sessions. And we'll also

5
00:00:22.200 --> 00:00:25.300
 take a deep dive how the super Network. Protocols also

6
00:00:25.300 --> 00:00:28.700
 work. So, now, let's take a look at HTTP

7
00:00:28.700 --> 00:00:29.200
 itself.

8
00:00:30.500 --> 00:00:33.600
 So we have all heard about a shield protocol. So

9
00:00:33.600 --> 00:00:36.700
 technically, this protocol is used when you

10
00:00:36.700 --> 00:00:39.200
 wanted to access any HTML documents which are

11
00:00:39.200 --> 00:00:40.400
 residing on a web server.

12
00:00:41.700 --> 00:00:44.200
 I wanted you to pieces all of us, all

13
00:00:44.200 --> 00:00:47.100
 of the end users. They use a browser in order to

14
00:00:47.100 --> 00:00:50.500
 access a website. So, when we talk about a website, it

15
00:00:50.500 --> 00:00:53.500
 contains many documents for resources as

16
00:00:53.500 --> 00:00:56.500
 we call it. So that could be your HTML document itself.

17
00:00:56.600 --> 00:00:59.600
 That's a Content, followed by CSS

18
00:00:59.600 --> 00:01:02.400
 files that are very useful. In order to decide

19
00:01:02.400 --> 00:01:05.300
 the layout J's files could be used for emissions or

20
00:01:05.300 --> 00:01:08.200
 validations and images and videos, depending on

21
00:01:08.200 --> 00:01:09.500
 the type of site where we setting

22
00:01:10.200 --> 00:01:14.100
 So, when a browser makes an HTTP protocol request, it

23
00:01:13.100 --> 00:01:16.800
 is trying to fetch all of those required resources,

24
00:01:16.900 --> 00:01:18.500
 so that then user can view it.

25
00:01:19.600 --> 00:01:22.800
 The browser will actually try to construct the document and

26
00:01:22.800 --> 00:01:25.400
 decide the layout based on the coding on the back end.

27
00:01:25.400 --> 00:01:28.100
 So this is how a typical should be works.

28
00:01:29.500 --> 00:01:32.600
 In the last section, we did take a look and understand

29
00:01:32.600 --> 00:01:35.300
 as to why is HTTP known as stateless. That

30
00:01:35.300 --> 00:01:38.900
 means the CTP cannot manage, which request

31
00:01:38.900 --> 00:01:41.200
 is sent by whom and so

32
00:01:41.200 --> 00:01:45.700
 on since it's a stateless protocol. It will actually work in isolation. So

33
00:01:45.100 --> 00:01:48.700
 in order for web server to actually analyze

34
00:01:48.700 --> 00:01:51.200
 which user is sending what type of request and

35
00:01:51.200 --> 00:01:54.500
 what is the exact type of content that has to be sent back? We

36
00:01:54.500 --> 00:01:57.800
 would try to maintain a session that is called a session persistence.

37
00:01:57.400 --> 00:01:59.100
 So typically,

38
00:01:59.500 --> 00:02:02.800
 Multiple ways, you know how certain

39
00:02:02.800 --> 00:02:05.400
 can be persisted and it is known

40
00:02:05.500 --> 00:02:08.400
 in different formats such as session, it session token and

41
00:02:08.400 --> 00:02:08.800
 a cookie.

42
00:02:10.200 --> 00:02:13.300
 In technology and implementation, they are a bit unique and

43
00:02:13.300 --> 00:02:16.500
 different, but let's for Simplicity. Let's say that all

44
00:02:16.500 --> 00:02:18.200
 three work in the same fashion.

45
00:02:19.500 --> 00:02:22.500
 So we did take a look at a similar scenario in the previous section

46
00:02:22.800 --> 00:02:25.800
 where a user is trying to send a request. The

47
00:02:25.800 --> 00:02:28.300
 request could be browsing a webpage, trying

48
00:02:28.300 --> 00:02:32.600
 to send a login credential or any other activity and

49
00:02:32.600 --> 00:02:35.500
 the server will respond back. So

50
00:02:35.600 --> 00:02:39.000
 it will also respond back with the unique token. So

51
00:02:38.300 --> 00:02:41.200
 this unique token is different for each

52
00:02:41.200 --> 00:02:45.300
 user's, and that is how it will try to identify

53
00:02:44.700 --> 00:02:47.400
 which user is seeking, which

54
00:02:47.400 --> 00:02:49.100
 request and what's all of this.

55
00:02:49.300 --> 00:02:50.700
 Hans has to be sent back.

56
00:02:52.400 --> 00:02:55.300
 So how does those over actually take a look

57
00:02:55.300 --> 00:02:58.800
 at the request open itself? Because once

58
00:02:58.800 --> 00:03:01.900
 the server responds to act with the initial token, then

59
00:03:01.100 --> 00:03:04.100
 original very request. The

60
00:03:04.100 --> 00:03:07.700
 potato Qin would be embedded and sent back to the server. That

61
00:03:07.700 --> 00:03:10.700
 is how the server is going to understand how

62
00:03:10.700 --> 00:03:13.900
 user a is different from user B. And what are

63
00:03:13.900 --> 00:03:16.200
 the different responses as that it has to

64
00:03:16.200 --> 00:03:17.700
 send back to each of the use of

65
00:03:18.800 --> 00:03:21.600
 So, we are trying to talk in terms of Technology,

66
00:03:21.600 --> 00:03:24.100
 agnostic. That means you're just trying

67
00:03:24.100 --> 00:03:27.900
 to understand how, what are the different types of mechanisms housing

68
00:03:27.200 --> 00:03:31.200
 can be persisted from the server point of view in

69
00:03:31.200 --> 00:03:35.100
 most of the cases. The data is stored in memory. So

70
00:03:35.100 --> 00:03:38.200
 that means the particular session is based on

71
00:03:38.200 --> 00:03:41.300
 the service that is running on the web server. So,

72
00:03:41.300 --> 00:03:44.400
 in case if the service is restarted, that means the

73
00:03:44.400 --> 00:03:46.000
 session tokens will be pushed.

74
00:03:46.900 --> 00:03:49.100
 And it has to be sent back for the user has to

75
00:03:49.100 --> 00:03:52.300
 log. In back again. One of the mechanism is

76
00:03:52.300 --> 00:03:55.000
 that all this ocean tokens are actually stored in a

77
00:03:55.100 --> 00:03:58.500
 database. This could be one, other implementation where

78
00:03:58.100 --> 00:04:01.200
 all the session IDs are stored and that

79
00:04:01.200 --> 00:04:04.700
 is how the server is going to uniquely identify

80
00:04:04.700 --> 00:04:06.100
 each of these requests.

81
00:04:07.200 --> 00:04:10.000
 Now quickly, let's take a simple example.

82
00:04:17.500 --> 00:04:20.200
 So I've just opened up the developer tool using EFT.

83
00:04:20.200 --> 00:04:23.200
 Well, this is a simple, local application that is running on my

84
00:04:23.200 --> 00:04:26.600
 local machine. So what I'm trying to do, is that

85
00:04:26.900 --> 00:04:29.600
 just going to log in using my credentials.

86
00:04:33.800 --> 00:04:36.500
 So what is really happening now, so

87
00:04:36.500 --> 00:04:39.600
 we can actually see that the unique token

88
00:04:39.600 --> 00:04:42.600
 has been sent back. So this particular value is

89
00:04:42.600 --> 00:04:46.300
 going to be assigned to the user Tom. So

90
00:04:46.300 --> 00:04:49.200
 let's try to browse the same. Your luck ain't in a new tab.

91
00:04:51.500 --> 00:04:54.700
 So, we can still see that. Even though we opened up normal

92
00:04:54.700 --> 00:04:57.300
 page initially. We did see a login speed, but

93
00:04:57.300 --> 00:05:00.300
 right now it again, welcome back

94
00:05:00.300 --> 00:05:04.700
 to use at home. This is just because of the reason because

95
00:05:04.700 --> 00:05:06.900
 the session is being positioned on the browser itself.

96
00:05:08.300 --> 00:05:11.200
 Now, if I just little session itself or

97
00:05:11.200 --> 00:05:14.800
 the cookie for in memories cookie, and

98
00:05:14.800 --> 00:05:17.600
 I'm just trying to refresh the page so we can see that since

99
00:05:17.600 --> 00:05:21.200
 the session was actually eliminated. So

100
00:05:20.800 --> 00:05:23.300
 the user was logged off. This

101
00:05:23.300 --> 00:05:26.400
 is one of the simple example, how session

102
00:05:26.400 --> 00:05:28.100
 is being persisted on the web server.

103
00:05:29.200 --> 00:05:32.500
 Now, the key bottom points that we learned is that the

104
00:05:32.500 --> 00:05:35.900
 request is actually stored. So that decision can be persisted in

105
00:05:35.900 --> 00:05:38.100
 order to identify different user and the

106
00:05:38.100 --> 00:05:41.300
 request and that isn't acquisition management. You

107
00:05:41.300 --> 00:05:44.500
 want to call it in terms of cookies session tokens or session IDs,

108
00:05:44.800 --> 00:05:47.200
 that's it for this video in the next

109
00:05:47.200 --> 00:05:50.100
 video. We'll be trying in-depth. Understand. What are

110
00:05:50.100 --> 00:05:54.000
 the different types session can be implemented and persisted. Thank

111
00:05:53.000 --> 00:05:54.300
 you.
