Skip to content

Non-blocking codec interface design for OCaml (pattern, experiment)

Notifications You must be signed in to change notification settings

dbuenzli/nbcodec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nbcodec — non-blocking IO interface design for OCaml

The rationale behind the design can be found in RATIONALE.md.

In src/se.ml there are two implementations of a streaming codec for simplified ASCII s-expressions.

  • Se.B implements a blocking codec.
  • Se.Nb implements a non-blocking codec.
  • Se.Enb implements a codec in direct style with an API that could be non-blocking assuming algebraic effects are part of the language.

The api documentation can be generated with

./build doc

the result is in _build/doc/api.docdir/Se.html.

The executable setrip.native can be used to test and benchmark the codecs, the source is test/setrip.ml it can be built with :

./build setrip.native

For example :

./setrip.native -enc -rseed 1067894368 > 1067894368.sexp

will generate a 32 Mo file of random s-expressions with the non-blocking codec. Use setrip.native -help for more information.

About

Non-blocking codec interface design for OCaml (pattern, experiment)

Resources

Stars

Watchers

Forks

Packages

No packages published