1
00:00:00,690 --> 00:00:07,530
Hi and welcome to a new section in this course in this section, I'm going to talk about Mukti.

2
00:00:07,710 --> 00:00:10,110
I'm going to give you a quick introduction to that.

3
00:00:10,110 --> 00:00:11,490
You know what it's all about.

4
00:00:11,770 --> 00:00:16,620
And then in the next two lectures in this section, I'll show you how to install it on your Raspberry

5
00:00:16,620 --> 00:00:20,100
Pi and run a few simple experiments with it.

6
00:00:20,760 --> 00:00:25,590
So let's get started with a description of al Qaeda terror.

7
00:00:26,100 --> 00:00:32,910
Al Qaeda terror is a lightweight publish subscribe messaging protocol.

8
00:00:33,270 --> 00:00:38,370
It's built to be very easy to use and also very light on resources.

9
00:00:38,670 --> 00:00:44,520
And because of this, it has been very successful in the world of the Internet of Things.

10
00:00:44,910 --> 00:00:50,640
As you'll see in this section, there's only a few things that you need to know about and quiddity and

11
00:00:50,640 --> 00:00:52,840
you'll be able to use it within minutes.

12
00:00:53,220 --> 00:00:59,970
Compare that to various other protocols and you'll see that it is actually an amazing technology to

13
00:00:59,970 --> 00:01:00,920
be able to use.

14
00:01:01,440 --> 00:01:05,030
So it's paradigm is very simple.

15
00:01:05,460 --> 00:01:12,930
There is a broker which is depicted in this slide with the large box in the middle and then you've got

16
00:01:12,930 --> 00:01:13,670
a publisher.

17
00:01:13,680 --> 00:01:18,600
In this case, I've got a sensor that is sending a temperature update to the broker.

18
00:01:19,230 --> 00:01:23,550
You can have many publishers sending all sorts of data to the broker.

19
00:01:23,580 --> 00:01:25,320
It can be a single number.

20
00:01:25,320 --> 00:01:31,980
It could be text, it could be a whole Jason document or it could be a comma delimited line.

21
00:01:32,520 --> 00:01:36,770
Anything at all really can be sent as a message to the broker.

22
00:01:37,170 --> 00:01:39,990
On the other side, you've got subscribers.

23
00:01:40,110 --> 00:01:46,890
So subscribers are clients that want to read values that publishers are publishing to the broker.

24
00:01:47,520 --> 00:01:52,020
Now, a publisher and a subscriber don't need to know anything about each other.

25
00:01:52,320 --> 00:01:56,370
They actually are totally anonymous and they don't interact with each other at all.

26
00:01:56,640 --> 00:02:03,840
Everything happens via the broker, and the broker is responsible for managing the propagation of data

27
00:02:03,990 --> 00:02:06,720
from publishers to the subscribers.

28
00:02:07,830 --> 00:02:11,850
Now let's have a look at how we'll use it in our project.

29
00:02:12,390 --> 00:02:19,110
In the large books with the rounded corners in this slide is our Raspberry Pi, and in it you have already

30
00:02:19,110 --> 00:02:21,210
installed the Madrid server.

31
00:02:21,600 --> 00:02:24,990
Alongside of it will install the mosquito.

32
00:02:24,990 --> 00:02:33,420
Broca and Mosquito is an open source technology and it's implemented by many different types of brokers.

33
00:02:33,420 --> 00:02:39,090
Think of a broker as a server for this particular technology, for this particular protocol.

34
00:02:39,360 --> 00:02:43,170
And mosquito is and also open source implementation.

35
00:02:43,170 --> 00:02:44,640
Just like node read.

36
00:02:45,030 --> 00:02:46,950
It is very, very popular.

37
00:02:46,950 --> 00:02:53,850
It is very light on resources, which is what I like about it in relation to our project and installing

38
00:02:53,850 --> 00:02:57,720
it on Raspberry Pi and as you'll see, is very easy to use.

39
00:02:57,990 --> 00:02:59,490
Muskett is not one thing.

40
00:02:59,490 --> 00:03:03,780
It's an installation that comes with a couple of different tools, the Seabrooke itself.

41
00:03:03,780 --> 00:03:08,010
And then there's the publisher and the subscriber clients as well.

42
00:03:08,010 --> 00:03:11,400
And I'll show you how to use those on the left side.

43
00:03:11,400 --> 00:03:14,460
We've got the publisher and subscribers.

44
00:03:14,460 --> 00:03:23,040
In this case, it's the ESB 32, so we'll have an ISP 32 and on it will run a simple sketch that is

45
00:03:23,040 --> 00:03:32,490
making use of an entity compatible library to both publish and subscribe to topics on the integrated

46
00:03:32,490 --> 00:03:33,090
Broca.

47
00:03:34,350 --> 00:03:40,920
I mentioned the word topic a couple of times, so let's have a look at what a topic is in the context

48
00:03:40,920 --> 00:03:46,290
of an quiddity topic is like a Eurail or like an address.

49
00:03:46,950 --> 00:03:54,090
A publisher will publish its data to a specific topic and then on the other side, subscribers would

50
00:03:54,090 --> 00:04:01,920
subscribe to a topic to get updates from the broker with any new data published from a publisher to

51
00:04:01,920 --> 00:04:03,390
that specific topic.

52
00:04:03,780 --> 00:04:10,080
So you can see here in this example, I've got a broker depicted with the large yellow box, and there

53
00:04:10,080 --> 00:04:16,170
are multiple topics that I'm actually using in our project in this project right here.

54
00:04:16,470 --> 00:04:22,820
It can see the project uses Slasher's to allow us to create multi levels.

55
00:04:22,820 --> 00:04:27,480
So, for example, I've got take expressions for terrarium and then below terrarium.

56
00:04:27,780 --> 00:04:33,780
I've got individual topics for air temperature control, whether the pump should be on or off, air

57
00:04:33,780 --> 00:04:35,940
humidity and so on.

58
00:04:36,750 --> 00:04:41,760
It's possible to also use wildcards for the subscriber's in particular.

59
00:04:41,760 --> 00:04:49,080
And for example, you can have a subscriber to subscribe to to take expression's for terrarium, for

60
00:04:49,080 --> 00:04:53,940
slash hash, for example, which hash is the wild card here.

61
00:04:53,940 --> 00:04:59,880
And then it will automatically subscribe this, subscribe to everything below.

62
00:05:00,070 --> 00:05:06,550
The terrorism level, in the end of this lecture, I'll give you pointers to documentation to talk more

63
00:05:06,550 --> 00:05:12,870
about both topics and wild cards immediately.

64
00:05:12,880 --> 00:05:16,930
It's also possible to set quality of service levels.

65
00:05:16,930 --> 00:05:23,440
And there are three levels in terms of quality of service that indicated to support the latest version

66
00:05:23,440 --> 00:05:25,390
of it here, which is television five.

67
00:05:25,990 --> 00:05:33,790
In most cases, we are satisfied with level zero of quality of service where the broker or the client

68
00:05:34,030 --> 00:05:37,640
will deliver the message just once without any confirmation.

69
00:05:37,930 --> 00:05:44,530
You also have level one where the broker or client will deliver the message at least once with confirmation.

70
00:05:44,830 --> 00:05:51,100
And then level two is where the broker and client will deliver the message exactly once by using a Forestier

71
00:05:51,100 --> 00:05:51,610
pancake.

72
00:05:51,660 --> 00:05:56,380
So it's the most reliable way of passing on messages to a client.

73
00:05:56,920 --> 00:06:05,950
And you can assign a quality of service to the broker, but also the client can request a specific quality

74
00:06:05,950 --> 00:06:07,750
of service from the broker.

75
00:06:08,290 --> 00:06:09,220
And you can sit at the bottom.

76
00:06:09,220 --> 00:06:14,830
I've got a source, a euro, where you can find more information about quality of service.

77
00:06:16,570 --> 00:06:22,270
There's not much more to it, so I'm about to conclude this lecture, there's three things that I wanted

78
00:06:22,270 --> 00:06:25,820
you to remember coming out of this lecture in particular.

79
00:06:26,200 --> 00:06:31,960
So first, in general, a broker will receive a message from a publisher and immediately forwarded to

80
00:06:31,960 --> 00:06:32,860
subscribers.

81
00:06:33,160 --> 00:06:34,730
It will not store it.

82
00:06:34,750 --> 00:06:40,830
So essentially, a broker is just forward and forget there's no storage mechanism, at least in general.

83
00:06:40,840 --> 00:06:47,170
It is possible, though, to configure storage if needed in order to improve persistence.

84
00:06:47,530 --> 00:06:50,310
But we're not going to be doing that in this project.

85
00:06:50,530 --> 00:06:57,970
We are going to go with the default way off and quiddity propagation of messages without storage.

86
00:06:59,080 --> 00:07:05,920
A mentioned thing number two in the previous lecture as well, it is possible for a publisher to send

87
00:07:05,920 --> 00:07:10,360
a message to topic at a different quality of service to our subscriber.

88
00:07:10,690 --> 00:07:18,340
So publishers and subscribers are free to set their own quality of service level with the broker, and

89
00:07:18,340 --> 00:07:21,290
they're not bound by their individual settings.

90
00:07:21,310 --> 00:07:29,230
Remember earlier I said that quiddity publishers and subscribers are totally independent and there's

91
00:07:29,230 --> 00:07:31,170
no way for one to influence the other.

92
00:07:31,480 --> 00:07:35,290
The broker sits right in the middle and keeps them separate.

93
00:07:36,450 --> 00:07:42,060
And number three thing, which is something that I've also mentioned earlier, is that immediately topics

94
00:07:42,060 --> 00:07:44,830
can contain wild cards.

95
00:07:45,060 --> 00:07:47,030
There are two wild cards in empty kitty.

96
00:07:47,230 --> 00:07:48,150
It's a plus.

97
00:07:48,300 --> 00:07:56,550
And the sharp wild card, the plus sign is used as a wild card for a single level of hierarchy, and

98
00:07:56,550 --> 00:08:01,230
the sharp one can be used as a wild card for all remaining levels of hierarchy.

99
00:08:01,230 --> 00:08:04,350
So you put it in the end of a topic.

100
00:08:04,740 --> 00:08:12,240
So again, have a look at the documentation there in the Mosquito Dog website, where you see examples

101
00:08:12,240 --> 00:08:14,400
of how those wild cards can be used.

102
00:08:15,630 --> 00:08:19,980
And finally here, I've got some suggested readings, definitely.

103
00:08:20,400 --> 00:08:24,000
And dog and mosquito, a tautology.

104
00:08:24,350 --> 00:08:30,890
The two required readings not just suggested, but required readings for Makatea team.

105
00:08:31,260 --> 00:08:34,530
Let me show you really quickly a couple of pages that you should look at.

106
00:08:35,310 --> 00:08:38,230
First is the dog website.

107
00:08:38,250 --> 00:08:45,260
This is where all the official announcement from the people that work on he published.

108
00:08:45,270 --> 00:08:51,990
So as you can see, the latest one is back in 2019 in relation to the publication of EMCDDA to version

109
00:08:51,990 --> 00:08:52,600
five.

110
00:08:53,310 --> 00:08:55,860
There's also a wiki right here.

111
00:08:55,860 --> 00:09:00,210
You can access the Wiki and have a look at the information that is published here, including things

112
00:09:00,210 --> 00:09:03,080
such as basic concepts and design principles.

113
00:09:03,300 --> 00:09:06,760
There's a very short documents well worth spending a few minutes to look at.

114
00:09:07,530 --> 00:09:10,740
I also find that the muscular website is very, very useful.

115
00:09:10,740 --> 00:09:19,060
And you can see here that the manual page of the main page contains a synopsis of it.

116
00:09:21,580 --> 00:09:29,560
The military manual page contains concise information about topics you can see examples of topics and

117
00:09:29,560 --> 00:09:37,710
how the wild card characters can be used and as well as information about quality of service and a few

118
00:09:37,720 --> 00:09:41,260
other bits and pieces that, in my opinion, it is for our project of secondary.

119
00:09:41,290 --> 00:09:47,920
For example, there's the concept of wheels that is available in it, but we're not going to worry about

120
00:09:47,920 --> 00:09:48,400
it at all.

121
00:09:49,150 --> 00:09:51,700
So take a few minutes to have a look at this documentation.

122
00:09:51,700 --> 00:09:57,940
And when you are ready, go on to the next lecture where I'll show you how to install a continuous kit

123
00:09:57,940 --> 00:09:59,470
of broke out on the Raspberry Pi.
