Skip to content

j-szulc/mimuw-rtb-labs-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published