Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you explain how you "go back" to an earlier state? I assume your event stream writes into a database, and that database is then used by the front end. Do you replay the entire stream up until date/time x into a separate database to restore or check out the state up to then?


Usually you make heavy use of SELECT DISTINCT ON (…) FROM … ORDER BY ts DESC and you can use WHERE ts < ts_0 to recreate until ts_0. Liberal use of MATERIALIZED VIEWs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: