1 00:00:00,680 --> 00:00:05,620 Let's see how to use an alternative map produced framework, again in Python, a 2 00:00:05,620 --> 00:00:12,826 lightweight one, called mincemeat.python. it turns out that this framework is very 3 00:00:12,826 --> 00:00:18,496 similar to Octo, but much, much faster. In practice, you should use this for your 4 00:00:18,496 --> 00:00:22,409 assignment instead of Octo when you'll run it on large volume of text. 5 00:00:24,650 --> 00:00:30,600 The code is literally the same for the example that we used earlier with Octo. 6 00:00:30,600 --> 00:00:35,220 The only difference is that mincemeat requires you to have code to start the 7 00:00:35,220 --> 00:00:39,910 server within your functions or within your source file, as opposed to starting 8 00:00:39,910 --> 00:00:45,70 the server outside. And then essentially this sets up a 9 00:00:45,70 --> 00:00:47,955 server. sets of the data, so sets of the mapping 10 00:00:47,955 --> 00:00:51,710 function, the reduce function, which are exactly the same as before. 11 00:00:51,710 --> 00:00:56,974 And this statement runs the server. You have to give it a password which 12 00:00:56,974 --> 00:01:01,490 you'll call when you call it as a client. And then you print the results. 13 00:01:01,490 --> 00:01:06,184 So this is how the let's see it work. You say Python work contact Python, so 14 00:01:06,184 --> 00:01:09,871 this actually starts the server. And this would, you would just use one 15 00:01:09,871 --> 00:01:13,173 client this time. You call it with the mincemeat code 16 00:01:13,173 --> 00:01:18,620 instead of word conduct by directly. and you give it a password and then you 17 00:01:18,620 --> 00:01:24,314 call it and tell it where the server is. And you can see that it ran very fast. 18 00:01:24,314 --> 00:01:28,604 Much, much faster, in fact than the Octo example that we ran in the previous 19 00:01:28,604 --> 00:01:32,50 segment. You can verify that outputs are the same. 20 00:01:32,50 --> 00:01:36,546 The output here is not sorted. you can sort the result and figure it 21 00:01:36,546 --> 00:01:40,389 out. verify for yourself, if you have the 22 00:01:40,389 --> 00:01:46,840 patience to go implementation of both Octo and mincemeat. 23 00:01:46,840 --> 00:01:51,740 Why exactly Octo is slower and mincemeat is faster, it's kind of interesting and 24 00:01:51,740 --> 00:01:56,220 might give some clues when you in, examine the detailed architectures of 25 00:01:56,220 --> 00:02:00,840 real industrial strength MapReduce frameworks like Hadoop going forward 26 00:02:00,840 --> 00:02:04,893 after this course.