Skip to content

Instantly share code, notes, and snippets.

@edenhill
Created December 14, 2015 19:33
Show Gist options
  • Save edenhill/1ce95d7def338007d3d1 to your computer and use it in GitHub Desktop.
Save edenhill/1ce95d7def338007d3d1 to your computer and use it in GitHub Desktop.
Data is always possibly outdated in distributed systems (including multi-threaded applications):
* Dont use atomics, they are slow.
* Use locks, they are fast, especially when uncontended.
* Hold locks as shortly as possible: Lock, copy, unlock, process, propagate, progress
* Strive for thread local data (not TLS) which requires no locking, use inter-thread events to propagate information.
* Process events best-effortly
* Dont demand exactness, but require progress. Try to recover.
* Use event version barriers to throw away outdated async data
User experience:
* Have reasonable defaults
* Require as little configuration as possible
* Provide sensible logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment