Code Monkey home page Code Monkey logo

lambda-architecture's Introduction

README

A project to integrate Meetup Streaming API through a Kafka Producer implemented in Nodejs, consumed by a Kakfa Consumer to store every message in a Cassandra NoSQL. Cassandra will be configured to use Spark on it.

It has also a small Spark Streaming implementation to show some statistics over console.

Setup

  • Summary of set up

    • A local cassandra server
    • A local kafka broker
    • A "meetup" topic in the broker
    • Enter src/main/nodejs and execute npm install to install all node modules needed by the producer
    • Execute babel-node meetupKafkaProducer.js (NOTE: babel-node must be installed globally, you can do this by executing npm install -g babel-node. It can ask you for root access)
  • File packages

    • scala.consumer Files of Kafka consumers:
      • MeetupCassandraConsumer: A Kafka Consumer for the "meetup" topic
      • CountryCounters: Object to store results about countries as well as static methods to use from the Spark consumer
      • MeetupSparkConsumer: An Spark Streaming consumer to store and prints results over console
      • OnKafkaMessage: Trait/Interface for MeetupConsumers
      • MeetupConsumer: Abstract class with the implementation needed by the Meetup topic in Kafka so that parsing implementation is trivial extending this class and using OnKafkaConsumer trait
    • scala.main
      • Main: Entrance point to the app
      • Constants: Some constants needed in the app
      • SparkOverCassandra: A simple example querying the data from Cassandra database
    • scala.storage.kundera Files about Kafka storage with Kundera library:
      • KunderaConnectorSingleton A Singleton to access an EntityManager to perform the persistence
      • MeetupKundera An object ready to insert into Cassandra using Kundera library
    • scala.storage Files about Kafka storage:
      • Meetup A POJO to perform Json-to-object transformations but without Kundera knowledge
    • nodejs
      • meetupKafkaProducer A producer configured to listen Meetup API and feed the Kafka broker.

It uses Kundera DDL Auto prepare to create any column family or table needed in Cassandra so there is no need of a creation script.

Main files

Over the src/main/main package you can find the main objects. One is to

lambda-architecture's People

Contributors

sayden avatar mcastroat avatar

Watchers

James Cloos avatar  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.