Video of a conference talk about Saas on Rails on PostgreSQL presented by Andrew Atkinson at POSETTE: An Event for Postgres 2024. In this talk attendees will learn how Ruby on Rails and PostgreSQL can be used to create scalable SaaS applications, focusing on schema and query design, and leveraging database capabilities. We’ll define SaaS concepts, B2B, B2C, and multi-tenancy. Although Rails doesn't natively support SaaS or multi-tenancy, solutions like Bullet Train and Jumpstart Rails can be used for common SaaS needs. Next we'll cover database designs from the Apartment and actsastenant gems which support multi-tenancy concepts, and connect their designs to Citus's row and schema sharding capabilities from version 12.0. We’ll also cover PostgreSQL's LIST partitioning and how to use it for efficient detachment of unneeded customer data. We'll cover the basics of leveraging Rails 6.1's Horizontal Sharding for database-per-tenant designs. Besides the benefits for each tool, limitations will be described so that attendees can make informed choices. Attendees will leave with a broad survey of building multi-tenant SaaS applications, having reviewed application level designs, database designs, to help them put these into action in their own applications.
Andrew is a Staff Software Engineer who specializes in building high performance web applications using PostgreSQL and Ruby on Rails.
Andrew wrote a book "High Performance PostgreSQL for Rails," published by Pragmatic Programmers in 2024. Andrew has spoken previously at RailsConf, Sin City Ruby, PGDay Chicago, PGConf NYC, and RubyConf Argentina.
Chapters:
00:00 - Intro
00:39 - Overview of the presentation
01:10 - Definition of terms
05:36 - Adding multi-tenancy to Rideshare application
12:55 - Scaling beyond a single PostgreSQL instance
14:27 - Multi-Tenancy and Sharding with Active Record
17:02 - Citus and Sharding
22:52 - Wrap Up and Advice
📕 Everything you need to know about POSETTE: An Event for Postgres 2024 can be found at: https://aka.ms/posette
✅ Learn more:
Watch more POSETTE talks: https://aka.ms/posette-playlist
📌 Let’s connect:
X – @PosetteConf https://x.com/PosetteConf
Mastodon - @posetteconf https://mastodon.social/@posetteconf
Threads – @posetteconf https://www.threads.net/@posetteconf
🔔 Subscribe to the POSETTE News: https://aka.ms/posette-subscribe
📣 Slides for this talk: https://speakerdeck.com/andyatkinson/saas-on-rails-on-postgresql
#PosetteConf #PostgreSQL #Ruby
Presenters:
Andrew Atkinson, Staff Software Engineer, Author
Connect:
Andrew Atkinson: https://mastodon.social/@andatki, https://twitter.com/andatki, https://www.linkedin.com/in/andyatkinson/
Cloud-hosted, fully-managed Postgres on AWS, GCP, Azure, or Heroku. Customize performance based on your needs. If you have questions, our support team are Postgres experts.
End-to-end documentation of a journey from no PCB experience to fabricating my own Linux-ready system that can boot the latest mainline kernel. This article is the recommended reading for someone building their first embedded Linux board. F1C100s SoC is used for this sample board.
MySQL's replication protocol has a lot of depth and complexity. In this blog post, we take a deep dive into how replication events are sent from a primary to a replica.
Mastering Go: Challenging Quiz on Advanced Concepts for Go Programmers
Put your Go programming knowledge to the test with this challenging quiz covering advanced concepts in Go. See how many correct answers you can get out of the 12 questions!
NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024). From what I can gather, many people seem to dislike the design. I wanted to give my thoughts on it as a language designer. The merged PR for the proposal can be found here: https://github.
Execute commands by sending JSON? Learn how unsafe deserialization vulnerabilities work in Ruby projects
Can an attacker execute arbitrary commands on a remote server just by sending JSON? Yes, if the running code contains unsafe deserialization vulnerabilities. But how is that possible? In this blog post, we’ll describe how unsafe deserialization vulnerabilities work and how you can detect them in Ruby projects.
Introducing recovery codes: Never lose access to 1Password | 1Password Blog
Start using 1Password recovery codes today to make account recovery a breeze. Learn how recovery codes help ensure consistent access to 1Password for individuals and families.
The joy of learning Helix (and probably other modal, terminal-based editors) | pawelgrzybek.com
I decided to learn Helix - heavily inspired by Kakoune and Neovim editor written in Rust, which speaks to my linking by its number of built-in features and configuration ease.
Playwright surpasses Cypress for downloads, what happens now?
The industry continues to evolve. As test automation gets further out of the hands of traditional test departments in an organization and into the hands of developers and beyond, we will see an even higher adoption of Playwright over Cypress in the next few years.
Imagine the application under test is making web calls to the backend. Sometimes things go wrong, and you have set up server-side logging to debug the failures. It would be nice having the test run in
Drizzle is a new ORM tool that blends traditional ORM querying with a typed SQL API. Drizzle supports various databases (Postgres, MySQL, SQLite) and aims to simplify SQL crafting while avoiding common ORM pitfalls.