package shuttle_ssl

  1. Overview
  2. Docs
Async_ssl support for shuttle

Install

Dune Dependency

Authors

Maintainers

Sources

shuttle-0.5.0.tbz
sha256=4d469f8acf557afb0fb1fc0a885fc41521b0ab31475f4c8e3ad7445f64500c3e
sha512=7d9c4fb7ce253ed209b5470e53c3ae1e218fc769753686d7d68bb387ec328b3df1e76165d6e06e62f3f57aaf11a0dd9d8578be866d6a8b27de35957343c9615a

Description

Tags

async reader writer ssl

Published: 22 Aug 2022

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 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 (5)

  1. async_ssl >= "v0.14"
  2. ppx_jane >= "v0.14"
  3. shuttle = version
  4. ocaml >= "4.11.0"
  5. dune >= "2.8"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.