Skip to content

DDIR server: split server.rs into one file per concern - #1014

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-server-split
Oct 24, 2026
Merged

frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-server-split

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Rebased onto master-next after #1013 merged; one commit, 4cb2154.

Splits src/server.rs (about 1.7k lines) into src/server/, one file per concern. It's a pure move; public paths don't change: interactive::server::{Server, evaluate, host_dataflow, host_time, HostTime, OuterTime, gen_field_seeded, …}. Items one file uses from another are pub(super), and everything else is private. 11 files, +1744/−1672.

What escapes each file: pub(super) items are visible only within server/.

  • mod.rs:
    • the Server registry, tick and drop;
    • re-exports evaluate, host_dataflow, host_time, HostTime, OuterTime, gen_field_seeded;
    • pub: Published (with import_containers), RowShape, HostContainer, Command, ProgramInfo, and Server with new, epoch, set_arranged_imports, set_export_taps, published, trace_shape, program_info, trace_info, drop_program, tick;
    • private: Installed, Origin, Captured, fmt_shape.
  • time.rs: OuterTime, HostTime, host_time, host_dataflow.
  • sources.rs: inputs and generated sources.
    • pub(super): InputContainer, COLUMN_BATCH, ServerInput, Recipe, clock_rows, generated_shape, canonical_source_name, and the Server methods install_generated, install_clock, install_source.
    • pub: gen_field_seeded, which tests/explain.rs uses.
    • private: hash_u64.
  • install.rs: pub fn install; private check_shapes.
  • feed.rs: pub fn feed, feed_columns, load, loads_from_trace; private load_trace, validate_feed.
  • bind.rs: pub fn bind, unbind, binding_info; pub(super) Binding.
  • read.rs: pub fn snapshot_local, snapshot, peek, take_changes.
  • diagnostics.rs: pub fn set_diagnostics; pub(super) note_dataflow, process_diagnostics, feed_diagnostics, install_diagnostics.
  • evaluate.rs: pub fn evaluate.

hash_u64 and gen_field_seeded, which #1011 moved into server.rs, now live in sources.rs beside Recipe. The README's host line names server/.

Checks:

  • cargo test -p interactive -p ddir-server.
  • Every LDBC CI step from interactive/bench/, including authored/check.py.
  • Release explain suite.
  • Differential testing, seeds 51,000,000–51,004,999 with all nine oracles: 5,000 passed.
  • Clippy: the warnings in server/* are exactly the ones server.rs had, moved with their code. Nothing new.

🤖 Generated with Claude Code

https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o

`src/server.rs` (1,656 lines) is now `src/server/`, a pure move. `mod.rs` keeps
the registry: `Server` and what it holds per program, `Command`, `Published`,
and the lifecycle's ends, `tick` and `drop_program`. The rest is one file per
concern, each adding methods to `Server`:

- `time.rs`: `OuterTime`, `HostTime`, `host_time`, `host_dataflow`;
- `sources.rs`: positional inputs (`ServerInput`), the `random:`/`iota:`
  recipes, the `clock`, and installing them;
- `install.rs`: `install` and its shape checks;
- `feed.rs`: `feed`, `feed_columns`, `load`, and their shared checks;
- `bind.rs`: `Binding`, `bind`, `unbind`, `binding_info`;
- `read.rs`: `snapshot_local`, `snapshot`, `peek`, `take_changes`;
- `diagnostics.rs`: the `diag.*` sources' wiring;
- `evaluate.rs`: `evaluate`, the test suites' entry point.

The public paths are unchanged: `interactive::server::{Server, evaluate,
host_dataflow, host_time, HostTime, OuterTime, ...}`. Items one file uses from
another are `pub(super)`; the rest stay private to their file.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o
@frankmcsherry frankmcsherry changed the title DDIR server: split server.rs into one file per concern (stacked on #1013) DDIR server: split server.rs into one file per concern Oct 24, 2026
@frankmcsherry
frankmcsherry merged commit ac51b28 into TimelyDataflow:master-next Oct 24, 2026
7 checks passed
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.

1 participant