Loading…
Shopify Invests in Research for Ruby at Scale
2023-10-18
- Source
- Shopify
- Published
- Added to Yomu
Summary
Shopify says it has invested nearly half a million dollars over the past year in academic research directed toward Ruby and the needs of its community. The work is intended to make programming-language developments account for Ruby’s metaprogramming, loose C extension API, and large-scale workloads with frequent redeployments, rather than assuming long virtual-machine warmup periods. Collaborators include Laurence Tratt, who is investigating hardware meta-tracing and basic-block stitching to generate a just-in-time compiler from the Ruby interpreter; Steve Blackburn, whose group is putting the MMTk garbage-collection toolkit into Ruby; and Stefan Marr, who is studying interpreter speed and startup and warmup time. The program also connects these researchers with Shopify’s Ruby engineers and complements internal work on YJIT and TruffleRuby, with more research and academic papers planned.
Context
Shopify wants programming-language research and implementations to address Ruby’s distinctive properties and the workloads of companies using Ruby at scale. The post identifies metaprogramming, a loose C extension API, large code bases, and frequent redeployments as requirements that academic research may otherwise overlook.
Approach / What changed
Shopify is funding academic collaborators and pairing them with senior Ruby community engineers. Projects include automatically generating a just-in-time compiler from the Ruby interpreter, integrating the MMTk garbage-collection toolkit into Ruby, and studying interpreter performance, startup, and warmup time. The external work complements Shopify’s internal research on YJIT and TruffleRuby.
Takeaways
- Ruby’s metaprogramming led to a new inline-caching method, while its loose C extension API motivated a C interpreter that runs virtualized C.
- MMTk is being put into Ruby so current garbage collectors can be used and future collectors can be tested against Ruby’s requirements.
- Frequent redeployments make long virtual-machine optimization warmup periods unsuitable for Shopify’s workloads, increasing the importance of startup and warmup performance research.