3 ms·
I had completely forgotten about those built-in ones. Right, so some operations can be made fully atomic server-side, but there are still a bunch of ops (append
by atombender 4y ago
I had completely forgotten about those built-in ones. Right, so some operations can be made fully atomic server-side, but there are still a bunch of ops (append, pubsub, set commands such as SADD, etc.) that would need round trips.
- spullara 4y agoSADD wouldn't need a round trip since it is idempotent. You would just do a blind set which doesn't even require a transaction in FDB. Likewise, most of the other ones can be reframed / designed to not require round trips. I would still not use it as the backend unless I already had FDB in my solution and this was just an additional database type that I needed without ultimate performance as the constraint.
- atombender 4y agoSADD needs to return a value indicating whether the member was added or not, so I don't think you could avoid a round trip, since FDB doesn't have a "set if not exists".
- spullara 4y agoAh, I see. Bummer. Even if it had a set if not exists you would still need a transaction for it.