# khayyatzy/mizan architecture

> Architecture diagram of the GitHub repository khayyatzy/mizan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/khayyatzy/mizan
- Repository: https://github.com/khayyatzy/mizan

## Overview

Mizan is a distributed graph-processing system: users select a graph algorithm and run it over partitioned graph input, with vertices processed in supersteps and messages exchanged between workers. The tree also contains a separate Hadoop graph-preparation and partitioning suite. The README provides no capability details, and several runtime files were not sampled, so links into those unsampled internals are kept conservative.

Main entry points: [`src/computation/computeManager.h`](https://github.com/khayyatzy/mizan/blob/master/src/computation/computeManager.h) (Superstep manager), [`src/dataManager/dataManager.h`](https://github.com/khayyatzy/mizan/blob/master/src/dataManager/dataManager.h) (Graph data manager), [`src/main.cpp`](https://github.com/khayyatzy/mizan/blob/master/src/main.cpp) (Program entry), [`src/Mizan.cpp`](https://github.com/khayyatzy/mizan/blob/master/src/Mizan.cpp) (Mizan runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Graph runtime"]
  node_main["Program entry<br/>[main.cpp]"]
  node_parser["Argument parser<br/>[argParser.h]"]
  node_mizan["Mizan runtime<br/>[Mizan.cpp]"]
  node_compute["Superstep manager<br/>[computeManager.h]"]
  node_algorithms["Graph algorithms"]
  node_aggregators["Aggregators<br/>[IAggregator.h]"]
end

subgraph group_data["Graph data"]
  node_data_manager["Graph data manager<br/>[dataManager.h]"]
  node_readers["Graph readers"]
  node_vertex["Vertex and edges<br/>[mObject.h]"]
  node_writers["Graph writers"]
end

subgraph group_communication["Worker communication"]
  node_message_manager["Message manager<br/>[messageManager.h]"]
  node_user_comm["User communication<br/>[userComm.h]"]
  node_comm_manager["Communication manager<br/>[commManager.h]"]
  node_transport["MPI transport<br/>[pt2ptb.h]"]
end

subgraph group_hadoop["Hadoop preparation"]
  node_hadoop_prep["METIS graph preparation"]
  node_hadoop_partition["Hadoop partitioning"]
end

subgraph group_partition["Partition management"]
  node_partitioner["Dynamic partitioning"]
  node_postpartition["Post-partition processing"]
  node_quality["Partition quality"]
end

node_user(("User"))
node_input["Graph files"]
node_output["Graph results"]

node_user -->|"supplies options"| node_parser
node_main -->|"parses arguments"| node_parser
node_main -->|"starts selected run"| node_mizan
node_main -->|"selects algorithm"| node_algorithms
node_parser -->|"returns settings"| node_main
node_mizan -->|"runs computation"| node_compute
node_compute -->|"accesses graph"| node_data_manager
node_compute -->|"invokes user code"| node_algorithms
node_compute -->|"manages messages"| node_message_manager
node_compute -->|"aggregates values"| node_aggregators
node_data_manager -->|"loads graph"| node_readers
node_readers -->|"reads"| node_input
node_data_manager -->|"stores vertices"| node_vertex
node_data_manager -->|"writes graph"| node_writers
node_writers -->|"writes results"| node_output
node_message_manager -->|"dispatches messages"| node_user_comm
node_user_comm -->|"routes messages"| node_comm_manager
node_comm_manager -->|"sends worker traffic"| node_transport
node_hadoop_prep -->|"transforms graph input"| node_input
node_hadoop_partition -->|"partitions graph input"| node_input
node_mizan -->|"supports migration"| node_partitioner
node_postpartition -.->|"processes partitions"| node_hadoop_partition
node_quality -->|"assesses partitions"| node_hadoop_partition

click node_main "https://github.com/khayyatzy/mizan/blob/master/src/main.cpp"
click node_parser "https://github.com/khayyatzy/mizan/blob/master/src/tools/argParser.h"
click node_mizan "https://github.com/khayyatzy/mizan/blob/master/src/Mizan.cpp"
click node_compute "https://github.com/khayyatzy/mizan/blob/master/src/computation/computeManager.h"
click node_algorithms "https://github.com/khayyatzy/mizan/tree/master/src/algorithms"
click node_aggregators "https://github.com/khayyatzy/mizan/blob/master/src/IAggregator.h"
click node_data_manager "https://github.com/khayyatzy/mizan/blob/master/src/dataManager/dataManager.h"
click node_readers "https://github.com/khayyatzy/mizan/tree/master/src/dataManager/graphReaders"
click node_vertex "https://github.com/khayyatzy/mizan/blob/master/src/dataManager/dataStructures/graph/mObject.h"
click node_writers "https://github.com/khayyatzy/mizan/tree/master/src/dataManager/graphWriters"
click node_message_manager "https://github.com/khayyatzy/mizan/blob/master/src/computation/messageManager.h"
click node_user_comm "https://github.com/khayyatzy/mizan/blob/master/src/communication/userComm.h"
click node_comm_manager "https://github.com/khayyatzy/mizan/blob/master/src/communication/commManager.h"
click node_transport "https://github.com/khayyatzy/mizan/blob/master/src/communication/pt2ptb.h"
click node_hadoop_prep "https://github.com/khayyatzy/mizan/blob/master/preMizan/src/prePartition/preMetisCountAppend_hadoop.java"
click node_hadoop_partition "https://github.com/khayyatzy/mizan/blob/master/preMizan/src/partitioning/semiBlockPartitioning_hadoop.java"
click node_partitioner "https://github.com/khayyatzy/mizan/blob/master/src/dynamicPartitioner.cpp"
click node_postpartition "https://github.com/khayyatzy/mizan/tree/master/preMizan/src/postPartition"
click node_quality "https://github.com/khayyatzy/mizan/blob/master/preMizan/src/statistics/partitionQuality_hadoop.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_parser,node_mizan,node_compute,node_algorithms,node_aggregators,node_user toneBlue
class node_data_manager,node_readers,node_vertex,node_writers toneAmber
class node_message_manager,node_user_comm,node_comm_manager,node_transport toneMint
class node_hadoop_prep,node_hadoop_partition toneRose
class node_partitioner,node_postpartition,node_quality,node_input,node_output toneIndigo
```

## Components

### Graph runtime

- [Program entry](https://github.com/khayyatzy/mizan/blob/master/src/main.cpp): `src/main.cpp`
- [Argument parser](https://github.com/khayyatzy/mizan/blob/master/src/tools/argParser.h): `src/tools/argParser.h`
- [Mizan runtime](https://github.com/khayyatzy/mizan/blob/master/src/Mizan.cpp): `src/Mizan.cpp`
- [Superstep manager](https://github.com/khayyatzy/mizan/blob/master/src/computation/computeManager.h): `src/computation/computeManager.h`
- [Graph algorithms](https://github.com/khayyatzy/mizan/tree/master/src/algorithms): `src/algorithms`
- [Aggregators](https://github.com/khayyatzy/mizan/blob/master/src/IAggregator.h): `src/IAggregator.h`

### Graph data

- [Graph data manager](https://github.com/khayyatzy/mizan/blob/master/src/dataManager/dataManager.h): `src/dataManager/dataManager.h`
- [Graph readers](https://github.com/khayyatzy/mizan/tree/master/src/dataManager/graphReaders): `src/dataManager/graphReaders`
- [Vertex and edges](https://github.com/khayyatzy/mizan/blob/master/src/dataManager/dataStructures/graph/mObject.h): `src/dataManager/dataStructures/graph/mObject.h`
- [Graph writers](https://github.com/khayyatzy/mizan/tree/master/src/dataManager/graphWriters): `src/dataManager/graphWriters`

### Worker communication

- [Message manager](https://github.com/khayyatzy/mizan/blob/master/src/computation/messageManager.h): `src/computation/messageManager.h`
- [User communication](https://github.com/khayyatzy/mizan/blob/master/src/communication/userComm.h): `src/communication/userComm.h`
- [Communication manager](https://github.com/khayyatzy/mizan/blob/master/src/communication/commManager.h): `src/communication/commManager.h`
- [MPI transport](https://github.com/khayyatzy/mizan/blob/master/src/communication/pt2ptb.h): `src/communication/pt2ptb.h`

### Hadoop preparation

- [METIS graph preparation](https://github.com/khayyatzy/mizan/blob/master/preMizan/src/prePartition/preMetisCountAppend_hadoop.java): `preMizan/src/prePartition/preMetisCountAppend_hadoop.java`
- [Hadoop partitioning](https://github.com/khayyatzy/mizan/blob/master/preMizan/src/partitioning/semiBlockPartitioning_hadoop.java): `preMizan/src/partitioning/semiBlockPartitioning_hadoop.java`

### Partition management

- [Dynamic partitioning](https://github.com/khayyatzy/mizan/blob/master/src/dynamicPartitioner.cpp): `src/dynamicPartitioner.cpp`
- [Post-partition processing](https://github.com/khayyatzy/mizan/tree/master/preMizan/src/postPartition): `preMizan/src/postPartition`
- [Partition quality](https://github.com/khayyatzy/mizan/blob/master/preMizan/src/statistics/partitionQuality_hadoop.java): `preMizan/src/statistics/partitionQuality_hadoop.java`

### Other components

- **User**
- **Graph files**
- **Graph results**

## Connections

- User → Argument parser: supplies options
- Program entry → Argument parser: parses arguments
- Program entry → Mizan runtime: starts selected run
- Program entry → Graph algorithms: selects algorithm
- Argument parser → Program entry: returns settings
- Mizan runtime → Superstep manager: runs computation
- Superstep manager → Graph data manager: accesses graph
- Superstep manager → Graph algorithms: invokes user code
- Superstep manager → Message manager: manages messages
- Superstep manager → Aggregators: aggregates values
- Graph data manager → Graph readers: loads graph
- Graph readers → Graph files: reads
- Graph data manager → Vertex and edges: stores vertices
- Graph data manager → Graph writers: writes graph
- Graph writers → Graph results: writes results
- Message manager → User communication: dispatches messages
- User communication → Communication manager: routes messages
- Communication manager → MPI transport: sends worker traffic
- METIS graph preparation → Graph files: transforms graph input
- Hadoop partitioning → Graph files: partitions graph input
- Mizan runtime → Dynamic partitioning: supports migration
- Post-partition processing → Hadoop partitioning: processes partitions
- Partition quality → Hadoop partitioning: assesses partitions
