Git Product home page Git Product logo

flowlog's Introduction

Description

Important: this project is only for demo purpose

The flowlog project is using flowlog-service, kafka, spark and cassandra to aggregate the realtime log. The aggregation has one-minute delay, which means the log storage is base on minute level. However, the apis only support hourly level query, it is not a hard limitation, we can easily change it to minute level log query.

For more detail, refer the Design Document, for the load test report, refer the ab testing result

How-to

  • Step 1, clone the repository and change directory to flowlog
  • Step 2, run command to initialize the cassandra, kafka, spark
gradle init_servers
  • Step 3, build and deploy the spark job
gradle submit_task
  • Step 4, launch 2nd terminal and start the service
gradle bootRun
  • Step 5, launch 3rd terminal and send sample requests
curl -kvvv -XPOST http://localhost:8080/flows -H'Content-Type: application/json'  -d '[{"hour":1,"src_app":"foo","desc_app":"bar","vpc_id":"vpc-1","bytes_tx":200,"bytes_rx":600},{"hour":1,"src_app":"foo","desc_app":"biz","vpc_id":"vpc-0","bytes_tx":1000,"bytes_rx":800}]]'
# we already prepare some sample data during init servers (refer Step 2)
curl -kvvv http://localhost:8080/flows\?hour\=1
curl -kvvv http://localhost:8080/flows\?hour\=2
# after 1 minute run
curl -kvvv http://localhost:8080/flows\?hour\=1
curl -kvvv http://localhost:8080/flows\?hour\=2
  • Step 6, stop the servers
gradle stop_servers
  • Step 7 (optional), restart the servers
gradle start_servers

Reference Documentation

For further reference, please consider the following sections:

flowlog's People

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.