Giter Site home page Giter Site logo

flink-meetup's Introduction

flink-meetup

Demo code for flink meetup

build and run instructions build: docker-compose build

note, in case if any issue with build (could not reference previous images built) please try setting

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

run: docker-compose up -d

service-urls:

flink-ui - http://localhost:9081 zeppelin-ui - http://localhost:9080 kafdrop - http://localhost:9000

Demo Details

BASICS

http://localhost:9080/#/notebook/2JUMVSA3G

01-Basics & Stream Ingestion

In this section we federate kafka topic data and interact using SQL.

  1. create table on top of kafka and read the data
  2. create jdbc federation (access objects in a database)
  3. Simple data ingestion into Kafka
  4. read data from kafka and write into database
  5. read data from kafka, transform and write to another topic

02-Interactive streaming Analytics

http://localhost:9080/#/notebook/2JUXXT4TU

In this section we federate kafka topic data and perform interactive analytics using SQL.

  1. create table on top of kafka and read the data
  2. Interactively visualize the data

analytics

03-Stream Transformations

In this section we federate kafka topic data and interact using SQL.

  1. create table on top of kafka and read the data
  2. create jdbc federation (access objects in a database)
  3. read data from kafka, transform and write into database
  4. read data from kafka, transform and write to another topic(Stream ETL)

Dynamic Rule Engine

Dynamic rule engine enables the capability, detect the match cases, where continuously changing rules a inflow of events. and perform a certain action based on the rule configuration.

ex lets say we want to notify a user when there is an event occurred with attribute attr1 as criteria-a

{
   "id":1,
   "col1":100,
   "attr1":"criteria-a",
   "attr2":"criteria-b"
}

we define the rule as

{
   "rulename":"match1",
   "rulekey":"attr1",
   "rulevalue":"criteria-a",
   "actionid":"100"
}

letter we can add more rules or perhaps a updates a existing rule which basically detect the changes.

Use cases:

  1. Infra monitoring and action based alerts ( Notfications )
  2. Error detection and remediation (process flow ex: retail support)
docker exec -it flink-meetup-kafka-1 bash

#events
echo '{"id":1,"col1":100,"attr1":"criteria-a","attr2":"criteria-b", "attr4":"criteria-x"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic event
echo '{"id":1,"col1":100,"attr4":"criteria-c","attr6":"criteria-d"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic event

#Rules
#Rule1: 
echo '{"rulename":"match1","rulekey":"attr1","rulevalue":"criteria-a","actionid":"100"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic rule
#Rule2
echo '{"rulename":"match2","rulekey":"attr4","rulevalue":"criteria-c","actionid":"200"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic rule
echo '{"rulename":"match2","rulekey":"attr6","rulevalue":"criteria-d"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic rule

#Update Rule1
#Base Rule
echo '{"rulename":"match3","rulekey":"attr4","rulevalue":"criteria-x","actionid":"100"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic rule
#Modification
echo '{"rulename":"match3","rulekey":"attr4","rulevalue":"criteria-c","actionid":"100"}' | /opt/kafka/bin/kafka-console-producer.sh --bootstrap-server kafka:9092 --topic rule

flink-meetup's People

Contributors

bkosaraju avatar

Watchers

 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.