A Ruby on Rails gem for efficiently rolling up and querying time-series data from ActiveRecord models.
Rollup is a Ruby on Rails gem that provides a simple and efficient way to aggregate time-series data from ActiveRecord models. It solves the problem of slow and complex queries on large datasets by pre-calculating and storing summarized metrics (like daily user counts or weekly revenue) for fast retrieval. Developers can define rollups with flexible intervals, dimensions, and calculations, making it easier to build analytics dashboards and reports.
Rails developers building applications with time-series data, such as analytics dashboards, admin panels, or internal reporting tools. It's particularly useful for teams using PostgreSQL and needing performant aggregated queries.
Rollup stands out by offering a Rails-native, ActiveRecord-friendly API that abstracts away the complexity of time-series aggregation. Unlike raw SQL or external analytics services, it integrates seamlessly into existing Rails workflows, supports incremental updates, and works with popular gems like Ahoy and Searchjoy out of the box.
Rollup time-series data in Rails
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports intervals from seconds to years, including custom minute/second options like 5m or 30s, enabling precise time-series analysis for various use cases.
Automatically adds newer data without recalculating entire series, and offers options like 'last' or 'range' for targeted updates, reducing performance overhead.
Works out-of-the-box with Rails models and popular gems like Ahoy and Searchjoy, requiring minimal configuration for quick setup.
Handles time zones natively via settings like Rollup.time_zone, aligning data with business hours or geographic regions without manual conversion.
Advanced features like multi-dimensional grouping only work with PostgreSQL, limiting flexibility for teams using MySQL or SQLite.
Requires setting up rake tasks or background jobs for regular rollup creation, adding operational complexity compared to automated systems.
Stores dates and times in a single column, necessitating SQL casts (e.g., time::date in PostgreSQL) for accurate querying, which can be error-prone.