Derek Kraan's blog

otp
#1

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).

8 Likes
#2

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

1 Like
#3

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

1 Like
#4

thanks!

1 Like
#5

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

3 Likes
#6

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:

6 Likes
#7

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

Link to the mini-library itself

5 Likes
#8

Why should every process be supervised?

4 Likes
#9

What’s new in Horde 0.5.0?

5 Likes
#10

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

4 Likes
#11

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

#12

@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