1 00:00:00,860 --> 00:00:03,660 One last video on the overall design of this application. 2 00:00:03,710 --> 00:00:07,040 So first I want to show you a list of the different events are going to create. 3 00:00:07,040 --> 00:00:12,620 We're going to have events like user created user updated ticket created ticket updated everything you 4 00:00:12,620 --> 00:00:14,270 see on this list right here. 5 00:00:14,270 --> 00:00:18,320 Now some these events might not make a lot of sense right now but over time we're going to have a very 6 00:00:18,320 --> 00:00:21,260 deep discussion about the goal of each of these different events. 7 00:00:21,260 --> 00:00:25,070 You'll notice that right now they all kind of seem more or less kind of simple in nature in the name 8 00:00:25,070 --> 00:00:27,620 of each of them is kind of self-evident. 9 00:00:27,650 --> 00:00:33,020 So we're going to emit events like say order expired whenever a order goes over that 15 minute limit. 10 00:00:33,920 --> 00:00:37,640 I just want to give you this list of events right now just to give you a picture of some the different 11 00:00:37,640 --> 00:00:38,660 events we're going to create. 12 00:00:38,660 --> 00:00:44,570 But the absolute definition of each one is not super important right now on that just one last quick 13 00:00:44,570 --> 00:00:45,610 diagram here. 14 00:00:45,620 --> 00:00:50,120 So this is going to be just a couple of notes on the overall design of each service. 15 00:00:50,120 --> 00:00:55,100 So we are going to have once again a kind of react client application that is going to be in charge 16 00:00:55,100 --> 00:01:00,440 of showing some content inside the browser this time around this react application is going to be built 17 00:01:00,440 --> 00:01:01,290 using next. 18 00:01:01,320 --> 00:01:05,450 J.S. if you are not familiar with Next j ust at all don't sweat it. 19 00:01:05,450 --> 00:01:09,260 Next is a server side rendering react framework. 20 00:01:09,290 --> 00:01:13,650 There's a very very good reason that we're going to use server side rendering in this application. 21 00:01:13,670 --> 00:01:14,740 We'll discuss why that is. 22 00:01:14,750 --> 00:01:19,480 As soon as we start building that react application were then going to have our order tickets. 23 00:01:19,490 --> 00:01:25,520 Orders payments and expiration services that are all going to be essentially simple node servers each 24 00:01:25,520 --> 00:01:28,880 one of them is going to be running express very similar to how we've been doing. 25 00:01:28,880 --> 00:01:33,620 On that first project this time around each of these different services are going to have some persistent 26 00:01:33,620 --> 00:01:40,440 storage in the form of Mongo DB Now absolutely we could use a database besides Mongo DB and some of 27 00:01:40,440 --> 00:01:44,880 these but we're just going to stick with Mongo DB all the way through because this is not really course 28 00:01:44,880 --> 00:01:49,530 about teaching you the basics of database design or something like that we could have some of these 29 00:01:49,530 --> 00:01:55,590 services using Mongo and maybe one over here using most grass or what have you but we're going to stay 30 00:01:55,590 --> 00:02:00,770 consistent and use Mongo all the way through do notice that the expiration service on the other hand 31 00:02:00,830 --> 00:02:04,310 is going to be making use of readies you have not used threats again. 32 00:02:04,310 --> 00:02:05,020 Don't sweat it. 33 00:02:05,030 --> 00:02:11,060 Super easy to learn and pick up we're using readies on expiration for a very very particular reason 34 00:02:11,150 --> 00:02:16,360 and you'll see why as soon as we start building out that service each of these different services are 35 00:02:16,360 --> 00:02:19,610 going to be making use of a shared common library. 36 00:02:19,690 --> 00:02:24,660 So we're going to refer to this common library right here simply as common just about everything else 37 00:02:24,660 --> 00:02:27,920 inside this diagrams are a reference to a technology or something like that. 38 00:02:27,960 --> 00:02:32,340 In this case common is going to be an NPM module that you and I are going to build to share a bunch 39 00:02:32,340 --> 00:02:34,710 of code among these different services. 40 00:02:34,710 --> 00:02:39,270 So we're going to be putting a lot of time into this com library to figure out some of the different 41 00:02:39,660 --> 00:02:41,890 middle wares and events. 42 00:02:41,940 --> 00:02:46,560 Who knows what else we're going to need that are going to be commonly used between all these different 43 00:02:46,560 --> 00:02:48,520 services. 44 00:02:48,570 --> 00:02:53,880 And then finally or an event bus rather than building our own this time around we're going to be using 45 00:02:53,910 --> 00:02:56,950 something else called the Nats streaming server. 46 00:02:56,970 --> 00:03:02,850 Now the term Nats right here if you've ever done some router setup like a home router I'm not talking 47 00:03:02,850 --> 00:03:06,760 about an express router I'm talking about an actual Wi-Fi router or a networking router. 48 00:03:06,870 --> 00:03:11,760 You might have heard of something called Nat like network address translation that is totally different 49 00:03:11,790 --> 00:03:12,810 than that streaming server. 50 00:03:12,870 --> 00:03:17,730 So if you have heard of the term Nat not the same as Nat streaming server. 51 00:03:17,730 --> 00:03:22,230 Essentially this is an event bus somewhat similar nature to the one that we built just a little bit 52 00:03:22,230 --> 00:03:22,900 ago. 53 00:03:22,950 --> 00:03:27,180 Of course it's very very different in its implementation tremendously different but it's more or less 54 00:03:27,180 --> 00:03:31,950 going to do the same thing as the event plus we put together a little bit ago it's gonna receive some 55 00:03:31,950 --> 00:03:36,350 events from our services and then echo those events out to all of our other services. 56 00:03:36,360 --> 00:03:38,420 That's pretty much it okay. 57 00:03:38,450 --> 00:03:42,800 So again I'm just showing this diagram to give you a picture of what we're going to have to do for this 58 00:03:42,800 --> 00:03:43,850 application. 59 00:03:43,880 --> 00:03:45,160 So one more pause right here. 60 00:03:45,170 --> 00:03:48,020 We're gonna start writing some code and doing some setup in just a moment.