robertluo / waterfall

The Unlicense
16 stars 1 forks source link

= Waterfall

image:https://github.com/robertluo/waterfall/actions/workflows/main.yml/badge.svg[CI,link=https://github.com/robertluo/waterfall/actions/workflows/main.yml] image:https://img.shields.io/clojars/v/io.github.robertluo/waterfall.svg[Clojars project,link=https://clojars.org/io.github.robertluo/waterfall] image:https://cljdoc.org/badge/io.github.robertluo/waterfall[cljdoc,link=https://cljdoc.org/d/io.github.robertluo/waterfall]

== Rational

Try to use Apache Kafka clients in idiomatic Clojure.

Kafka has Java/Scala clients API, and programmers have no problem calling them directly in Clojure, so we do not need to "wrap" Java API.

However, from a Clojure programmer's perspective, direct call Kafka Java API does not feel very good:

Hence, Waterfall is an attempt at a minimalist library with additional optional batteries.

== Development experience

Because all functions have their schemas incorporated, you can get the best development experience if dependency metosin/malli is in your classpath.

Put (malli.dev/start!) in your user.clj will https://github.com/metosin/malli/blob/master/docs/function-schemas.md#tldr[enable clj-kondo] to use the schemas when editing.

Single API

Powered by https://github.com/robertluo/fun-map[fun-map], you can use one single API for accessing a Kafka cluster without any further knowledge:

You can see an example in link:notebook/easy.clj[this easy example notebook].

API namespaces

[cols="1,1"] |=== | namespace | Description

| robertluo.waterfall | main API | robertluo.waterfall.shape | optional Clojure data shape transformation |===

Files Description

[cols="1,1"] |=== | Filename | Description

| deps.edn | Clojure tools.deps configuration | tests.edn | kaocha test runner configuration | build.clj | Clojure tools.build building script | notebook | https://github.com/nextjournal/clerk[Clerk] notebooks to demostrate usage, use clojure -M:dev:notebook to use them |===

== https://unlicense.org[Unlicense]

2022, Robertluo