First some introduction on functional programming and basic map, reduce, filter functions and how to solve this task using these functions.
Then I would go with introduction of streams and how to solve this task using streams and then explain benefits of streaming approach when for example sorting is not required.
Later on this could be extended to show how to paralize streams, so for example instantiate n processes each doing the same task and then split single stream of data onto these processes and collect n streams of data from these processes back to single stream of data :)
In case of this task calculating distance could be separated for new process.
Idea of presentation showing how streaming is a nice approach for processing data.
I would go with this example: https://bitbucket.org/mieszko4/intercom-drinks.
First some introduction on functional programming and basic map, reduce, filter functions and how to solve this task using these functions.
Then I would go with introduction of streams and how to solve this task using streams and then explain benefits of streaming approach when for example sorting is not required.
Later on this could be extended to show how to paralize streams, so for example instantiate
n
processes each doing the same task and then split single stream of data onto these processes and collectn
streams of data from these processes back to single stream of data :) In case of this task calculating distance could be separated for new process.Maybe then some examples of gulp configuration.
Reference: https://nodejs.org/api/stream.html