-
Supercharge the One Person Framework with SQLite: Rails World 2024
Continue reading … -
Manipulating
database.yml
This is the second in a series of posts on building powerful and resilient Rails application templates. In the previous post, we discussed parsing and emitting YAML files with comments. Today, we will be looking at manipulating the
Continue reading …database.yml
file’s AST. -
Parsing and emitting
database.yml
Recently, I have been working on Rails application templates. These are scripts that can be run with
rails new
to enhance or extend the setup of a new Rails application with a specific configuration. They can also be ran against existing Rails applications usingrails app:template
. So, they are a powerful tool for automating certain kinds of configuration, modification, and setup tasks. But, there are also many limitations and stumbling blocks to what you can do with them.In this series, I will be sharing some of the things I have learned while working on these scripts. This post is about the difficulty of manipulating the
Continue reading …database.yml
file. Let’s jump into it. -
Problems with a backoff busy handler
In the process of getting the non-blocking
Continue reading …busy_timeout
from thesqlite3
gem used in Rails, I needed to explore the differences between a busy handler implementation that uses a backoff and one that simply polls on a consistent interval. What I found was that a busy handler that backs off kills “tail latency” (how long it takes for the operation in the worst cases). This is because the SQLite “retry queue” behaves very differently from a more traditional queue that we tend to work with and think about, like a background job queue. -
Update to Litestream gem
Version 0.5.1 of the Litestream is out. The 0.5.x versions of the gem adds a new
Continue reading …restore
command along with some useful introspection commands, making it simple to restore a database from a remote backup. This is a huge feature that makes Litestream even more useful. -
The how and why of optimal performance
Continue reading … -
Update to Solid Errors
Version 0.4.2 of Solid Errors is out. The 0.4.x versions of the gem adds a number of awesome new features, most notably email notifications. If you need a self-hosted error tracking solution for your Rails application, Solid Errors is a great choice.
Continue reading … -
Isolated connection pools
If you want to squeeze as much performance out of your SQLite on Rails application, at some point you will need to confront the problem of writes saturating your connection pool. Let’s dig into this problem and how to solve it with some clever usage of Rails’ multi-database support.
Continue reading … -
Introducing Solid Errors
Solid Errors is a Rails engine that provides a dashboard for viewing and resolving exceptions in your Rails application without the need for an external 3rd party service. With version 0.3.0, I am happy to announce that Solid Errors is now ready for production use.
Continue reading … -
Rails security quick wins
I recently launched a major new feature for an application I maintain at $dayjob, and I needed to ensure that the application followed current basic security best practices. It took me a couple of hours to track everything down, so I thought I would document it here for future reference. So, let’s dig into some quick wins for Rails security.
Continue reading …