Migrating Shopify’s Core Rails Monolith to Trilogy by Adrianna Chang
Trilogy is a client library for MySQL-compatible databases. It was open sourced along with an Active Record adapter by GitHub this past year. With promises of improved performance, better portability and compatibility, and fewer dependencies, Shopify’s Rails Infrastructure team decided to migrate our core Rails monolith from Mysql2 to Trilogy. In this talk, we’ll embark on a journey with database clients, Active Record adapters, and open source contributions. We’ll learn about MySQL protocols, dig into how the Active Record adapter manages the Trilogy client under the hood, and look at some of the missing features we implemented as we moved from Mysql2 to Trilogy. Finally, we’ll discuss the end result of migrating to Trilogy, and the impact it had on Shopify’s monolith in production.