Skip to content

Data Flow Diagrams

JamesPiechota edited this page May 23, 2023 · 8 revisions

Syncing

flowchart
peer1((peer)) -- "intervals \n(via GET /data_sync_record)" --> collect(ar_data_sync:\ncollect_peer_intervals)
ar_sync_record[(ar_sync_record)] -- unsynced intervals --> collect
collect -- list of peers and\ntheir unsynced intervals --> enqueue(ar_data_sync:\nenqueue_intervals)
enqueue -- "pick one peer to query\nfor each chunk:\n{peer, chunk offset}" --> q[("#sync_data_state.\nsync_intervals_queue")]
q -- "{peer, chunk offset}" --> sync(ar_data_sync:\nsync_intervals)
sync -- "{peer, chunk offset}" --> master(ar_data_sync_worker_master)
master -- "{peer, chunk offset}" --> peer_intervals[(map of peers to\nqueues of tasks)]
peer_intervals -- "{peer, chunk offset}" --> master
master -- "{peer, chunk offset}" --> mailbox[(process\nmailbox)]
mailbox -- "{peer, chunk offset}" --> worker(ar_data_sync_worker)
worker -- "GET /chunk" --> peer2((peer))
peer2 -- chunk data --> worker
Loading
Clone this wiki locally