spoolGet started
NewRelease 1.4.0

Build data pipelines you can trace.

Spool is a Java framework where every record leaves a trail, from the source to your data mart.

Get started$ curl -fsSL https://spoolframework.dev/install.sh | sh
Free software under the AGPL 3.0, for Java 21 and later.
Trace viewersource linear-issues, last three envelopes
envelope 9f2c…e41asource linear-issueskey sha256(source, content)
  1. CAPTUREDcrawlerRead from Linear and saved in the inbox.
  2. PERSISTEDingesterPassed every validation rule and was written to a data lake partition.
  3. data martmounterSplit into chunks, embedded and stored in the knowledge base.
How it works

Follow a record through Spool.

One issue from Linear, from the moment it is read to the moment an assistant answers with it. Each scroll moves it one stop further.

the record, event by event on the busits OpenTelemetry trace, alongside it and on to your backend
01 / 09

It starts in Linear.

Two crawlers poll the Linear API on a schedule, one for issues and one for documents. Scroll to follow one issue, stop by stop.

Linear API
02 / 09

The crawler captures the issue.

It wraps the issue in an envelope, keyed by a SHA-256 of its source and its content, and announces it on the event bus.

CAPTURED
03 / 09

An unchanged issue is stored only once.

The inbox keeps one envelope per key. An issue that has not changed has the same key and is skipped, and an edited issue gets a new envelope.

same keyskipped
Every 5 seconds the janitor looks for envelopes that have waited more than 3 minutes and publishes them again.
04 / 09

Your rules check every record.

Validation rules are plain Java classes that Spool finds at runtime. These three are examples written for this pipeline.

  • HasTitlepassed
  • HasUrlpassed
  • KnownTeambroken
A record that breaks a rule goes to quarantine with the list of violations, and its envelope stays in the inbox.
05 / 09

Valid issues go to the data lake.

The ingester writes each valid record to a data lake partition of its own record class, and the envelope becomes persisted.

PERSISTEDeventType=LinearIssue
06 / 09

The mounter builds the knowledge base.

It reads the data lake partitions, splits each issue into chunks and asks an embedding model for the vector of every chunk.

PERSISTEDchunksembeddings
07 / 09

The knowledge base is ready to search.

The chunks are stored in Qdrant, the gold layer of the data mart, with the source and the correlation identifier of the envelope they came from.

Qdrantgold
The watchdog receives a heartbeat from every module and reports the ones that are degraded.
08 / 09

Each record becomes one trace.

Every event goes through the event bus instrumented with OpenTelemetry, and the trace identifier comes from the correlation identifier, so the whole journey of the issue arrives as a single trace.

tracesmetricslogs
09 / 09

The assistant answers with its sources.

Someone asks a question, and the assistant answers from the closest chunks in Qdrant. Every answer lists the issues it is based on, so anyone can check it.

answerENG-128
Scroll for the next stop
  1. 01 Linear

    It starts in Linear.

    Two crawlers poll the Linear API on a schedule, one for issues and one for documents. Scroll to follow one issue, stop by stop.

    Linear API
  2. 02 crawler

    The crawler captures the issue.

    It wraps the issue in an envelope, keyed by a SHA-256 of its source and its content, and announces it on the event bus.

    CAPTURED
  3. 03 inbox

    An unchanged issue is stored only once.

    The inbox keeps one envelope per key. An issue that has not changed has the same key and is skipped, and an edited issue gets a new envelope.

    same keyskipped
    Every 5 seconds the janitor looks for envelopes that have waited more than 3 minutes and publishes them again.
  4. 04 ingester

    Your rules check every record.

    Validation rules are plain Java classes that Spool finds at runtime. These three are examples written for this pipeline.

    • HasTitlepassed
    • HasUrlpassed
    • KnownTeambroken
    A record that breaks a rule goes to quarantine with the list of violations, and its envelope stays in the inbox.
  5. 05 data lake

    Valid issues go to the data lake.

    The ingester writes each valid record to a data lake partition of its own record class, and the envelope becomes persisted.

    PERSISTEDeventType=LinearIssue
  6. 06 mounter

    The mounter builds the knowledge base.

    It reads the data lake partitions, splits each issue into chunks and asks an embedding model for the vector of every chunk.

    PERSISTEDchunksembeddings
  7. 07 data mart

    The knowledge base is ready to search.

    The chunks are stored in Qdrant, the gold layer of the data mart, with the source and the correlation identifier of the envelope they came from.

    Qdrantgold
    The watchdog receives a heartbeat from every module and reports the ones that are degraded.
  8. 08 observability

    Each record becomes one trace.

    Every event goes through the event bus instrumented with OpenTelemetry, and the trace identifier comes from the correlation identifier, so the whole journey of the issue arrives as a single trace.

    tracesmetricslogs
  9. 09 assistant

    The assistant answers with its sources.

    Someone asks a question, and the assistant answers from the closest chunks in Qdrant. Every answer lists the issues it is based on, so anyone can check it.

    answerENG-128
The descriptor

A pipeline is a file you can read.

Describe the modules of a pipeline in a YAML file.

Or build the same pipeline in Java with the builder of each module.

SpoolRuntime runs it on one machine or across several.

Descriptor reference
pipeline.yaml, from the assistant use case
- crawler:
    type: POLL
    id: linear-issues
    source:
      type: LINEAR
      configuration:
        sourceId: linear-issues
        url: "https://api.linear.app/graphql"
        entity: issues
        scheduleMilliseconds: 900000  # every 15 minutes
      mediaType: JSON_ARRAY
      rootPath: records
    eventMapping:
      namingConvention: CAMEL_CASE
      domainMappingList:
        - LinearIssue
Use case

Keep the knowledge base of a virtual assistant up to date.

The use case describes the whole pipeline, from two Linear crawlers to the Qdrant writer of the mounter, and shows how every answer can name the issues it comes from.

Get started

Add the runtime and follow your first record.

Spool needs Java 21 or later. If you prefer the terminal, the CLI installs with the one line at the top of this page.

Build your first pipeline
<dependency>
  <groupId>io.github.spool-framework</groupId>
  <artifactId>runtime</artifactId>
  <version>1.4.0</version>
</dependency>