1 00:00:07,100 --> 00:00:10,680 - Now let's review an introduction to Amazon Neptune. 2 00:00:10,680 --> 00:00:13,410 Now with Amazon Neptune, we gain access 3 00:00:13,410 --> 00:00:16,410 to a fully-managed graph database. 4 00:00:16,410 --> 00:00:19,570 And this graph database is optimized 5 00:00:19,570 --> 00:00:21,150 for storing relationships. 6 00:00:21,150 --> 00:00:24,410 Potentially billions of relationships. 7 00:00:24,410 --> 00:00:26,080 Now when we talk about relationships, 8 00:00:26,080 --> 00:00:27,150 it is important to understand 9 00:00:27,150 --> 00:00:30,440 that we're not necessarily talking about relational data. 10 00:00:30,440 --> 00:00:33,610 If we were to compare this to a relational database, 11 00:00:33,610 --> 00:00:36,230 where we have relational data. 12 00:00:36,230 --> 00:00:38,240 For example, in a relational database, 13 00:00:38,240 --> 00:00:41,490 you may have a user record 14 00:00:41,490 --> 00:00:44,950 and then a list of orders, right? 15 00:00:44,950 --> 00:00:46,100 You may have a one-to-many. 16 00:00:46,100 --> 00:00:48,530 A list of orders that that user placed 17 00:00:48,530 --> 00:00:50,400 in an E-commerce kind of situation. 18 00:00:50,400 --> 00:00:53,060 And then each order may have a one-to-many 19 00:00:53,060 --> 00:00:56,340 with the list of items that were in that order. 20 00:00:56,340 --> 00:00:57,173 Right? 21 00:00:57,173 --> 00:01:00,490 And so, you would, in order to form relationships, 22 00:01:00,490 --> 00:01:02,420 in order to form a relationship 23 00:01:02,420 --> 00:01:06,210 between a user and a product that they purchase, 24 00:01:06,210 --> 00:01:09,620 you have to derive that from that relational data. 25 00:01:09,620 --> 00:01:12,110 So relational data is not quite the same thing 26 00:01:12,110 --> 00:01:15,363 as relationship data is in a graph database. 27 00:01:16,292 --> 00:01:19,543 And so a graph database more easily allows us 28 00:01:21,970 --> 00:01:26,410 to form a direct relationship between a user 29 00:01:26,410 --> 00:01:28,100 and a product that they purchase. 30 00:01:28,100 --> 00:01:30,300 A direct relationship between a user 31 00:01:30,300 --> 00:01:32,580 and a movie that they watch, right? 32 00:01:32,580 --> 00:01:37,200 And so, when you think about those kinds of data sets, 33 00:01:37,200 --> 00:01:40,140 you think about shopping on Amazon.com. 34 00:01:40,140 --> 00:01:42,690 There's a relationship between myself 35 00:01:42,690 --> 00:01:45,730 and the products that I've actually purchased. 36 00:01:45,730 --> 00:01:47,510 There's a relationship between myself 37 00:01:47,510 --> 00:01:49,700 and maybe my friend. 38 00:01:49,700 --> 00:01:52,934 And then there's relationship between other people 39 00:01:52,934 --> 00:01:56,090 of the similar demographic and the products 40 00:01:56,090 --> 00:01:57,570 that they bought. 41 00:01:57,570 --> 00:02:00,420 If we take this kind of thinking 42 00:02:00,420 --> 00:02:04,020 to something like Netflix or a social graph, 43 00:02:04,020 --> 00:02:06,380 you can see that there's relationships 44 00:02:06,380 --> 00:02:07,860 between myself and my friends, 45 00:02:07,860 --> 00:02:11,110 between myself and the movies that I've watched, 46 00:02:11,110 --> 00:02:13,570 and then a relationship between my friends 47 00:02:13,570 --> 00:02:15,230 and the movies that they've watched, right? 48 00:02:15,230 --> 00:02:18,270 So we can take this kind of relationship data 49 00:02:18,270 --> 00:02:20,830 and one of the classic use cases for it 50 00:02:20,830 --> 00:02:23,600 is creating recommendation engines. 51 00:02:23,600 --> 00:02:25,758 We can use relationships to see. 52 00:02:25,758 --> 00:02:29,740 Well, if I have a relationship between this movie, 53 00:02:29,740 --> 00:02:32,520 and a friend has a relationship between this movie, 54 00:02:32,520 --> 00:02:35,170 then perhaps I will like the movie that they liked, 55 00:02:35,170 --> 00:02:37,300 and maybe they would like one that I liked. 56 00:02:37,300 --> 00:02:40,000 That's just one classic example. 57 00:02:40,000 --> 00:02:44,100 And so, with Amazon Neptune, when you have a use case 58 00:02:44,100 --> 00:02:46,040 for relationship type of data, 59 00:02:46,040 --> 00:02:48,410 and you want to be able to transverse 60 00:02:48,410 --> 00:02:52,238 that graph of relationships and derive meaning from that, 61 00:02:52,238 --> 00:02:55,160 then, of course, we need a model for storing that data. 62 00:02:55,160 --> 00:02:57,610 And Amazon Neptune supports 63 00:02:57,610 --> 00:02:59,160 a number of different graph models, 64 00:02:59,160 --> 00:03:02,170 including Property Graph and RDF. 65 00:03:02,170 --> 00:03:06,473 It also supports a couple of different query languages 66 00:03:08,130 --> 00:03:11,380 including Apache TinkerPop, Gremlin, and SPARQL. 67 00:03:11,380 --> 00:03:14,470 So when we actually want to program against that database 68 00:03:14,470 --> 00:03:16,770 and write a language that allows us 69 00:03:16,770 --> 00:03:19,690 to traverse the relationship graph, 70 00:03:19,690 --> 00:03:21,740 we can write that and express that 71 00:03:21,740 --> 00:03:24,163 in TinkerPop, Gremlin, or SPARQL. 72 00:03:25,100 --> 00:03:26,670 And of course, like other services, 73 00:03:26,670 --> 00:03:31,293 similar to DynamoDB, and S3, and Aurora, and so on, 74 00:03:32,220 --> 00:03:34,270 Amazon Neptune is also the data 75 00:03:34,270 --> 00:03:37,610 that we write to these tables is also replicated 76 00:03:37,610 --> 00:03:39,710 across multiple AZs. 77 00:03:39,710 --> 00:03:42,930 So as you can see, durability, fault tolerance, 78 00:03:42,930 --> 00:03:45,723 high availability is already built in. 79 00:03:47,440 --> 00:03:51,810 Neptune also performs a continuous backup to S3. 80 00:03:51,810 --> 00:03:54,410 So, unlike RDS, where we have to specify 81 00:03:54,410 --> 00:03:59,410 a maintenance window, backups are done continuously to S3. 82 00:04:01,000 --> 00:04:03,910 Neptune also supports, very much like Aurora, 83 00:04:03,910 --> 00:04:07,660 Neptune also supports up to 15 read replicas. 84 00:04:07,660 --> 00:04:11,670 So again, if we have a very read-heavy application 85 00:04:11,670 --> 00:04:16,570 that's constantly pulling and querying these relationships, 86 00:04:16,570 --> 00:04:20,240 then we can offload that to the read replicas 87 00:04:20,240 --> 00:04:22,990 and allow the master of the focused-on rights. 88 00:04:22,990 --> 00:04:26,460 And by doing that, we can increase the performance 89 00:04:26,460 --> 00:04:28,670 for the system as a whole. 90 00:04:28,670 --> 00:04:31,460 So again, when you think about performing 91 00:04:31,460 --> 00:04:35,480 or modeling and querying direct relationships 92 00:04:35,480 --> 00:04:38,600 between persons and products and persons and movies, 93 00:04:38,600 --> 00:04:42,360 or between different people, for example, in a social graph, 94 00:04:42,360 --> 00:04:44,173 think about Amazon Neptune.