August 2022 Summaries
4 posts from Fly.io
Filter
Month:
Year:
Post Summaries
Back to Blog
Fly.io enables running apps close to users worldwide by upgrading containers to virtual machines on their hardware. SQLite, often criticized for not scaling well or being a single-user database, has evolved since its rollback journal days with the introduction of the write-ahead log (WAL) in 2010. The WAL allows concurrent reading and writing by writing new versions of pages to another file while leaving the original page intact in the main database file. This enables SQLite to scale better, as demonstrated through a sandwich shop analogy. Enabling the WAL involves setting journal_mode to wal using a PRAGMA command. The WAL file starts with a 32-byte header containing information such as magic number, format version, page size, checkpoint sequence number, and salt value for integrity checks. SQLite's checkpointing procedure copies the latest versions of pages from the WAL back into the main database file to prevent it from growing too large. The SHM index helps in quickly looking up the latest version of any given page for a transaction by storing page numbers and hash map positions. Most applications will benefit from using WAL mode, with rare exceptions where rollback journal might be more suitable.
Aug 24, 2022
2,483 words in the original blog post.
This post demonstrates how to set up a remote in-browser IDE configured for Elixir/Phoenix development using Fly Machines, VMs managed directly by users. The author guides readers through configuring and deploying an Elixir/Phoenix development environment on a Fly.io Machine, creating an app with storage volume and IP address, setting secrets, and starting the new VM. They also show how to log into the remote dev environment and deploy a hello-world Elixir/Phoenix app. The steps involve using Dockerfile, code-server IDE, flyctl CLI tool, and Fly.io platform for VMs management.
Aug 15, 2022
3,274 words in the original blog post.
SQLite, a popular database engine, uses journals to ensure atomicity and isolation of transactions. The rollback journal is one such technique that records the state of the database before any changes are made. In case of an error or failure during a transaction, the rollback journal can be used to revert the database back to its previous state. This mechanism ensures data consistency and durability. However, it may cause bottlenecks in applications with concurrent users as it blocks all other transactions when writing is performed. SQLite has introduced write-ahead log (WAL) and wal2 journaling modes for better support of concurrent readers.
Aug 10, 2022
2,339 words in the original blog post.
Fly.io, a platform that runs hardware globally to deploy applications close to users, has recently improved its storage volumes feature. Volumes are now extendable via the CLI with fly volume extend <volume-id>, and self-service snapshot restores have been added for regular volumes using flyctl v0.0.363. Users can now restore data from a volume snapshot by specifying --snapshot-id at creation time.
Aug 04, 2022
451 words in the original blog post.