One thing that sync engine advocates miss imo is that backends run in the edge now, and the edge is really close. Here from my home office, our prod app is literally 8ms away. When I virtual scroll over a 10k record collection, the timings are:
FIRST PAGE LOAD:
8ms: send scroll offset to closest edge server
70ms: get from edge network to database in AWS (50ms for cross-continental, 100ms for cross-atlantic)
200ms: run database query once, return all 10k records to edge
0ms: retain result on session in edge
0ms: subvec over collection to read page
0ms: serialize one page of records
8ms: send one page of records to client
0ms: deserialize one page of records
=286ms from user interaction to initial table load
SUBSEQUENT SCROLL OFFSET CHANGE:
8ms: send scroll offset to edge
0ms: subvec over retained collection in memory
0ms: serialize one page of records
8ms: send one page of records to client
0ms: deserialize one page of records
= 16ms from user scroll to next results
That's 1 frame at 60 FPS! 60FPS virtual scroll over remote objects! This is why, with
#ElectricClojure, we can stream results while hitting typical response latency of 20-30ms—gasp, horror, 1.5 animation frames—it is plenty! Those are pro gaming latency numbers! In video chat we consider this realtime!
And Electric, being a reactive computation, auto-memoizes your edge computation for FREE! This performance for FREE!