WarpDrive Documentation

repository·main·Indexed 25 days ago

https://github.com/warp-drive-data/warp-drive

A lightweight, universal, and reactive data library for web applications providing typed, high-performance data management. The library includes modern framework-agnostic packages like @warp-drive/core and @warp-drive/ember, as well as legacy ember-data umbrella packages for maintaining older Ember applications. It features a suite of codemods via @ember-data/codemods for migrating legacy patterns to modern WarpDrive schemas and request-based architectures.

Tokens
129.3K
Snippets
365
Records
610
Agent score
84%

What's inside WarpDrive

  1. Overview of @warp-drive/json-api

    main

    The @warp-drive/json-api package is a cache implementation for WarpDrive designed around the JSON:API specification. It is optimized to handle complex problems related to cache consistency and information density, particularly when dealing with relational or polymorphic data.

    WarpDrive recommends using this implementation for most applications because most API responses can be transformed into the JSON:API format without information loss.

  2. Overview of @warp-drive/ember

    main
    The @warp-drive/ember package provides reactive utilities, functions, and components for working with promises and requests within Ember.js applications. It is built on top of WarpDrive primitives to enable robust, performant asynchronous data handling and elegant control flows, specifically addressing the tension between Developer Experience (DX) and application performance.
  3. Overview of @ember-data/graph

    main

    @ember-data/graph provides a performance-tuned normalized graph designed to intelligently manage relationships between resources based on identity.

    ⚠️ WARNING: Internal Package This is currently an internal package and is not intended for direct application use. It is used as a private implementation and a peer-dependency by the JSON:API Cache Implementation.

    All APIs in this package are considered experimental and unstable. The project intends to make this a public API after further iteration during the 5.x timeframe. It is not recommended for direct application or 3rd party library usage at this time.

  4. Overview of @warp-drive/json-api Cache

    main

    The @warp-drive/json-api package provides an in-memory implementation of the JSON:API specification for the Warp*Drive Cache interface.

    Unlike simple request/response maps, this cache deeply understands the structure of your data. It is designed to handle complex problems involving cache consistency, information density, and relational or polymorphic data, ensuring data remains consistent across requests.

  5. Overview of WarpDrive

    main
    WarpDrive is a lightweight, universal, typed, and reactive data library for web applications. It is designed to be high-performance, SSR-ready, and framework-agnostic, making it suitable for use with any API. It was built by the Ember team and focuses on being as small as possible while providing seamless reactivity.
  6. Overview of ImageWorker functionality

    main

    The ImageWorker is an experimental utility designed to optimize image handling through the following features:

    • Caching: Caches images for reuse.
    • Preloading: Supports preloading images before they are needed.
    • Cross-tab Memory Sharing: Shares image memory across different browser tabs.

    Workflow

    1. The main thread requests the worker to load or preload an image.
    2. The worker downloads the image via fetch (populating the browser's HTTP cache if necessary).
    3. The worker generates a Blob containing the image bytes.
    4. The worker returns an Object URL for the generated Blob.