This is my attempt on writing a sync engine in go. This project is heavily inspired by the work of Figma and Linear
- Race Conditions in WebSocket Transactions
Problem: Multiple clients hitting the same task at once creates race conditions. Last write wins, potentially trashing earlier changes.
- Optimistic Updates Without Proper Conflict Resolution Frontend does optimistic updates:
Problem: Server rejects a transaction but client UI doesn't roll back properly. Now the client's state is screwed up.
- Transaction Ordering Guarantees Backend fetches transactions by ID:
Problem: Network delays mess up transaction arrival order. Processing strictly by ID might execute operations in the wrong sequence.
- No offline support I don't think there is any support for offline mode in this project. Would be sweet to implement that as well.