for more information visit the package's GitHub page
Package contains the following modules:
Data stream buffer for Elm application, inspired by Apache Kafka.
Broker
is essentially a circular buffer, internally using Array
Offset
) are exposed to clients, allowing "pull"-style data consumption, just as in Kafkaappend
), read
, and update
all take O(1)Segment
s. Buffer size (= number of Segment
s and size of each Segment
) can be configuredSegment
s are evicted one by oneBroker
accepts incoming data stream. †Broker
individually, while maintaining each Offset
as their internal states.Broker
again after previous Offset
. Rinse and repeat.†
It is possible to have multiple Broker
s in your application for different purposes,
however you must be careful so that you do not mix up Offset
s produced from one Broker
to ones from others.
Since Offset
s are only valid for their generating Broker
.
Wrapping Offset
s in phantom types is a possible technique to enforce this restriction.
delete
, but it is still unclear whether we want delete
APIencode
and decoder
pair,
which is potentially inefficient for big-capacity Broker
s.Segment
evictionInstall Elm Platform.
$ elm make
$ elm-test # full test
$ elm-test tests/MainTest.elm # only light-weight tests
Copyright © 2018, Yu Matsuzawa
BSD-3-Clause