Hacker News new | ask | show | jobs
by saimiam 1631 days ago
Thank you so much for your reply.

> All of the requests for that User’s config data originating all across Cloudflare’s network will execute serially on that Durable Object, and can modify storage associated with the Object.

I'm liking the sound of this but I need a little more clarity.

Say a user config contains their name and optionally, a twitter handle. The user is logged in on machine 1. The user's virtual assistant is logged in machine 2.

Now, the user adds the twitter handle while basically simultaneously, their VA edits the name to fix a typo. What will be the state of the DO at the end of this? Will the person coding the DO have to write code to resolve the conflicts or is there some sort of `git merge` type algo running which handles updates?

Bonus question, what if both the user and VA updated the name? Even `git merge` can't handle this so I'm guessing either you discard the older request or leave it to the developer to handle this.

Edit: I'm genuinely interested in using DOs and I'm not trying to ask gotcha questions. The documentation just flits past some of the implementation details (or maybe I'm not understanding something which you have already answered)