Khepri 0.4.0 #111
dumbbell
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's new in Khepri 0.4.0
Add a logo :-)
Let's start with the fanciest change: we added the logo you can spot on the right ;-)
This logo is inspired by the drawing representing the god Khepri: a dung beetle holding the Sun. Here we use a rabbit (for the RabbitMQ-originated project) holding a database diagram. I know, creativity turned to 11.
Revamp of the clustering API
The clustering API was completely revamped in Khepri 0.4.0. Like the rest of the public API in Khepri 0.3.0, the goal is again to make it more straightforward and consistent.
The #105 pull request gives more details about the changes and how existing code can be adapted. But here are some of the highlights:
khepri:stop()
function now to stop a store.Here is an example of an old code and its newer version:
Up to Khepri 0.3.0:
Starting from Khepri 0.4.0:
See #105.
Several improvements to make it easier to use Khepri for Elixir developers
We had great feedback on the Erlang forums following a question we asked about what should Khepri provide to make it nice to Elixir developers.
As a result, we implemented the following improvements:
Khepri path can be Erlang binaries (Accept binaries for Unix-like paths #93). Elixir and other languages like Gleam running on top of the BEAM runtime use Erlang binaries to implement the "string" type. With this change, their native strings can be used directly in the Khepri API.
The
khepri
module exports "bang functions" such askhepri:'get!'(StoreId, Path)
(Introduce functions targetting Elixir developers #98). They don't look as nice in Erlang, but in Elixir, they are a common practice to have a version of a function which returns its result directly (if successful) or throws an error if not. They are especially handy when using pipelines.The
khepri_path
modules exports~p
and~P
sigils (Introduce functions targetting Elixir developers #98). They are constructs which make the parsing of Khepri Unix-like string/binary-based paths very easy in Elixir.See #93, #98.
EEP-48 doc chunks
In addition to
rebar3_edoc_extensions
, the plugin we use to produce documentations which are nicer to the eye compared to the default EDoc HTML output, we now also use the EDoc doclet and layout modules to produce EEP-48 doc chunks. People using Khepri should now get documentation and specs right from their compatible IDE and text editors.Other changes
khepri:count()
functions (Introducekhepri:count/{1,2,3}
function to count nodes in the tree #102).#if_data_matches{}
conditions (97).move
instructions #101).Download
Khepri 0.4.0 is available from Hex.pm: https://hex.pm/packages/khepri/0.4.0
Upgrade
Using Rebar:
Update your
rebar.config
:Run
rebar3 upgrade khepri
.Using Erlang.mk:
Update your
Makefile
:%% In your Makefile dep_khepri = hex 0.4.0
Remove the
deps/khepri
directory. The new version will be fetched the next time you build your project.Documentation
The documentation for Khepri 0.4.0 is available on Hex.pm.
This discussion was created from the release Khepri 0.4.0.
Beta Was this translation helpful? Give feedback.
All reactions