# meta/haxl

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/meta-haxl).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,368 stars · 308 forks · Haskell · BSD-3-Clause

## Links

- GitHub: https://github.com/meta/Haxl
- awesome-repositories: https://awesome-repositories.com/repository/meta-haxl.md

## Description

Haxl is a Haskell library for fetching data from remote sources such as databases, web services, and cloud APIs through a single, uniform programming interface. Application code is written in a plain, sequential-looking style, and the library automatically runs independent fetches concurrently and groups requests, so programmers don't manage threads or write batching logic by hand.

What sets it apart is how it handles those fetches. Requests aimed at the same data source are collected and submitted as one combined call, while requests to different sources are issued at the same time. Each backend is connected through a thin, pluggable data source layer that needs only a small amount of boilerplate describing its request types and how to fetch a batch. The same mechanism can also run arbitrary IO operations in parallel.

Haxl also remembers earlier work. Completed requests are cached for the duration of a run, so repeated lookups for the same data are answered without contacting the remote source, and computations can be memoized so they execute only once. Execution proceeds in rounds: pending fetches are gathered, dispatched together, and their results fed back before the computation resumes.

## Tags

### Programming Languages & Runtimes

- [Haskell Data Fetching Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/haskell-data-fetching-libraries.md) — Haskell library for fetching data from many remote services with automatic batching and concurrency in backend programs.
- [Haskell Data Retrieval Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/haskell-data-retrieval-libraries.md) — A Haskell library that fetches data from databases, web services and cloud APIs through a single uniform programming interface.
- [Implicit Concurrency Frameworks](https://awesome-repositories.com/f/programming-languages-runtimes/implicit-concurrency-frameworks.md) — Runs independent fetches and IO operations concurrently without manual thread management, letting application code read as plain sequential logic.

### Data & Databases

- [Concurrent Multi-Source Fetching](https://awesome-repositories.com/f/data-databases/concurrent-multi-source-fetching.md) — Issues requests to different data sources simultaneously instead of one after another, cutting total waiting time. ([source](https://github.com/meta/haxl#readme))
- [Custom Data Source Definitions](https://awesome-repositories.com/f/data-databases/custom-data-source-definitions.md) — Connects applications to databases, web APIs or cloud services through a thin layer with automatic batching and concurrency. ([source](https://github.com/meta/haxl#readme))
- [Data Access & Abstraction](https://awesome-repositories.com/f/data-databases/data-access-querying/data-access-abstraction.md) — Hides databases, web services and other remote sources behind one simple interface so application code stays focused on logic.
- [Implicit Concurrent Fetching](https://awesome-repositories.com/f/data-databases/implicit-concurrent-fetching.md) — Runs independent fetches concurrently without threads, so sequential-looking code queries several sources at once.
- [Request-Scoped Caching](https://awesome-repositories.com/f/data-databases/in-memory-caches/request-scoped-caching.md) — Remembers earlier request results for the run so repeated lookups return without contacting the remote source. ([source](https://github.com/meta/haxl#readme))
- [Data Source Typeclasses](https://awesome-repositories.com/f/data-databases/pluggable-storage-backends/data-source-typeclasses.md) — Each backend plugs in through a small typeclass describing its request types and batch fetching, independent of the core scheduler.
- [Request Result Caches](https://awesome-repositories.com/f/data-databases/request-result-caches.md) — Remembers earlier responses so repeated lookups for the same data are answered without contacting the remote source.

### Software Engineering & Architecture

- [Request Batching](https://awesome-repositories.com/f/software-engineering-architecture/request-batching.md) — Collects all pending requests aimed at the same data source in a round and submits them as one combined fetch, avoiding repeated round trips.
- [Applicative Fetch Composition](https://awesome-repositories.com/f/software-engineering-architecture/dependency-graph-resolution/concurrent-dependency-resolution/monadic-sequencing/applicative-fetch-composition.md) — Composes independent fetches through an applicative interface so the runtime can detect independence and issue requests in parallel.
- [Request Memoization](https://awesome-repositories.com/f/software-engineering-architecture/memoization-caches/request-memoization.md) — Caches completed requests for the duration of a run and memoizes computations so repeated lookups avoid contacting the remote source again.
- [Memoized Computations](https://awesome-repositories.com/f/software-engineering-architecture/memoized-computations.md) — Wraps computations in shared cells that run once and reuse the saved result, preventing repeated work or duplicate fetches.
- [Pluggable Data Source Architectures](https://awesome-repositories.com/f/software-engineering-architecture/pluggable-data-source-architectures.md) — Connects each backend through a thin pluggable data source layer needing only small boilerplate describing its request types and batch fetching.
