1
00:00:00,210 --> 00:00:07,320
In this video, we are going to do Hands on lab, which is the pen out service architectures using SAS,

2
00:00:07,320 --> 00:00:09,030
ESCs and Lambda.

3
00:00:09,600 --> 00:00:16,230
So let me show you the architecture and the architecture that we are going to do together and we will

4
00:00:16,230 --> 00:00:21,540
use, publish, subscribe, fan art design pattern when developing these hands on lab.

5
00:00:21,810 --> 00:00:28,440
So basically we are following the ecommerce architecture and our use case is order processing order

6
00:00:28,440 --> 00:00:29,670
fulfillment process.

7
00:00:30,090 --> 00:00:32,850
First of all, we will start from the client application.

8
00:00:33,030 --> 00:00:33,960
Think about that.

9
00:00:33,960 --> 00:00:41,190
We are a customer and we are using web or mobile application and we are placing an order or checkout

10
00:00:41,190 --> 00:00:41,940
an order.

11
00:00:41,970 --> 00:00:49,080
So the client application sent this request to Amazon API Gateway endpoint, and this endpoint is the

12
00:00:49,080 --> 00:00:56,700
front door of our application after that API Gateway sent to order request to the first microservices,

13
00:00:56,700 --> 00:00:59,760
which is the order acknowledgement microservice.

14
00:01:00,150 --> 00:01:06,960
So these microservices is using a lambda as a microservices for computing and we will develop these

15
00:01:06,960 --> 00:01:09,570
lambda function to perform some actions.

16
00:01:09,720 --> 00:01:11,280
So order acknowledgements.

17
00:01:11,280 --> 00:01:13,560
Microservice does four thing.

18
00:01:13,590 --> 00:01:20,010
The first thing is it verifies the incoming request and generates the order ID and after that it is

19
00:01:20,010 --> 00:01:26,220
insert item into the order dynamo DB table to store the incoming event.

20
00:01:26,370 --> 00:01:32,850
And after that Lambda sends a confirmation message back to the API gateway with order ID for the synchronous

21
00:01:32,850 --> 00:01:33,630
response.

22
00:01:34,110 --> 00:01:41,760
And of course lastly, these microservices publish a message to the Amazon sans Amazon SMS which will

23
00:01:41,760 --> 00:01:45,300
be sent to downstream to different microservices.

24
00:01:45,600 --> 00:01:53,880
So this message will be pop up messaging using the Amazon Psns and these order acknowledgment microservices

25
00:01:53,880 --> 00:01:56,670
will be the publisher of the message.

26
00:01:57,780 --> 00:02:04,740
So in the DOM State, in microservices we have notification microservices and these will be sent email

27
00:02:04,740 --> 00:02:07,050
and SMS notification to the customer.

28
00:02:07,050 --> 00:02:11,430
And we have also invented Microsoft in microservices.

29
00:02:11,430 --> 00:02:18,480
It is for the deducting products from the warehouse and we have shipment microservices for the shipping

30
00:02:18,480 --> 00:02:19,920
products to the customer.

31
00:02:20,310 --> 00:02:26,790
And we can also add additional microservices which will be data lake ingest in microservice to ingest

32
00:02:26,790 --> 00:02:32,190
all data generated from the any process into their data lake for arbitrary analytics.

33
00:02:32,550 --> 00:02:40,830
So the important thing is we will use Amazon SAS and as queries in order to apply, publish, subscribe

34
00:02:40,860 --> 00:02:42,330
panel design pattern.

35
00:02:42,690 --> 00:02:52,320
So we will put individual SKUs in front of the all downstream microservices and use SNS to fan out the

36
00:02:52,320 --> 00:02:54,090
message to these queues.

37
00:02:54,420 --> 00:03:01,620
Once the order data reached the queues from the SAS, a lambda downstream microservices automatically

38
00:03:01,620 --> 00:03:07,590
post the queues and extract message in a batch and invoke lambda functions to process them.

39
00:03:08,190 --> 00:03:11,190
So we will also use Amazon SAS Filter feature.

40
00:03:11,190 --> 00:03:18,180
You can see in here one sending the message to SKUs because in distributed architectures, not every

41
00:03:18,180 --> 00:03:21,570
message is required to be sent evidence through microservices.

42
00:03:21,570 --> 00:03:27,980
So we will conditionally send the message based on some attributes in the message body.

43
00:03:27,990 --> 00:03:33,870
We will use filter criteria in SAS filter feature before sending message to the excuse.

44
00:03:34,170 --> 00:03:41,100
So in this section we will learn how panel design pattern apply with using the SAS and the case that

45
00:03:41,100 --> 00:03:43,620
enables asynchronous message communication.

46
00:03:43,620 --> 00:03:50,010
Then we will link distributed microservice architectures as we know that when we develop any architecture

47
00:03:50,010 --> 00:03:52,380
on a yes, we have two main steps.

48
00:03:52,380 --> 00:03:58,680
The first step is create infrastructure on a cloud and the second step is develop lambda code for interacting

49
00:03:58,680 --> 00:03:59,430
SNS.

50
00:03:59,610 --> 00:04:05,560
So we will start with the first step and create these architecture and infrastructure into our ID,

51
00:04:05,580 --> 00:04:06,780
which is called environment.

52
00:04:06,780 --> 00:04:12,690
But before that, let's start to remember and learn, publish, subscribe, fanart and topic, chaining

53
00:04:12,690 --> 00:04:14,670
design pattern and best practices.
