mtoto / stream-go-shiny

Minimal streaming service using NATS & shiny on top of Twitter Streaming API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Streaming Analytics Demo with NATS

This repo contains the assets to create a real-time Shiny app that visualizes tweets based on a certain keyword. Under the hood, we use the Twitter Streaming API to access the tweets and NATS Streaming to process and write them to a MySQL database. The Shiny app queries this database continously to update the data in the dashboard. All the components are containerized and can be deployed using Docker Compose. For more detail, see my blogpost about this project.

Getting started

You need to have Docker and Docker Compose installed on your machine. To run the the service, clone the repo and build the containers. By default, the keyword to filter the Twitter Stream is "trump". You can change it by updating the .env file.

git clone https://github.com/mtoto/stream-go-shiny.git
cd stream-go-shiny
docker-compose build

To start the service, run:

docker-compose -f docker-compose.yml up

It might take a couple of minutes for all the containers to stand up. You can check http://localhost/twitter for the dashboard, it should look something like this:

About

Minimal streaming service using NATS & shiny on top of Twitter Streaming API.


Languages

Language:R 64.7%Language:Dockerfile 15.0%Language:Go 13.9%Language:Shell 6.3%