Code Monkey home page Code Monkey logo

demos's Introduction

Kafka Demos

Stream processing demo showing how Kafka can be used to create a real-time dashboard at scale.

Scenario

We want a dashboard presenting Big Data in real-time. Our company is a Spotify-esque service that lets users play songs. We want to see the real-time statistics and usage of our 10 million subscribers. Our dashboard is showing how many people are using our free or paid service. We see which pages they're hitting and the location in the United States where the person is.

We also want to see which artists and songs are trending. We're using Kafka Streams to aggregate artist and song plays over time. We want to see how much our service is being used, so we're showing the total song time played by our users.

This dashboard lets us see our KPI (Key Performance Indicators) in real-time and at Big Data scale.

Technical details

The initial data comes from Eventsim. It's designed to replicate page requests for a fake music web site (picture something like Spotify); the results look like real use data, but are totally fake. All Eventsim data is published to Kafka.

Kafka Streams then processes the Eventsim topic and creates three rolling aggregations on the data. One aggregation is number of songs played by an artist in the time window. Another aggregation is number of songs broken down by the song itself in the time window. The final aggregation is the total song time played in the time window.

A producer runs and retrieves Kafka metrics data over JMX. This data is then produced to a metrics topic.

Finally, all data is visualized on the page. The web page is making direct AJAX calls to the Kafka REST interface. There are no custom servlets. The data is retrieved using JavaScript intervals and visualized with D3.js.

demos's People

Contributors

eljefe6a avatar

Watchers

James Cloos avatar Shiva Molabanti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.