Links for December 2023

Mon Jan 01 2024E.W.Ayers

1. Programming

1.1. Even more Browser sync engines

I had a good debate at work about how these sync-the-database approaches (instead of having a traditional API) seem good in theory but they fall over if you have a large product. This is because

  1. You very rarely want to sync the entire database. Even usecases that seem small can become unmanageable after a few years of use. (eg Slack chat history)

  2. The order in which you sync the data can't be neglected: you often need to paginate or virtualise UI over views.

  3. By syncing the database, you now need the database to be both your source-of-truth and API. The two things are coupled. If you want to change one you have to change the other which can become a migration nightmare if you have a large app or multiple products using the same db.

  4. It's also a brainteaser doing security and consistency: You end up needing a user-action application-model anyway.

  5. How do you handle derived data that needs some external service to compute?

I think you can solve these, but not without a lot of extra work:

Now the challenge has shifted to being about making sure these materialised views are synced. When we eventually figure out how to do all that; I worry we will have reinvented an API and Redux.js.

2. Products

3. Other links