Derek Kraan's blog

I have written a few posts already, but decided to start a thread here to keep track of the new ones.

Here’s the one I posted today: Avoiding OTP Supervisor performance pitfalls

It’s inspired by a recent discussion on the elixir-lang-core mailing list (linked to from within the blog post).

12 Likes

It won’t let me read it without a login/account :frowning:

1 Like

The link was wrong, oops! I fixed it, you should be able to read it now!

1 Like

thanks!

1 Like

Nice article! I learned something new today.

This tidbit was especially interesting to me:

Bonus: handle_continue/2 is also useful any time you want to do some additional work after replying to a message, for example in a handle_call/3 callback.

I think that could be a useful pattern for some GenServer’s

4 Likes

handle_continue/2 is very new and was just recently added to OTP. It replaces the old ‘throw yourself a message’ pattern more reliably as it runs ‘before’ other possible pending messages, which makes it fantastic for handling after an init/1 callback. :slight_smile:

7 Likes

Implementing Connection Draining in Phoenix (or any library that uses Ranch!)

Link to the mini-library itself

5 Likes

Why should every process be supervised?

4 Likes

What’s new in Horde 0.5.0?

5 Likes

Introducing MerkleMap: the new library powering Horde’s improved performance.

4 Likes

Great post, and thanks for the contribution!

I’m wondering: what are the requirements for the hash function? Would erlang:phash2 work too? What’s the advantage of Murmur over others?

Cheers

@tangui It needs to be able to hash any Erlang term, that’s the only requirement. I picked murmur because it did this out of the box (although using :erlang.term_to_binary should make any hash function usable).

If you know something better (faster) then feel free to submit a PR :slight_smile:

1 Like

Where do I put startup code in Elixir?

4 Likes

I wrote about Highlander, a micro-library for running a single globally unique process in your Erlang cluster!

2 Likes

Horde’s got some big changes coming in 0.8.0, click here to read about it!

4 Likes

Nice article!

i have learned something new today

Thanks for sharing

1 Like

We recently improved EventStore’s performance by 2x to 4x+ (depending on network conditions) and blogged about it here: https://moosecode.nl/blog/event_store_optimized

3 Likes