Coder Social home page Coder Social logo

sbnair / stock-analyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mobilist/stock-analyzer

0.0 1.0 0.0 9.63 MB

A real-time analytics project based on Apache Spark, Kafka, Zookeeper, Cassandra, Redis, NodeJS and Docker

Python 66.95% Shell 17.58% JavaScript 12.82% HTML 2.64%

stock-analyzer's Introduction

A full-stack real-time stock analyzer web application

Techniques used: Apache Zookeeper, Apache Cassandra, Apache Kakfa, Apache Mesos, Redis, Docker, NodeJS

Introduction

This is a complete big data platform to process stock data in real time at 2TB/day(upperlimit). What is does is firstly grabing the data from google finance 1 message/s. Each record has a last trading time, last trading price, last trading currency and stock symbol for example. I chose Apache kafka which working as a high performance messaging system, whose benchmark could reach 200 thousands messages per second. If you count the message and the size of the data is about 2Tb per day(upperlimit). To store the data, in my use case I choose Apache cassandra which is a highly scalable peer to peer data storage system without single point failure. Thirdly I chose apache spark, I applied spark streaming API to write a simple algorithm to process data in real time. Then comes to the data visualizatin part. I developed a simple web app using redis, NodeJS, and socket.io, which renders the process result to the web UI. So you can see the price change in the UI in real time. Lastly, for all the code in my project I packaged them in the docker container and deployed them using Apache Mesos to achieve highly scalable deployment.

How to deploy and run on your local computer

  1. Go to folder Docker to set up the environment
  2. Follow instructions in seperate foders including Redis Cassandra Kafka Spark to add required dependencies
  3. Start the virtual machine named as "bigdata" you created in step1
  4. Run the .py following the instructions in the accordingly folder

4.1 kafka/simple.producer.py consume data

4.2 cassandra/data.storage.py store data

4.3 spark/stream-processing.py fetch and process data from kafka then write it back

4.4 redis/redis-publisher.py work as message queue between kakfa and sprak, publish processed data

4.5 nodejs/index.js start the website server to visualize the data

4.6 type in localhost:3000 in web browser

stock-analyzer's People

Contributors

chungjin avatar

Watchers

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