Better HN
topnewbestaskshowjobs
Log inSign up

ngriffith

7 karma · joined Feb 21, 2017 (9y ago) · 3 submissions

Submissions

1.

Show HN: A Rust-Powered CLI for macOS's “Night Shift”(github.com ↗)

1 points · by ngriffith · 6y ago · discuss

comment 9y ago · link · parent

And now I feel old...

comment 9y ago · link · parent

I've found that co-locating my queue with my application data enables a very powerful pattern around persisting actions and queuing up callbacks -- especially useful for smaller applications where scale isn't as much of a factor. It means I can persist both my data and my background jobs in a single transaction, and if something goes wrong during that transaction they both rollback (before the jobs are picked up by any workers). No need to coordinate two different systems (which can be full of pitfalls).