Home / Companies / GitHub / Blog / Post Details
Content Deep Dive

Introducing Trilogy: a new database adapter for Ruby on Rails

Blog post from GitHub

Post Details
Company
Date Published
Author
Matthew Draper
Word Count
483
Language
English
Hacker News Points
-
Summary

GitHub has open-sourced Trilogy, a database adapter designed to connect Ruby on Rails and Active Record clients to MySQL-compatible database servers, aiming to enhance performance, flexibility, and ease of embedding in environments like the Ruby VM. Originally developed by Hailey Somerville and Brian Lopez to address GitHub's performance and reliability needs, Trilogy has been in use since 2015 and avoids dependencies on libraries like libmariadb or libmysqlclient, simplifying installation and reducing memory copying during network packet processing. Open sourcing Trilogy, along with its Ruby-native wrapper and activerecord-trilogy-adapter, is the result of efforts by Aaron Patterson and Eileen M. Uchitelle to improve database communication behavior in Active Record. While it supports the version of Rails used by GitHub and offers promising performance benefits, potential users are advised to test it in a staging environment due to possible unsupported protocol features. The adapter will become compatible with future Active Record releases post version 7.1.0, and GitHub encourages experimentation and feedback from the Rails community.