Stephen Margheim Profile Banner
Stephen Margheim Profile
Stephen Margheim

@fractaledmind

2,317
Followers
1,209
Following
341
Media
6,509
Statuses

tweeting about Ruby, Rails, SQLite, CSS, HTML, plus various and sundry other

Berlin, Germany
Joined March 2013
Don't wanna be here? Send us removal request.
Pinned Tweet
@fractaledmind
Stephen Margheim
3 months
As I approach finishing the first edition of "SQLite on Rails", I have gone ahead and listed it on @Gumroad . If you purchase early, you will get access to the book early and can help me polish the first edition. Plus, you can lobby for new chapters!
19
24
119
@fractaledmind
Stephen Margheim
7 months
The Rails error reporting interface makes it possible to have a minimal error tracker built right into your application. Introducing Solid Errors! It is a DB-based, app-internal exception tracker for Rails applications.
Tweet media one
25
43
291
@fractaledmind
Stephen Margheim
8 months
It's official! SQLite v3.45.0 is here with JSONB support: TL;DR โ€” you don't need to change anything, SQLite will just work with JSON faster ๐Ÿชถ๐Ÿš€
7
37
269
@fractaledmind
Stephen Margheim
1 year
I feel a bit lost. I see so many people "dunking" on DHH's recent tweet by saying that many unicorn companies refactored infra to use less Rails. The implication seems to be that one ought not to use Rails at all, which seems ridiculous. Scale infra when you must, not before. ๐Ÿคท๐Ÿป
27
13
221
@fractaledmind
Stephen Margheim
4 months
Reminder that anyone can spin up a @Hetzner_Online Cloud server for a Rails app that could handle 48 Puma workers, each with at least 2GB of RAM! And all of that for less than โ‚ฌ350 per month! Save yourself the headaches and donโ€™t horizontally scale until you max out vertically.
Tweet media one
17
12
176
@fractaledmind
Stephen Margheim
8 months
Iโ€™ve been trying to tell yโ€™allโ€”SQLite is production-grade software, 100%. Configure it well, and it will sing for you. And the operational simplicity will warm your heart. Plus, for Rails devs, I can confidently say no web framework tunes SQLite better.
@dhh
DHH
8 months
So we were testing out ONCE #1 on a big AWS instance and hitting 30,000 concurrent users on our metrics. Pretty cool to see that using sqlite! Can't wait to see what we can do with our new gen 5 SSD boxes. Sqlite can go very far these days.
53
57
1K
11
13
155
@fractaledmind
Stephen Margheim
6 months
Getting married tomorrow. In Jamaica. To the most beautiful and intelligent and patient woman Iโ€™ve ever met. With my family here with us. Feeling lucky tonight
27
0
140
@fractaledmind
Stephen Margheim
6 months
Wedding โœ…
Tweet media one
10
0
136
@fractaledmind
Stephen Margheim
11 months
I have been working to improve the SQLite adapter for Rails as much as possible, as quickly as possible. Today, I have 6 PRs (3 merged, 3 open). Once all are merged, #SQLiteOnRails will have generated columns, deferred foreign keys, auto-populating columns & custom primary keys
7
11
119
@fractaledmind
Stephen Margheim
3 months
This is one of my favorite Stimulus-driven form components: a minimalist take on a multi-select combobox. Using either an input with a datalist or a select-box, I pair that element with a dynamic collection of checkboxes to create a multi-select component.
Tweet media one
8
3
121
@fractaledmind
Stephen Margheim
5 months
Worth saying clearly and loudly: v2 of the sqlite-ruby gem provides everything you need for: 1. IMMEDIATE transactions 2. A non-GVL-blocking busy timeout 3. Fair retry mechanism 4. WAL mode And weโ€™ll be getting Rails using these features by default soon.
@flavorjones
mike dalessio
5 months
This post by @fractaledmind on sqlite performance in Rails apps is just terrific: The change to retry timing he mentions is in the new 2.0 release of the sqlite3 gem! #ruby #rails #sqlite
0
10
46
4
16
114
@fractaledmind
Stephen Margheim
5 months
SQLite requires a different mindset for performance tuning than most dbs. For MySQL or PG the default advice is to prefer a smaller number of large queries, to minimize network latency. For SQLite, you should prefer a larger number of small queries.
4
9
111
@fractaledmind
Stephen Margheim
9 months
I think @dhh โ€™s focus for Rails 8 will only accelerate the momentum of the Rails renaissance in 2024. And Iโ€™m personally excited to do my small part to help build out the ecosystem for operationally lightweight but sound apps, particularly leaning on SQLite.
6
3
110
@fractaledmind
Stephen Margheim
9 months
Using SQLite in production requires you to figure out a backup/replication setup. I find @litestreamio to be the best option. And, today, I am so excited to announce the litestream gem. Install the executable and integrate with your Rails app with ease
7
14
100
@fractaledmind
Stephen Margheim
11 months
As promised, I am releasing a new gem today to add to the enhancements to the Rails 7.1 SQLite adapter. By simply installing the gem into your Rails 7.1 app, you get auto-populating columns, custom primary keys, virtual columns, and deferred foreign keys:
6
23
96
@fractaledmind
Stephen Margheim
6 months
Really excited for this workshop @railsconf this May! Come join to dig into what it looks like to run a full-featured Rails application on SQLite, and along the way we will get a clearer sense of what kinds of applications SQLite is (and isnโ€™t) a good fit for.
Tweet media one
7
7
98
@fractaledmind
Stephen Margheim
8 months
This is a pure vanity metric, but it makes me happy and proud and so I am going to share it. With my most recent PR, I am now in the top 500 contributors to Rails all time! I really love this community, and it is so amazing to realize I have been able to give back in this way.
4
0
97
@fractaledmind
Stephen Margheim
8 months
You can meaningfully improve the security of your Rails application in less than 10 minutes, when you know what you need to do. I had to do this recently, and I wrote up a guide on the "quick wins" everyone should apply:
6
13
96
@fractaledmind
Stephen Margheim
8 months
This means a vertically scaled #SQLiteOnRails application could handle a peak load of 50k concurrent requests. I promise you, that new app you are considering building, it will be years before you see that peak! Start simple and lean, scale vertically, enjoy the many DX benefits
@dhh
DHH
8 months
We ran this test again on one of our own boxes with gen 5 SSDs and this time saw a potential of over 50,000 concurrent users!! And it seemed like there might well have been more to squeeze with a few tweaks. Vertical, single-box scaling is wild these days!
20
22
343
12
13
93
@fractaledmind
Stephen Margheim
5 months
This isn't even fully tuned for concurrent load. If you are setting up a SQLite web app, be sure to hit the 3 keys: 1. WAL journaling mode 2. IMMEDIATE transactions 3. non-blocking busy_timeout More info here:
@ashleyrudland
Ashley Rudland ๐Ÿฆ
5 months
On Hetzner, โ‚ฌ3.29/mo VPS, it's 14,000 writes/sec ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ Okay serverless might be dead hahaha @ImSh4yy try it yourself ๐Ÿ‘‰
Tweet media one
30
32
378
0
12
93
@fractaledmind
Stephen Margheim
2 months
I haven't talked about one of my favorite gems in a while, so I wanted to dig into Acidic Job for a bit again today. Acidic Job brings stateful workflows to your existing ActiveJob system. Define long-running, multi-step workflows in a single job easily
3
5
84
@fractaledmind
Stephen Margheim
1 month
New #SQLiteOnRails feature just landed in @rails main! As of now, Rails will ensure to use IMMEDIATE transactions for SQLite transactions. This solves a major pain point for Rails apps where busy exceptions are often thrown due to DEFERRED transactions being the default.
3
8
82
@fractaledmind
Stephen Margheim
8 months
@_byroot The Shopify monolith running on Ruby and Rails edge is such a strong signal of both the health of those tools as well as of Shopifyโ€™s engineering culture
1
4
80
@fractaledmind
Stephen Margheim
5 months
This is a UX that I have always preferred, and will soon be available to Rails apps without any JS through View Transitions. You get the signal that this page is contextually bound to a previous page, you get a spatial animation, but you can use standard routing and rendering
@saasshots
SaaS Shots ๐Ÿ“ธ
5 months
Add new company account modal view from @IncreaseDev
0
4
165
4
6
79
@fractaledmind
Stephen Margheim
9 months
In the spirit of the holidays, here is another gift for the #SQLiteOnRails ecosystem! You can now easily install and load any of the 62 extensions on the registry into your Rails app via the `sqlpkg` gem.
2
19
78
@fractaledmind
Stephen Margheim
7 months
Thinking about live-streaming some the next two weeks. Building a Rails + Turbo 8 basic clone of the new Superlist. Three questions: Would you join? What do you think is the easiest way to live-stream? And, should I do it as a kind of mob programming session instead of solo?
17
4
78
@fractaledmind
Stephen Margheim
4 months
๐ŸŒถ๏ธ take: You don't need Kamal/Docker for cross-platform, reproducible builds of your Rails app. If you fully embrace #SQLiteOnRails , all you need is Bundler/RubyGems. That $4 VPS will run even smoother without the overhead of Docker.
14
8
76
@fractaledmind
Stephen Margheim
19 days
The second major PR to help ensure that Rails 8 is the world's best web framework for building powerful yet operationally simple apps with SQLite just landed! This feature will ensure that response latency stays reasonably flat, even under heavy concurrent load.
10
4
76
@fractaledmind
Stephen Margheim
1 month
What you will be able to do with nothing but Rails 8 and SQLite will be absolutely astounding. The compression of complexity is so dense, Rails 8 is basically creating a complexity blackhole ๐Ÿ•ณ๏ธ
@dhh
DHH
1 month
Solid Queue and Solid Cache will both be out-of-the-box defaults for Rails 8. But we're not done there. Two more Solid * projects in the oven already. We'll compress as much complexity as possible into a single data source.
3
6
198
0
4
73
@fractaledmind
Stephen Margheim
8 months
I know plenty of people that follow me recognize that SQLite is indeed a production-ready database engine, but for any of you that are still skeptical, I'm going to keep posting every app running SQLite in production today so that the evidence becomes undeniable.
@_mql
Michael Aufreiter
8 months
@fractaledmind Not on Rails, but uses Node, SQLite and Sveltekit (all reqs dynamic) and easily handled the Hackernews spike.
1
3
14
15
7
71
@fractaledmind
Stephen Margheim
5 months
Rails today is *not* ready for SQLite in prime time with no tweaking. The default production Puma config and the default SQLite + ActiveRecord config arenโ€™t well tuned to each other. A thread๐Ÿงต
5
5
73
@fractaledmind
Stephen Margheim
10 months
Working on something new... ๐Ÿ‘€
Tweet media one
8
3
69
@fractaledmind
Stephen Margheim
3 months
I have made 99 sales of the SQLite on Rails Workbook! That is truly wild to me. Thanks for all of the support! Gotten some good feedback on how to improve the clarity in some places, some topics to explore to add chapters, and working on the PDF version. Here's to 100 more ๐Ÿคž
5
1
67
@fractaledmind
Stephen Margheim
9 months
Opened the two promised @rails PRs to stabilize SQLite3 concurrency support! Together, these PRs will eliminate those pesky SQLite3::BusyExceptions that annoy us so. Once merged, these will mark another massive step forward for #SQLiteOnRails . (links in next tweet)
2
4
67
@fractaledmind
Stephen Margheim
1 month
Enjoying my first day at #RubyConfAfrica2024 !
Tweet media one
5
4
67
@fractaledmind
Stephen Margheim
7 months
Wedding #1 - Denmark ๐Ÿ‡ฉ๐Ÿ‡ฐ Up next: NYC ๐Ÿ—ฝ then Jamaica ๐Ÿ‡ฏ๐Ÿ‡ฒ We are galavanting across the globe getting married in stages in 3 different locales. It is our grand wedding adventure!
Tweet media one
19
0
66
@fractaledmind
Stephen Margheim
10 months
I just saw my first @bigbinary blog post summarizing the changes to Rails for SQLite connection configuration from my PR: I feel a bit startled that my work is now being covered by a blog I read so often like BigBinary's ๐Ÿ˜ฑ
4
6
66
@fractaledmind
Stephen Margheim
11 months
The #SQLiteOnRails movement is healthy and vibrant!
Tweet media one
1
4
66
@fractaledmind
Stephen Margheim
5 months
Finally cracked how to setup separate connection pools in your #SQLiteOnRails app for reading and writing. This will ensure that writes will never saturate your connection pool and block reads. You can experiment with it now via the enhanced adapter gem:
5
3
63
@fractaledmind
Stephen Margheim
11 months
โ€œIf you can run your application in a single process, SQLite is the best possible database engine you can use.โ€ โ€” @dhh ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป Could not agree more. SQLite is a wonderful place to start your Rails app
4
4
64
@fractaledmind
Stephen Margheim
3 months
If you havenโ€™t heard yet, I have released the beta version of the SQLite on Rails Workbook on Gumroad: You can learn everything I know about building production-ready #SQLiteOnRails apps today
1
17
62
@fractaledmind
Stephen Margheim
27 days
This was such an enjoyable conversation. We talked about my journey into programming, old college rivalries, the aesthetics of simplicity, andโ€”of courseโ€”some nitty gritty details around Ruby and SQLite. @aarondfrancis was a gracious and curious host. Such a pleasure!
@aarondfrancis
Aaron Francis
27 days
I had the pleasure of talking to @fractaledmind about SQLite and all his work to make the standard Rails + SQLite setup super smooth and fast. I very much appreciate his stance on simplicity. Y'all go listen!
Tweet media one
4
6
59
4
8
63
@fractaledmind
Stephen Margheim
9 months
Been checking out the code for #SolidQueue by @rosapolis , and there are so many patterns and details to learn from. I am genuinely leveling up my knowledge and skill in writing Ruby and Rails engines just from careful study of this codebase. Plus, I love the functionality!
2
4
62
@fractaledmind
Stephen Margheim
6 months
Keep your eyes on this space. I'm going to be open sourcing my SQLite tokenizer written in pure Ruby this weekend. It will have lots of tests, but even so there may still be bugs lurking in there. If you can find a bug and provide a test case, I'll buy you a drink at a conf!
1
2
59
@fractaledmind
Stephen Margheim
6 months
More and more people are learning that SQLite is truly ๏ฟฝ๏ฟฝproduction-readyโ€. Sure, it requires some configuration, but this can be provided by frameworks and isnโ€™t too hard to learn about. There are really 3 keys: fine-tuning, backups, and concurrency.
@enunomaduro
Nuno Maduro โ˜๏ธ ๐Ÿฆน
6 months
The idea that SQLite shouldn't be used in production is about a decade out-of-date at this point. ๐Ÿ‘๐Ÿป
21
18
241
5
7
61
@fractaledmind
Stephen Margheim
1 year
I've been sharing techniques for enhancing SQLite in a Rails app without yet tackling the major reason most people don't use SQLite for production web appsโ€”disaster recovery. Today, I walk thru how to setup @litestreamio to make this problem disappear:
3
11
60
@fractaledmind
Stephen Margheim
1 year
I've opened 3 more Rails PRs today to keep improving the experience of using SQLite in your Rails applications. Really enjoying bringing more power to the Rails + SQLite experience. But, what pain points have you experienced that you wish Rails would address?
4
0
57
@fractaledmind
Stephen Margheim
9 months
If you've ever seen "database is locked" errors in production when using SQLite, you've probably been frustrated by attempts to resolve the issue. After bumping into the issue one too many times, I sat down and dug in to figure out what is going on and how to resolve it. ๐Ÿงต
2
14
57
@fractaledmind
Stephen Margheim
3 months
A strong second. Iโ€™ve been rolling my own username/password authentication as well as OAuth for a while now, and you really cannot fully appreciate the difference until you need to change something or debug something. Owning auth in Rails is both doable and manageable.
@ryanrwinchester
Ryan Winchester
4 months
Own your auth. Own your user accounts. Understand the basic best practices. It's not difficult and there are good libraries. You can do this. It is not as scary as you think.
71
83
813
4
4
57
@fractaledmind
Stephen Margheim
9 months
Need to build a new app for work next week. Going to use SolidQueue and SolidCache, each backed by a separate SQLite database. Will be backing up each with Litestream. This will be another great example of a #SQliteOnRails app
6
4
54
@fractaledmind
Stephen Margheim
8 months
Another person sharing the bliss they found in shipping a #SQLiteOnRails application: > It's rare for me to find this much joy in the back-end & infrastructure side of a project.
4
9
51
@fractaledmind
Stephen Margheim
6 years
@TheBreeMae It is frustrating how many people read the phrase as equivalent to "masculinity, which is toxic" instead of (the correct reading) "masculinity that is toxic".
1
5
49
@fractaledmind
Stephen Margheim
8 months
Honored that the new SQLite default config PR made this list. Rails is already the best web framework for deploying SQLite to production, but things are going to really take off in 2024, I can feel it. Iโ€™ve really enjoyed getting more involved in Rails in 2023. More to come!
@rails
Ruby on Rails
8 months
๐Ÿ“ข This Week in Rails is out and includes the team's favorite Rails pull requests from 2023. Here is their recap:
0
12
44
2
1
50
@fractaledmind
Stephen Margheim
10 months
It's official! I'll be speaking at @rubyconftw this December in Tapei. This will be my first time in Taiwan๐Ÿ‡น๐Ÿ‡ผ and I'm so excited to connect with the Ruby community there. Come check out my talk if you're thereโ€”we'll be building a production-grade #SQLiteOnRails app in 30 mins ๐Ÿ˜ฑ
8
3
51
@fractaledmind
Stephen Margheim
10 months
Making steady progress on the Ruby SQLite query builder. Here is our interface or ORDER BY columns. What I love about this API is that is is both readable and also covers the entire surface area of SQLite's syntax
Tweet media one
3
3
50
@fractaledmind
Stephen Margheim
11 months
I got a RailsWorld ticket! Massive shout-out to @dfjones89 for a wonderful chat and a seamless transfer. Iโ€™m excited that I will be able to actually see the talks in Amsterdam.
6
1
50
@fractaledmind
Stephen Margheim
7 months
๐ŸคžJust submitted my proposal for Rails World 2024! If there is an area of Rails that you have found yourself deeply exploring, I think you should submit a proposal as well:
6
0
50
@fractaledmind
Stephen Margheim
9 months
Crazy that I could pass 1k before the end of the year. It wasnโ€™t until half way thru the year that I decided to get more active in the Ruby and Rails communities. You all have given so much to me over the last decade, it was time to start paying back. Looking forward to 2024!
Tweet media one
6
1
49
@fractaledmind
Stephen Margheim
9 months
Busting another #SQLite myth today! You might think that SQLite can't work as your production database because it doesn't support concurrent writes. Well, this is a myth. In today's post, I dig into the details and run a bunch of benchmarks. Check it out:
2
10
48
@fractaledmind
Stephen Margheim
3 months
While riding the excitement from pre-launching my ebook, I am also super excited to announce that I will be speaking at #RailsWorld on, you guessed it, how Rails 8 and SQLite together create powerful opportunities for building production-grade, full-featured web apps.
8
2
48
@fractaledmind
Stephen Margheim
3 months
@yukihiro_matz and I are both nice (as you can tell from our @balticruby shirts)
Tweet media one
2
3
48
@fractaledmind
Stephen Margheim
8 months
Another small improvement as Rails steadily widens the gap as the best web framework for running SQLite-backed apps in production: You will no longer have the "You are running SQLite in production" warning. Now, you get a clear comment in database.yml
1
0
48
@fractaledmind
Stephen Margheim
11 months
@htmx Rails is going with idiomorph over morphdom for the new Turbo 8 version being released later this year. @jorgemanru was just on stage at #RailsWorld explaining why it performed better in their testing. So excited for the future of the frontend in Rails
2
1
48
@fractaledmind
Stephen Margheim
9 months
Slides are up for my @rubyconftw talk on how (and why) to run SQLite in production. Find the link at the top here: You can also find the source code for the demo app I used: Play with the demo app here:
3
8
48
@fractaledmind
Stephen Margheim
7 months
And, of course, @rails sets this by default for you. Rails is definitely the best web framework for building a SQLite application, and it does so much for you to set you up for success.
@Dominus_Kelvin
K.O.O
7 months
Have you made this change to your SQLite database? ๐Ÿ‘€
1
2
14
4
5
47
@fractaledmind
Stephen Margheim
19 days
It completely blows my mind that this PR also puts me in the top 400 Rails contributors all time. ๐Ÿคฏ I genuinely cannot believe that in the 20 year history of Rails, I have been lucky enough to have an impact like this. And I have more contributions ahead of me!
@fractaledmind
Stephen Margheim
19 days
The second major PR to help ensure that Rails 8 is the world's best web framework for building powerful yet operationally simple apps with SQLite just landed! This feature will ensure that response latency stays reasonably flat, even under heavy concurrent load.
10
4
76
0
1
47
@fractaledmind
Stephen Margheim
8 months
This is such an important point: A system with 99.99% guaranteed uptime must be 50 times(!) as reliable as one with "only" 99.5%. The cost of building and operating a system in a way that guarantees 99.99% uptime is several times as expensive as 99.5%.
2
6
47
@fractaledmind
Stephen Margheim
1 month
Tweet media one
0
5
46
@fractaledmind
Stephen Margheim
9 months
Has any one used a perf testing tool that can simulate thousands of users accessing your Rails app? Iโ€™d love to learn more
18
2
46
@fractaledmind
Stephen Margheim
5 months
Just released a 0.4 of Solid Errors! ๐Ÿš€ Now errors can trigger email notifications, error pages with lots of occurrences load faster with pagination, the footer sticks to the bottom of the page even on short pages, and pleny more fixes from the community!
3
5
46
@fractaledmind
Stephen Margheim
8 months
Now in @rails main, you can set any of the supported SQLite pragmas from your database.yml file, even overriding the default pragma configuration. More flexibility, more power in your hands to tune your application to your needs. Another nice improvement
3
6
45
@fractaledmind
Stephen Margheim
4 months
I love seeing the excitement this year around conferences in the Ruby realm. @railsconf next week is going to be wonderful. The tickets for #RailsWorld were such a hot commodity. @BalkanRuby and @wrocloverb recently were such lovely single track confs.
2
4
44
@fractaledmind
Stephen Margheim
8 months
In my constant pursuit to make Ruby the best ecosystem in the world to work with SQLite, I just got a lovely PR merged into the sqlite3-ruby gem which adds a connection timeout mechanism that doesn't hold the GVL. I will be wiring this up with Rails next. ๐Ÿงต
3
2
45
@fractaledmind
Stephen Margheim
3 months
Well, I just made my first dollars on the internet!
2
0
44
@fractaledmind
Stephen Margheim
3 months
With a bit of CSS, you can build a simple color picker out of a collection of radio buttons. No JS needed. Most of the time, our projects don't need a full-fledged color picker where users can craft any possible color.
Tweet media one
5
4
44
@fractaledmind
Stephen Margheim
1 month
I really enjoyed getting to share my journey as a @rails contributor. I love the Ruby and Rails community, and Iโ€™m happy to be a part of it. #RubyConfAfrica2024 is a wonderful example of the liveliness and energy in our community!
@ruby_african
African Ruby Community
1 month
@fractaledmind 's topic was The Rails Contributor Mindset: Breaking through PRs๐Ÿ˜… Key takeaways: -Make friends and be active in open source communities -You are offering a burden not a gift๐Ÿ‘๐Ÿพ -Put yourself in the maintainerโ€™s shoe. Awesome Session!!! #rubyconfafrica2024
Tweet media one
Tweet media two
0
0
5
0
9
44
@fractaledmind
Stephen Margheim
4 months
Excited for #RailsConf next week. If you want to learn more about how to spin up a production-ready SQLite on Rails app, definitely come check out my workshop!
@railsconf
RailsConf
4 months
Meet @fractaledmind , Rubyist, web developer, & engineering manager @ Test IO ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ปโœจ Living in Berlin with his wife and 2 dogs, he is a Rails and sqlite3-ruby gem contributor, and maintains gems aimed at making Rails the top SQLite project platform. More:
Tweet media one
0
2
10
1
4
44
@fractaledmind
Stephen Margheim
7 months
The gem works particularly well with #SQLiteOnRails applications, as you can connect the gem to a separate db: `rails generate solid_errors:install --database errors` PS. How to configure your database.yml file to use multiple databases:
@fractaledmind
Stephen Margheim
7 months
The Rails error reporting interface makes it possible to have a minimal error tracker built right into your application. Introducing Solid Errors! It is a DB-based, app-internal exception tracker for Rails applications.
Tweet media one
25
43
291
3
3
44
@fractaledmind
Stephen Margheim
10 months
Making solid progress on the query/SQL builder. First step was selecting data. What do you think?
Tweet media one
5
2
44
@fractaledmind
Stephen Margheim
1 month
Another PR merged to advance #SQLiteOnRails ! This one is a big fix to ensure that functions defined in dynamic columns or column defaults can have commas within them.
2
0
42
@fractaledmind
Stephen Margheim
3 months
New profile pic. Who dis?
Tweet media one
8
0
42
@fractaledmind
Stephen Margheim
27 days
I've been working on a new gem for building CLI/TUI forms. It is my attempt to build something functional and beautiful, but with simplicity at its base. After a deep dive into the problem space, I've found a high-leverage way forward that I'm excited about. ๐Ÿงต
5
2
43
@fractaledmind
Stephen Margheim
5 months
New post! I took the core of my @wrocloverb talk and wrote up a full post on the how's and why's of optimal performance for #SQLiteOnRails apps. I walk through the 5 keys to production-grade performance, explaining the problems and solutions step by step
1
17
42
@fractaledmind
Stephen Margheim
6 months
Check out Feather: Now, Feather only contains a Ruby SQLite lexer. But, I am working on the parser, and I have SQLite-tuned connection pool implementation nearly done as well. Eventually, feather will be *the* Ruby lib for working with SQLite elegantly.
@fractaledmind
Stephen Margheim
6 months
Keep your eyes on this space. I'm going to be open sourcing my SQLite tokenizer written in pure Ruby this weekend. It will have lots of tests, but even so there may still be bugs lurking in there. If you can find a bug and provide a test case, I'll buy you a drink at a conf!
1
2
59
3
5
40
@fractaledmind
Stephen Margheim
11 months
I just submitted my proposal for a "How (and why) to run SQLite in production" talk to @rubytaiwan RubyConf Taiwan 2023. It's a 40 minute live-coding session where we build and deploy a fully-featured Rails app, exploring the benefits of leaning on SQLite.
1
3
41
@fractaledmind
Stephen Margheim
8 months
This is one of the best, clearest, and fairest articulations of why you should consider running SQLite in production for your web application: By @WAptekar
5
7
41
@fractaledmind
Stephen Margheim
1 year
If youโ€™ve doubted that Rails + SQLite in production isnโ€™t going to be important, time to update your priors. The combo of simplicity and power is special.
@dhh
DHH
1 year
As machines get ever more powerful, the scope of work that SQLite can handle grows. Cutting out the complexity of running a DB process is a major step forward. We are betting on SQLite in production with our upcoming ONCE product line at @37signals .
39
49
632
2
1
40
@fractaledmind
Stephen Margheim
5 months
If this isnโ€™t clear, let me be explicit: Rails today *is* ready for SQLite in prime time with some tweaking. And Iโ€™ve put all of that tweaking into my enhanced adapter gem. So `bundle add activerecord-enhancedsqlite3-adapter` is all it takes
@fractaledmind
Stephen Margheim
5 months
Rails today is *not* ready for SQLite in prime time with no tweaking. The default production Puma config and the default SQLite + ActiveRecord config arenโ€™t well tuned to each other. A thread๐Ÿงต
5
5
73
4
1
41
@fractaledmind
Stephen Margheim
5 months
Making solid progress on this basic web UI for viewing your Rails app's Litestream backup info
Tweet media one
3
2
41
@fractaledmind
Stephen Margheim
7 months
What is happening?! It is crazy to think 1,500 people have any interest in what I'm doing, but I am grateful and excited to have found such a great online community. I really love chatting and hanging out with all of my #RubyFriends , and continuing to push our ecosystem forward.
Tweet media one
3
1
40
@fractaledmind
Stephen Margheim
8 months
I'm really excited to join @wrocloverb and talk with everyone there about what it looks like in reality to run #SQLiteOnRails applications in production. If you follow me and you are going to be there, please do reach out and let me know. I'd love to chat!
@wrocloverb
wroclove.rb
8 months
Meet the speakers! First up โ€” @fractaledmind will join us to show how (and why) to run SQLite in production environment. You've heard the whispers, sensed the hype, but you're still not sure what all the fuss is about with SQLite these days? You'll learn why SQLite makes sense
Tweet media one
2
9
11
0
8
40
@fractaledmind
Stephen Margheim
10 days
As I work on my #RailsWorld talk, I am growing more excited to share the vision of how Rails 8, with its 2 decades of solutions, and SQLite, with its multiple decades of refinement, together offer a radically simple, yet powerful foundation on which to build your next app.
@dhh
DHH
12 days
The merchants of complexity will try to convince you that you can't do anything yourself these days. You can't do auth, you can't do scale, you can't run a database, you can't connect a computer to the internet. You're a helpless peon who should just buy their wares. No. Reject.
80
459
4K
2
0
41
@fractaledmind
Stephen Margheim
5 months
New version (0.5.0) of the Litestream Ruby gem is out! This version adds a Rake task to restore from a backup. Read more of the details in the repo or in my blog post: Next feature? Validating the restored database
2
3
39
@fractaledmind
Stephen Margheim
8 months
Ok, ok, after all that @adrienpoly helped me simplify my thinking and I grabbed . What do we think? Short and sweet.
@fractaledmind
Stephen Margheim
8 months
I want to create an app to allow people to post their SQLite web applications along with details (host, RAM, memory, etc.). But, what is the best name? I think a .directory name is best (like @Shpigford 's or @robzolkos ' ), but which
4
1
6
7
1
37
@fractaledmind
Stephen Margheim
7 months
This was a great conversation! And be sure to stay for the end, where we jump into some code and I demo the kinds of pain points you can hit around concurrency with SQLite in a Rails app, and how my enhanced adapter resolves these problems.
@Dominus_Kelvin
K.O.O
7 months
Check out the TKYT session with @fractaledmind on how Rails โค๏ธ SQLite. He shares 6+ ways to optimize your SQLite in your Rails apps and discusses how Pieter Levels improved his SQLite database speed ๐Ÿ‘€ Link:
Tweet media one
3
3
28
1
5
38
@fractaledmind
Stephen Margheim
2 months
This is the most thorough PR comment I've ever written: Explored the impact of consistent polling for the SQLite write lock in the busy_handler compared to backing off. As you will see, a backoff kills "tail latency" (how long it takes for the operation
3
3
38
@fractaledmind
Stephen Margheim
3 months
Here is another Stimulus-driven form component for multiple file attachments. This component displays already persisted attachments, newly uploaded attachments, and the dropzone/file input. You can delete all or any persisted attachments and remove all or any uploaded attachments
Tweet media one
4
1
38
@fractaledmind
Stephen Margheim
8 months
The new Prism gem shipping in Ruby 3.3 released today opens up such a vista of new possibilities. @joeldrapper and I have already started experimenting with some use-cases, but I canโ€™t wait to see some of the codemods that emerge in the Ruby ecosystem now. Great work @kddnewton
4
5
38