At this point, Khepri should be considered Beta. The API will likely evolve and future releases will likely introduce breaking changes.
What's new in Khepri 0.18.0
Support multi-table projections
Khepri 0.18.0 supports extended projections that need to manage several ETS tables. This is useful to maintain multiple views of the same set of records, or to organise a complex structured view of that set of records accross several tables to provide more efficient updates and lookups.
To declare a multi-table projection, you can provide the list of tables along with their specific ETS options:
Options = #{tables => #{my_table_1 => #{type => set},
my_table_2 => #{type => bag}},
read_concurrency => true},
khepri_projection:new(my_projection, fun extended_fun/4, Options).Your projection function is then called with a map of table names/TIDs instead of a single TID:
extended_fun(Tables, Path, OldProps, NewProps) ->
#{my_table_1 := Tid1,
my_table_2 := Tid2} = Tables,
...See #366.
Other changes
- Add an internal API to wait for a machine version or behaviour to be effective in a cluster (#374).
- Ra was bumped from Ra 2.16.12 to 3.1.2 (#340, #347, #364, #375, #378, #382).
Download
Khepri is available from Hex.pm: https://hex.pm/packages/khepri/0.18.0
Upgrade
Using Rebar:
-
Update your
rebar.config:%% In rebar.config {deps, [{khepri, "0.18.0"}]}.
-
Run
rebar3 upgrade khepri.
Using Erlang.mk:
-
Update your
Makefile:%% In your Makefile dep_khepri = hex 0.18.0 -
Remove the
deps/khepridirectory. The new version will be fetched the next time you build your project.