derekkraan / delta_crdt_ex

Use DeltaCrdt to build distributed applications in Elixir
MIT License
493 stars 36 forks source link

Clarify configuration for DeltaCRDT (sync_interval and max_sync_size) #53

Closed dwmcc closed 3 years ago

dwmcc commented 3 years ago

Hello @derekkraan -- hope you don't mind me opening a PR without an associated issue.

I have been using Horde to manage GenServers in my applications and it works beautifully! In digging into the internals, I was curious which delta_crdt settings I could specify.

Despite the documentation here, I was unable to ascertain what units the sync_interval uses. Although I assumed it was milliseconds, looking through the code confirmed this since you're calling Process.send_after/3 with the sync_interval.

This small change clarifies the function doc to include that this setting is in ms, which may be helpful for future users eager to tweak these settings. I also added a clarification to the max_sync_size setting, as (not knowing how a CRDT works), I was unsure if this was measured in items, bytes, or some other unit.

Feel free to merge if you agree or close if you disagree. Either way, I appreciate your work on these libraries, and Happy New Year! 🍾

derekkraan commented 3 years ago

Thanks for the PR! Happy new year!