Announcing Delta – Operational Transform in Elixir

In this article, I talk about the Elixir library Delta we at Slab just open-sourced, its various features including support for Operational Transform, and how it can be used to build collaborative systems.

Feedback and questions welcome!


Corresponding tweet for this thread:

Share link for this tweet.


At the end of the article there is,

We’d love to hear your comments, feedback and if there’s anything else about Elixir or OTP you would like to learn more about.

In that case, I’d like to know more about functional algorithms. Have you implemented any? How?
I would also like to know more about optimizations, as I’m just naturally curious about the subject.


Sure, this library itself is the functional implementation of the original Javascript version. You can look at the both implementations of the Operational Transform algorithm to see how we converted it.

Well, optimizations are very specific to the problem you’re solving and premature optimization is usually not a good idea (unless you absolutely know what and why you’re optimizing). However, some general strategies can always help (e.g. tail-call optimization for recursive functions, calculating large/complex values at compile-time and storing them in module attributes, ETS for memoization, etc.), but again you should always profile before optimizing to make sure your efforts are focused on the right problem.

Feel free to post a question on DevTalk/ElixirForum/StackOverflow if you have a specific problem you need help with, and I’d be happy to look at it.