Elektrine lite

← Feed

@oberstal@infosec.exchange

2026-07-13 22:15 UTC

@lkanies@hachyderm.io @ripienaar@devco.social I wouldn't claim to have solved sync, but I found it a lot easier from a mental model perspective to just do last-write-wins with merge when receiving updates from CloudKit, store photos as CKAssets, and not try to do any kind of ordering or sequencing of any changes. One outbound queue for local writes going up to the cloud, one separate inbound queue for processing updates, inbound queue can never trigger anything that would cause something to enter outbound queue, to avoid feedback loops. It does mean users of my app see weirdness like photos for entities arriving before the entity text on a brand new device, but have had zero complaints about "lost updates" since switching to this model. Oh, and I got a *lot* less frustrating outcomes using UIKit rather than SwiftUI. Uglier code, but LLMs seem to have less difficulty with it, more OOTB performance.

Replies (2)

  • @lkanies@hachyderm.io 2026-07-14 06:15

    @oberstal@infosec.exchange @ripienaar@devco.social I’m just using SwiftData at this point so it’s all “magic”. I am about to have to abondon it, though, I think. I have a bit more testing and trouble-shooting, but if that goes poorly I will have to find something else. I need to move away anyway because I need multiplayer eventually, and I don’t think it can provide it

    Open ##5049133

  • @lkanies@hachyderm.io 2026-07-14 07:12

    @oberstal@infosec.exchange @ripienaar@devco.social I have to admit that I am a bit fixated on the various data structures based on Merkley trees, and how using one may simplify other efforts. And if I don’t use one of those, then I will fixate on CRDTs. I probably need to move past the fancy stuff and pick something boring. But… not until summer’s over at least :)

    Open ##5049134