Best of SQLiteAugust 2024

  1. 1
    Article
    Avatar of quastorQuastor Daily·2y

    How Notion Decreased Latency by 20% with Caching

    Notion achieved a 20% improvement in page navigation speeds by implementing SQLite for client-side caching in their browser application. They used a 'SharedWorker' architecture with WebAssembly to overcome issues like SQLite corruption and slow disk reads/writes. The solution included utilizing web locks to prevent multiple writers and a SharedWorker to manage active tab writes, resulting in optimized caching performance.

  2. 2
    Article
    Avatar of hnHacker News·2y

    Just use Postgres

    When developing a new application requiring persistent data storage, Postgres should be the default choice, especially for web applications. SQLite is suitable for desktop or mobile apps but not ideal for websites. NoSQL databases like DynamoDB, MongoDB, Cassandra, and others offer performance benefits if the access patterns are well-defined beforehand but are less flexible when handling evolving access needs. Redis is efficient for caching but can be used as a primary database with some trade-offs. Datomic and XTDB present innovative approaches with specific benefits and challenges. While advanced databases like Kafka and ElasticSearch excel in niche tasks, Postgres often suffices for general needs, potentially complemented by simpler built-in search functions.

  3. 3
    Article
    Avatar of quastorQuastor Daily·2y

    How Notion Decreased Latency by 20% with Caching

    Notion boosted page navigation speed by 20% on its website by implementing client-side caching using SQLite and WebAssembly. They utilized a 'SharedWorker' architecture to handle data writing, resolving issues related to database corruption and slow disk reads. This approach significantly improved user experience without regressing other performance metrics.