In this recipe, we explore the new structured streaming paradigm introduced in Spark 2.0. We explore real-time streaming using sockets and structured streaming API to vote and tabulate the votes accordingly.
We also explore the newly introduced subsystem by simulating a stream of randomly generated votes to pick the most unpopular comic book villain.
There are two distinct programs (VoteCountStream.scala and CountStreamproducer.scala) that make up this recipe.