Let's see how to use an alternative map produced framework, again in Python, a
lightweight one, called mincemeat.python. it turns out that this framework is very
similar to Octo, but much, much faster. In practice, you should use this for your
assignment instead of Octo when you'll run it on large volume of text.
The code is literally the same for the example that we used earlier with Octo.
The only difference is that mincemeat requires you to have code to start the
server within your functions or within your source file, as opposed to starting
the server outside. And then essentially this sets up a
server. sets of the data, so sets of the mapping
function, the reduce function, which are exactly the same as before.
And this statement runs the server. You have to give it a password which
you'll call when you call it as a client. And then you print the results.
So this is how the let's see it work. You say Python work contact Python, so
this actually starts the server. And this would, you would just use one
client this time. You call it with the mincemeat code
instead of word conduct by directly. and you give it a password and then you
call it and tell it where the server is. And you can see that it ran very fast.
Much, much faster, in fact than the Octo example that we ran in the previous
segment. You can verify that outputs are the same.
The output here is not sorted. you can sort the result and figure it
out. verify for yourself, if you have the
patience to go implementation of both Octo and mincemeat.
Why exactly Octo is slower and mincemeat is faster, it's kind of interesting and
might give some clues when you in, examine the detailed architectures of
real industrial strength MapReduce frameworks like Hadoop going forward
after this course.