From data perspective:
From user perspective:
Average storage estimation: Assume regardless of the data channel or format, there will be 10M pieces of data unit to be ingested in average in a day, then processed and stored by this system. Assume data of each type could differ in terms of size, but let's assume in average one piece of data unit is ~ 10KB. In a day we will expect a total of 100 GB size of data, that is 3TB size of data each month.
During daily peak hour, let's assume 10% of daily traffic will occur in this singular hour, that is 1M data transactions and 10 GB size of data to be ingested/processed in each hour, the TPS within that peak hour is 1M / 3600s = 277 ~ 300 TPS, and the system throughput within that peak hour is 10GB / 3600s = 10M * KB / 3600s ~= 3000 KB/s = 3MB/s.
From data flow perspective: raw data (whether streaming or cron-based) -> bronze layer (ingested as-is, stored as raw data) -> silver layer (data normalization, including data validation/cleaning/deduplication/formatting, stored in staging storage like Amazon S3) -> gold layer (user customized logic: storage, ML logic, transform, analysis) -> reverse ETL, feed to downstream systems
From user perspective: web clients -> load balancer -> API gateway -> services (workflow service, scheduler service, monitor service, user management service) -> cache for highly frequently accessed data -> workflow config will be stored in Redis Sorted Set and then persisted to PostgresSQL -> Once a job is due, will be published to corresponding Kafka topics -> Kafka will be used for job dispatcher -> Kafka partitioned by userId -> once consumer consumes the job, will execute the job step by step -> for each step, pass the logic to corresponding engine runner and execute the next node
From user perspective: web clients -> load balancer -> API gateway -> services (workflow service, scheduler service, monitor service, user management service) -> cache for highly frequently accessed data -> workflow config will be stored in Redis Sorted Set and then persisted to PostgresSQL -> Once a job is due, will be published to corresponding Kafka topics -> Kafka will be used for job dispatcher -> Kafka partitioned by userId -> once consumer consumes the job, will execute the job step by step -> for each step, pass the logic to corresponding engine runner and execute the next node
Would love to dive into the workflow and job creation, scheduler, and execution. From the web UI, users will be able to drag and form a visualized DAG for the user-defined data workflow. A DAG will be consist of nodes and directed edges between nodes, each node represent a certain type of data operation, Spark, SQL, or just python script. Following the edges will be able to follow the workflow from begin to end. Once user finishes creating the DAG, the system will first evaluate and validate the DAG, once validated, a corresponding unit called job will be created, it's a schedul-able and executable unit of workflow. The DAG config will be stored in PostgresSQL, and the scheduled job will be added to Redis Sorted Set, next_trigger_date as the score. A poller server will periodically check the queue (Redis Sorted Set) for any due jobs, if found, poller server will publish these jobs to Kafka topics (if recurring, poller server will add a next job back into Redis Sorted Set). Underlying executor/worker as Kafka consumers will pick up these jobs and execute them one by one. For each node encountered in this job, executor will call upon corresponding engine runner to run this node, whether Spark, SQL or python. Each engine runner will be using Docker for encapsulation and env isolation.