Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

README.md

Aether Datafixers Documentation

Welcome to the official documentation for Aether Datafixers, a lightweight data migration framework for the JVM.

What is Aether Datafixers?

Aether Datafixers is a framework for migrating serialized data through schema versions using forward patching. Inspired by Minecraft's DataFixer Upper (DFU), it provides a simpler and more approachable API while maintaining the power and flexibility needed for complex data migrations.

Key Features

  • Schema-Based Versioning - Define data types per version with Schema and TypeRegistry
  • Forward Patching - Apply DataFix instances sequentially to migrate data across versions
  • Format-Agnostic - Work with any serialization format via Dynamic<T> and DynamicOps<T>
  • Codec System - Bidirectional transformation between typed Java objects and dynamic representations
  • Profunctor Optics - Composable, type-safe accessors for nested data (Lens, Prism, Finder)
  • Type Safety - Strong typing with TypeReference identifiers for data routing
  • Migration Diagnostics - Opt-in structured reports with timing, rules, and snapshots
  • JDK 17+ - Built and tested on modern LTS JVMs

Quick Navigation

Getting Started

New to Aether Datafixers? Start here:

Core Concepts

Understand the fundamental concepts:

Tutorials

Step-by-step learning guides:

How-To Guides

Practical task-oriented guides:

Codec Formats

DynamicOps implementations for various data formats:

Examples

Working code examples:

Testing

Test your DataFixes and migrations with the Testkit module:

Command-Line Interface

Migrate and validate data files from the command line:

Schema Tools

Analyze, compare, and validate your schemas:

Advanced Topics

For experienced users:

Security

Guidance for processing untrusted data safely:

Spring Boot Integration

Seamlessly integrate Aether Datafixers into Spring Boot applications:

Support


Modules

Module Description
aether-datafixers-api Core interfaces and API contracts (stable)
aether-datafixers-core Default implementations
aether-datafixers-codec DynamicOps for JSON, YAML, TOML, XML (Gson, Jackson, SnakeYAML)
aether-datafixers-spring-boot-starter Spring Boot auto-configuration, MigrationService, Actuator, Metrics
aether-datafixers-cli Command-line interface for data migration
aether-datafixers-testkit Testing utilities for DataFix, Schema, and migration testing
aether-datafixers-schema-tools Schema analysis, validation, and diffing utilities
aether-datafixers-examples Practical usage examples
aether-datafixers-functional-tests End-to-end and integration tests
aether-datafixers-bom Bill of Materials for version management

Quick Example

// 1. Define type references
public static final TypeReference PLAYER = new TypeReference("player");

// 2. Create schemas for each version
public class Schema100 extends Schema {
    @Override
    protected void registerTypes() {
        registerType(PLAYER, DSL.and(
            DSL.field("playerName", DSL.string()),
            DSL.field("xp", DSL.intType())
        ));
    }
}

// 3. Create fixes for migrations
public class RenamePlayerNameFix extends SchemaDataFix {
    @Override
    protected TypeRewriteRule makeRule(Schema input, Schema output) {
        return Rules.renameField("playerName", "name");
    }
}

// 4. Bootstrap and create the fixer
AetherDataFixer fixer = new DataFixerRuntimeFactory()
    .create(CURRENT_VERSION, new MyBootstrap());

// 5. Migrate data
TaggedDynamic updated = fixer.update(
    oldData,
    new DataVersion(100),
    fixer.currentVersion()
);

Requirements

  • Java 17 or later
  • No required runtime dependencies (Gson/Jackson are optional)

License

MIT © Splatgames.de Software and Contributors