sheharyarn
Delta – Track Contents & Changes, Operational Transform in Elixir
Delta 
An expressive format to describe documents’ contents and how it changes over time
![]()
The Delta format is a strict subset of JSON, is human readable, and easily parsible by machines. Deltas can describe any rich-text document, includes all text and formatting information, without the ambiguity and complexity of HTML.
It is also suitable for Operational Transform and can be used in real-time, collaborative document editors (e.g. Slab, Google Docs). A walkthough of the motivation and design thinking behind Deltas are on Designing the Delta Format.
While the package is still v0.1.0 on Hex.pm, we’ve been using it in production for almost 4 years before we open-sourced it, so we’re very confident in our implementation. Feel free to drop any feedback or questions you might have!
Most Liked
sheharyarn
You’re absolutely right. We’re still working on the docs at the moment, but OT itself is such a complex subject, that I believe it’s better to use real-world examples to show how it works and the different pieces connect.
I recently published a post that gives an overview of some of the features and how they can be used:
I’m currently working on another post that will dive into more detail into the real-time collaboration part using Phoenix channels.
sheharyarn
On the frontend, we do in fact use Quill to render the content. We don’t prerender it on the server, and keep the format as-is to for receiving changes, transforming the contents and sending it to clients.
gdub01
This looks awesome!
Out of curiosity, how do you render this content? Like, do you render this to HTML using Quill in javascript or do you have different ways to render this content on the server to a particular target such as HTML?
For example I think flutter has a library to render quill’s format which I think this mirrors? So I’m wondering if you render this in a way that a client can display it client-side only or also on the server?
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









