Skip to content

docs(design): distribution model — common library + per-platform custom build - #217

Merged
zzylol merged 1 commit into
mainfrom
docs/design-distribution-model-clarification
May 2, 2026
Merged

zzylol merged 1 commit into
mainfrom
docs/design-distribution-model-clarification

Conversation

@zzylol

@zzylol zzylol commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #216 (now merged). Clarifies ASAP's deployment model: the doc previously said "no drop-in plugin ABI" but didn't distinguish between custom build (use upstream's official extension point + ASAP crate, no source patching) and hard fork (maintain a divergent branch). Reviewers reading "fork-or-vendor" were liable to assume the worst.

Changes

§1 Motivation — explicit goal

Distribution model: common library + per-platform custom build. The framework's core deliverable is the Layer 3 runtime (`asap-precompute-go` / `asap-precompute-rs`), distributed as a normal Go module / Rust crate. Each Layer-4 adapter is a thin glue crate that pulls Layer 3 in. The end-user-visible artifact for each platform is a custom-built binary (`sketchcollector`, `sketchtelegraf`, `sketchvector`, `sketchotap`). NOT a runtime plugin loader and NOT an upstream-divergent fork.

§7.4 — three-tier classification

  • Tier 1 (drop-in plugin): ideal but no platform supports it for ASAP's needs.
  • Tier 2 (custom build) — ASAP's actual model on all four platforms. OCB / build tags / `inventory::submit!` / `linkme`. No upstream patching. Tracks upstream releases as deps.
  • Tier 3 (hard fork): only modified-OTLP needs this (`opentelemetry-collector-contrib-patch/`). Strategy B eliminates the need on the other three.
Platform Tier-2 mechanism Distribution unit
OTel Collector OCB `builder-config.yaml` `sketchcollector`
Telegraf `plugins/aggregators/all/aggregators.go` + build tag `sketchtelegraf`
Vector Cargo feature + `inventory::submit!` `sketchvector`
OTAP `linkme` distributed slice `sketchotap`

Why this framing matters

Layer 3 is the load-bearing reusable artifact. Every per-distro build links the same Layer 3 binary code. Without that goal stated explicitly, the four distros risk re-implementing window scheduling / snapshot caches / delta encoding per platform — the exact fragmentation this framework prevents.

Industry parallel: Datadog Agent, Elastic Beats, Splunk Universal Forwarder. All ship vendor-repackaged distros with first-party plugins compiled in.

Stats

`docs/design-asap-edge-framework.md`: +81 / −13 lines.

Test plan

  • Markdown renders cleanly (table layout verified locally)
  • Stakeholder review

…orm custom build

Add a §1 paragraph and a §7.4 three-tier classification to make
ASAP's distribution model unambiguous. Previously the doc said "no
drop-in plugin ABI" but didn't distinguish between "custom build"
(use upstream's official extension point + ASAP crate, no patches)
and "hard fork" (divergent code base maintained against upstream).

Three tiers:
1. Drop-in plugin — what ASAP would prefer; no platform supports
   it for stateful + scheduled plugins.
2. Custom build — ASAP's actual model on all four platforms. Use
   OCB / build tags / inventory::submit! / linkme.
3. Hard fork — only modified-OTLP needs this; Strategy B
   eliminates the need on the other three.

Goal explicit in §1: Layer 3 (asap-precompute-go / -rs) is THE
common data-plane library; Layer 4 adapters are thin glue. Every
per-platform distro (sketchcollector / sketchtelegraf /
sketchvector / sketchotap) shares the same Layer 3 implementation.
This framing matches the Datadog Agent / Elastic Beats / Splunk
Universal Forwarder distribution model and avoids re-implementing
window scheduling, snapshot caches, and delta encoding per distro.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol force-pushed the docs/design-distribution-model-clarification branch from a8eedab to 7defe08 Compare May 2, 2026 04:01
@zzylol
zzylol merged commit 4983dde into main May 2, 2026
@zzylol
zzylol deleted the docs/design-distribution-model-clarification branch May 2, 2026 04:02
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