GithubHelp home page GithubHelp logo

mimuw-rtb-labs-public's Introduction

Allezon Analytics Platform

Usage

make

Solution idea

Idea was to build a distributed system illustrated by the diagram below. img.png Lifecycle of a request is as follows:

  1. Request gets to the Load Balancer.
  2. Load balancer forwards the request to a Router.
  3. Router redirects request to a node specialised in that use case.

Then, depending on the use case:

Use case 1.

  1. user_tag gets put into a Kafka topic. This way, we can acknowledge the request was received ASAP and we don't have to wait for it to be processed.

Use case 2.

  1. Specialized "aggregator" workers retrieve batches of user_tag from Kafka and aggregate them into a state.
    • State here means a list of last 200 events of each type for each user.
    • Aggregators are sharded by cookie so that each aggregator is only responsible for a part of the state.
  2. Aggregators periodically write their state to a database.
  3. Nodes responsible for answering external queries periodically query the database and answer queries based on that.

Use case 3.

Same as Use case 2. - only definition of a "state" and "aggregation" changes. By keeping those abstract, we can reuse the code.

Current state of the solution

The solution is not complete. It is not distributed (run only on single node) and it's missing:

  • Key-value store for storing the state,
  • Case 3,
  • Dedicated nodes for answering case 2:
    • Currently aggregator fulfills this role.

img.png

mimuw-rtb-labs-public's People

Contributors

j-szulc 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.