149 karma · joined Jul 8, 2015 (11y ago) · 71 submissions
comment 3mo ago · link · parent
comment 3mo ago · link · parent
If all events need to arrive, then the problem is not "notification" (which would be solved by webhooks) but "database replication": subscribe to new events, fetch the full snapshot, fetch the updates in range, have the monotonic value to establish the "range" in the first place. Reach the eventual consistency.
The proposed SCROLL handles half of these, which limits its use-cases.
comment 7mo ago · link · parent
That 'tapping phones' could also be used to facilitate key exchange verification, making that chore technically useful.
Then again, that would be better done in an open-source app and not tied to any particular domain.
comment 1y ago · link · parent
Count the amount of `Any` / `unknown` / `cast` / `var::type` in those codebases, and you'll notice that they aren't particularly statically typed.
The types in dynamic languages are useful for checking validity in majority of the cases, but can easily be circumvented when the types become too complicated.
It is somewhat surprising that dynamic languages didn't go the pylint way, i.e. checking the codebase by auto-determined types (determined based on actual usage).
comment 1y ago · link · parent
See "But how do we solve arrays" part:
> > .map() is special. It does not send JavaScript code to the server, but it does send something like "code", restricted to a domain-specific, non-Turing-complete language. The "code" is a list of instructions that the server should carry out for each member of the array
comment 1y ago · link · parent
comment 1y ago · link · parent
I heavily recommend writing a known working version in there, i.e. `"httpx~=0.27.2"`, which, in the best case, would allow fixes and security patches (e.g. when httpx 0.27.3 releases), and, in the worst case, would let you change to `~=` to `==` in case httpx manages to break the backwards compatibility with a patch release.
And, of course, always use `if __name__ == "__main__":`, so that you can e.g. run an import check and doctests and stuff in it.
comment 1y ago · link · parent
Although, perhaps, having an external VPS with a dns proxy could be a good middle ground?
comment 1y ago · link · parent
And the mere fact that it's hard to reason about these things means that it's hard to avoid problems. Hence, the easiest solution is likely "it may be possible to recover Snapshot Isolation by only using the writer endpoint", for anything where write is anyhow conditional on a read.
Although I'm surprised the "only using the writer endpoint" method wasn't tested, especially in availability loss situations.
comment 1y ago · link · parent
You could store the key->version separately, and read the said version. If the cached version is lower, it's a cache miss.
Of course, evicting something from cache (due to memory constraints) is a bit harder (or less efficient) in such setup.