Skip to content

Conversation

haf
Copy link

@haf haf commented Jul 6, 2025

Minor README improvements: refreshed quick links and clarified dev guide references.

@AhmedSoliman
Copy link
Contributor

Perhaps we can move some of the details of the architecture and crate organization under docs/dev/?

@AhmedSoliman AhmedSoliman requested a review from tillrohrmann July 7, 2025 10:21
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for updating our README and extending it with an architectural overview @haf. I think this can be helpful for community members to get started in the code base. As such, I agree with Ahmed, that it might better fit under docs/dev where we keep our developer documentation. We can link to there from the top-level README. Would you be up for moving it there?

I left a few quick comments. I assume that some parts of the overview where automatically generated, right? Which tool did you use? I am wondering how to maintain it as the architecture evolves. Maybe we can document the prompts that we used to generate the specific parts so that one can re-run it once it changed?

graph TD
A["External Clients"] -->|HTTP / gRPC / Kafka| I(Ingress)
I -->|forward invocations| W(Workers)
W -->|append events| L[Distributed Log (Bifrost)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mermaid doesn't like L[Distributed Log (Bifrost)] (https://mermaid.live/edit). Are you able to render it?

Comment on lines +160 to +198
```mermaid
flowchart LR
subgraph Binaries
CLI([cli/ – restate CLI])
SRV([server/ – restate-server])
end
subgraph CoreLibs
CORE([crates/core])
TYPES([crates/types])
ERR([crates/errors])
end
subgraph ControlPlane
META([crates/metadata-server])
ADMIN([crates/admin \n + admin-rest-model])
end
subgraph LogLayer
BIF([crates/bifrost])
LOGS([crates/log-server])
WAL([crates/wal-protocol])
end
subgraph Execution
WRK([crates/worker])
INV([crates/invoker-impl])
end
subgraph Ingress
HTTP([crates/ingress-http])
KAF([crates/ingress-kafka])
end
CLI-->CORE
SRV-->CORE
WRK-->CORE
INV-->WRK
WRK-->BIF
BIF-->LOGS
META-->LOGS
META-->WRK
HTTP-->WRK
KAF-->WRK
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea of this flow chart? Is it to show which crate depends on which other?

Comment on lines +160 to +198
```mermaid
flowchart LR
subgraph Binaries
CLI([cli/ – restate CLI])
SRV([server/ – restate-server])
end
subgraph CoreLibs
CORE([crates/core])
TYPES([crates/types])
ERR([crates/errors])
end
subgraph ControlPlane
META([crates/metadata-server])
ADMIN([crates/admin \n + admin-rest-model])
end
subgraph LogLayer
BIF([crates/bifrost])
LOGS([crates/log-server])
WAL([crates/wal-protocol])
end
subgraph Execution
WRK([crates/worker])
INV([crates/invoker-impl])
end
subgraph Ingress
HTTP([crates/ingress-http])
KAF([crates/ingress-kafka])
end
CLI-->CORE
SRV-->CORE
WRK-->CORE
INV-->WRK
WRK-->BIF
BIF-->LOGS
META-->LOGS
META-->WRK
HTTP-->WRK
KAF-->WRK
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wal-protocol is not part of the log layer but of the execution layer.

Comment on lines +163 to +164
CLI([cli/ – restate CLI])
SRV([server/ – restate-server])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing restatectl


* Format & lint: `cargo fmt && cargo clippy --all-targets`.
* Feature flags follow `crate-name/feature` convention – check each `Cargo.toml`.
* Docs live under [`docs/`](docs/) – update when changing public behaviour.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only our development docs live under docs/dev. The actual documentation lives https://github.com/restatedev/documentation.


## Protobuf & API Surface

All cross-service contracts live under `protobuf/` directories next to their crates. To regenerate: `cargo xtask proto-gen`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I xtask is not generating the protobuf files. This should be covered by our build.rs.

cargo run -p server -- start --demo

# Spawn 3-node cluster using docker-compose
cd docker && docker compose up
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no docker-compose file.

restate sql "SELECT * FROM invocations LIMIT 10;"
```

*Configuration files* live in [`charts/restate-helm/templates`](charts/restate-helm/templates) and are reused by `docker/` images.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only relevant for the helm chart.

Comment on lines +374 to +375
3. If it's a role service, expose a `Service` struct implementing `run(self) -> anyhow::Result<()>`.
4. Wire it in `server/src/main.rs` behind a feature flag.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be needed for a generic crate.

haf and others added 4 commits July 7, 2025 18:38
Co-authored-by: Till Rohrmann <[email protected]>
Co-authored-by: Till Rohrmann <[email protected]>
Co-authored-by: Till Rohrmann <[email protected]>
Co-authored-by: Till Rohrmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants