package shuttle_http

Build not checked
  1. Overview
  2. Docs
HTTP codec for shuttle

Install

dune-project
 Dependency

Authors

Maintainers

Sources

shuttle-0.3.1.tbz
sha256=fadea3010bb0008ffa6533abefeda865162c7f66601c84256d6a459fe7317cb2
sha512=1c4813878d75638694a53eb4c241116301dfd10e7320a8c5185fd2099a3d22babc5f27e6776850220bed0b2b80e91e034700285282fe17125139c92dee2c6348

Description

Tags

async http

Added to opam-repository:

README

Shuttle

Reasonably performant buffered channels1 for async.

Overview

There are multiple options for performing I/O using async. The Reader and Writer modules provide a high level API for buffered I/O, and are typically the go-to option for applications that use async for I/O. These modules maintain their own internal buffer, and offer users a simple interface that lets them interact with the underlying file descriptor without having to write custom (and often error prone) buffer management logic.

The Reader/Writer modules provide convinence, but they might not be suitable in scenarios where one wants slightly more control over when write operations are scheduled, or when the overhead of the reader/writer is not desirable2. In such scenarios, it is possible to drop down to async's Fd module and schedule reads and writes manually. This approach will give full control over how I/O operations are scheduled, but will come at a cost of more complexity as the user is now responsible for buffer management, and proper handling of syscall responses.

Shuttle aims to provide a middle ground for a subset of use-cases handled by Reader/Writer. It covers fewer use-cases when compared to Reader/Writer, only supports file descriptors that support non-blocking system calls, and doesn't aim to support the full feature set of the reader/writes modules. In return, it allows for a high level api that pairs the ease of use of reader/writer modules with performance and latency curves that are closer to implementations with manual buffer management.

Supported Platforms

Currently only linux, macOS and bsd based systems.

How to Install

opam install shuttle for the current published release, and opam pin add shuttle --dev-repo for the development version.

Notes:

  • 1: Channel is a high-level construct for performing I/O.
  • 2: As always, make your own measurements. Also weigh in the fact that reader/writer modules in async are mature, battle tested and cover more use-cases.
  • 3: The implementation started as a fork async_rpc's low latency transport.
  • 4: A shuttle based http server benchmark can be found at https://github.com/ocaml-multicore/retro-httpaf-bench/pull/16

Dependencies (7)

  1. shuttle = version
  2. ppx_jane >= "v0.14"
  3. httpaf >= "0.6.6"
  4. core >= "v0.14"
  5. async >= "v0.14"
  6. ocaml >= "4.11.0"
  7. dune >= "2.8"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building shuttle_http with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.12.0 n/a n/a good good good
0.11.0 n/a good good n/a n/a
0.9.4 partial good good n/a n/a
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure