Typelevel Dependencies

As described in the README file, FS2 is based mostly on cats and cats-effect.

  • The cats library provides definitions for the typeclasses Functor, Applicative, Monad, and MonadError.
  • FS2 also uses the data type cats.data.Chain from the cats-core module. This data structure implements an ordered list-like sequence as a catenable list, which allows for efficient insertion at both ends. This data type was originally developed in fs2, where it was called Catenable.
  • The cats-effect library extends the typeclasses from cats with other more specialised typeclasses, which describe effectful computations. These type-classes cover resource bracketing, concurrency, asynchronicity, input-output, timing, and interruption.
  • FS2 also uses from cats-effect several data structures used for communicating and coordinating concurrent processes, such as semaphores, deferred values, atomic references. Some of these types were first developed as part of the internal implementation of FS2, but then moved to cats-effect.
  • From scodec-bits, FS2 uses the ByteVector data type to implement bytevector chunks. This is relevant for efficiently processing streams of binary data.

Libraries using FS2, and integrations with data stores

If you have a project you’d like to include in this list, either open a PR or let us know in the gitter channel and we’ll add a link to it here.

  • circe-fs2: Streaming JSON manipulation with circe.
  • doobie: Pure functional JDBC built on fs2.
  • fs2-aws: FS2 streams to interact with AWS utilities
  • fs2-blobstore: Minimal, idiomatic, stream-based Scala interface for key/value store implementations.
  • fs2-cassandra: Cassandra bindings for fs2.
  • fs2-columns: a Chunk that uses shapeless to store case class data column-wise.
  • fs2-cron: FS2 streams based on cron expressions.
  • fs2-crypto: TLS support for fs2.
  • fs2-elastic: Simple client for Elasticsearch.
  • fs2-grpc: gRPC implementation for FS2 / Cats Effect.
  • fs2-http: Http server and client library implemented in fs2.
  • fs2-jms: Connectors of the Java Messaging Service (JMS) connectors for FS2 streams
  • fs2-kafka: Simple client for Apache Kafka.
  • fs2-mail: Fully asynchronous java non-blocking email client using fs2.
  • fs2-rabbit: RabbitMQ stream-based client built on top of Fs2.
  • fs2-reactive-streams: A reactive streams implementation for fs2.
  • fs2-redis: Redis stream-based client built on top of Fs2 / Cats Effect.
  • fs2-zk: Simple Apache Zookeeper bindings for fs2.
  • http4s: Minimal, idiomatic Scala interface for HTTP services using fs2.
  • mongosaur: fs2-based MongoDB driver.
  • scarctic: fs2-based driver for MAN/AHL’s Arctic data store.
  • scodec-protocols: A library for working with libpcap files. Contains many interesting pipes (e.g., working with time series and playing back streams at various rates).
  • scodec-stream: A library for streaming binary decoding and encoding, built using fs2 and scodec.
  • streamz: A library that supports the conversion of Akka Stream Sources, Flows and Sinks to and from FS2 Streams, Pipes and Sinks, respectively. It also supports the usage of Apache Camel endpoints in FS2 Streams and Akka Stream Sources, Flows and SubFlows.
  • upperbound: A purely functional, interval-based rate limiter with support for backpressure.