Giter Club home page Giter Club logo

simple-stream-kafka's Introduction

What is kafka

Kafka is an opensource distributed streaming platform that simplifies data intergration between systems. A stream is a pipeline to which your applications can push data. You can find more info on kafka's Official site

Kafka system has three main component:

  1. A Producer: The service which produces the data that needs to be broadcast

  2. A Broker: This is Kafka itself, which acts as a middle man between the producer and the consumer. It utilises the power of API's to get and broadcast data

  3. A Consumer: The service that utilises the data which the broker will broadcast

Installing Kafka

  • If you are running mac OSX simply type brew install kafka

    • once done installing run brew services start kafka
  • for linux user follow installation instruction from here

  • By default Kafka runs on port 9092

Project requirements:

  • Basic knowledge of python
  • python 3
  • Kafka installed
  • Virtualenv.
  • pip installed

setting up :

clone this repo:

Create a virtualenv and activate it inside your project directory:

  • $ virtualenv env && source env/bin/activate

Install required dependencies

  • pip install kafka-python opencv-python Flask

Running the program

You will need two terminal to run the application

In the first terminal run consumer.py. open a terminal and type:

(env)$ python producer.py

In the second terminal run producer.py and pass in a message "hello word"

(env)$ python consumer.py

Open your browser and navigate to http://0.0.0.0:5000

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.