Skip to content

Refactor repository layout to separate application code, generated assets, runtime state, and python support apps #6

Description

@slbotbm

Currently, the repository is mixing Go entrypoints, Go packages, eBPF source, generated bindings, config templates, and mutable runtime file in overlapping directories. This makes the project unintuitive to a first time user, as well as harder to maintain due to the accumulation of non-conventional repository structural choices. Further, the information required to run the project is scattered in multiple readme's, which makes it difficult to run the project from scratch for a first time user.

I would like to make the following changes:

  • move executable go entry point into top-level cmd/.
  • move application-internal Go packages to top-level internal/.
  • move shared wire/config/result types into internal/protocol/.
  • move native helper sources into dedicated cmd/ subdirectories and build outputs into bin/
  • move eBPF source into internal/simulator/bpf/ and headers into internal/simulator/headers/
  • move checked-in demo configs into configs/simulator/demos/
  • keep client/ and dashboard/ top-level
  • rename data/ to analysis/

Resulting directory structure:

  river/
  ├── cmd/
  │   ├── river/
  │   │   └── main.go
  │   ├── injector/
  │   │   └── main.c
  │   └── state-injector/
  │       └── main.c
  ├── bin/
  │   ├── river
  │   ├── injector
  │   └── state-injector
  ├── internal/
  │   ├── server/
  │   ├── simulator/
  │   │   ├── bpf/
  │   │   │   └── probe.c
  │   │   ├── headers/
  │   │   │   └── vmlinux.h
  │   │   ├── gen.go
  │   │   ├── probe_bpfel.go
  │   │   ├── probe_bpfeb.go
  │   │   ├── probe_bpfel.o
  │   │   ├── probe_bpfeb.o
  │   │   └── simulator.go
  │   └── protocol/
  ├── configs/
  │   └── simulator/
  │       ├── demos/
  │       │   ├── M1_C1_config.json
  │       │   ├── M1_C2_config.json
  │       │   ├── M1_C3_config.json
  │       │   ├── M2_C1_config.json
  │       │   ├── M2_C2_config.json
  │       │   ├── M3_C1_config.json
  │       │   ├── M3_C2_config.json
  │       │   └── M3_C3_config.json
  │       └── README.md
  ├── docs/
  │   ├── architecture.md
  │   ├── development.md
  │   └── project-layout.md
  ├── external/
  │   └── README.md
  ├── client/
  ├── dashboard/
  ├── analysis/
  ├── simulator/
  │   ├── .gitignore
  │   ├── config.json
  │   └── _utils/
  ├── Makefile
  ├── go.mod
  ├── pyproject.toml
  ├── README.md
  └── CONTRIBUTING.md

cc @dariofad

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions