For modern classrooms: HMH's journey to faster applications with Hasura
We would like to thank HMH for their contribution to improving Hasura in collaboration with our support team. We would not have the product we have today without the changes they suggested to our OpenTelemetry and Snowflake connector functionalities.
Over 3x improvement in time-to-market for new educational applications
5x faster API development and testing for engineers
500k+ active connections across a new product expected by EOY 2024
Introduction: Preserving the HMH legacy in a digital era
Founded in 1880, HMH has been a classroom staple in textbook publishing for over 100 years and is now a key player in education technology. In recent decades, HMH has been focussed on a digital-first experience to serve students and teachers with interactive, feature-rich virtual lessons and classroom experiences with its rich programs and content offerings.
HMH is an adaptive learning company that helps educators create growth for every student. The integrated curriculum, assessment, and professional learning solutions use data to paint a full picture of every learner and recommend how to best support their needs. By partnering with educators, they create lasting momentum so that all students can reach their full potential. HMH serves more than 50 million students and 4 million educators in 150 countries.
With ed-tech solutions for the classroom being rich in experience and interactive, HMH faced the specific challenge of managing limited classroom bandwidth for 30+ students and teachers who’d be using their application at once. This real need for low-latency, high-availability solutions pushed them to look for innovative ways to structure their tech stack and APIs.
A company that keeps up with the times, HMH's platform now comprises critical services built with Hasura as the engine that powers its API development lifecycle. The result? Reduced time to market and enhanced performance for their interactive educational applications.
The search for speed: Re-platforming with Hasura
Originally, HMH's architecture was heavily REST-based. This led to a proliferation of APIs and, as their applications evolved, increasingly complex micro-frontend UIs. It became a challenge to optimize and reduce latency on multiple micro-frontends operating on the same domain. This resulted in noisy end-user experiences and bloated bandwidth requirements, pushing the limits of any classroom Wi-Fi setup.
Kris Iyer, Principal Architect at HMH, started a re-platforming initiative to improve application performance and boost development velocity. They evaluated several approaches, including managed services like AWS AppSync, building their own GraphQL services on Java, code-first and schema-first strategies, and more.
However, after iterating on many aspects of the solution they found that developing GraphQL APIs on popular Java frameworks required a deep understanding of the framework, and was sometimes limited by the pre-existing developer skill set.
Managed cloud solutions were better in areas like scaling and performance, but remained complex to build and maintain, and did not enhance advanced GraphQL capabilities. Building additional functionality like complex grouping, filtering, sorting, pagination, aggregation, etc. also required a significant amount of additional code at the resolver level, which was labor-intensive and time-prohibitive.
Dissatisfied and still looking for a better solution, the team discovered Hasura.
"We looked at building APIs with low code, not just for the sake of low code, but for speeding time to market – building and shipping with a faster cadence," said Iyer.Before Hasura, HMH's feature development cycles were long, and creating new APIs could take hours or even days. The adoption of Hasura brought about a significant speedup.
“With Hasura, you get these great features out of the box with only a few lines of configuration. On top of that, Hasura does a great job of eliminating the N+1 problem, which requires significant effort to get it right with other traditional frameworks. With patterns like CQRS supported with Hasura, and combining these with Amazon Aurora, we are well-positioned to hit new milestones for resilience and scalability!” – Kris Iyer, Principal Architect
Hasura allowed the HMH team to compress development and feedback cycles immensely. The low-code, YAML metadata-based configuration of Hasura meant that even teams primarily composed of React engineers could now be self-sufficient in API development, without compromising on quality.
First use case: Streamlining internal APIs with Snowflake
HMH successfully integrated Hasura with two primary data domains.
In the first implementation, HMH leveraged Hasura's Snowflake connector with Snowflake data warehouse to provide a lightweight API for service-to-service use cases within the organization.
HMH's data architecture includes Snowflake-based pipelines, powered by DBT, commonly used for business-centric aggregations and roll-ups across Snowflake's flat, wide tables. Given this scenario, HMH identified a need to build APIs on top of this data layer to serve a variety of use cases such as reporting and analytics.
To meet this requirement, they used Hasura’s Snowflake connector to construct a robust data warehouse API. HMH leveraged Hasura's logical model feature to effectively decouple their API implementation from the underlying Snowflake data model. This approach gave them the desired level of flexibility to extend their implementations as needed.
“Hasura’s decoupled data connector architecture also brings in some great advantages where you could independently scale your GraphQL engine and connectors, and right-size your deployments for your use cases.” –Kris Iyer, Principal Architect
ClassCraft success story: 3x faster time to market
The second implementation, built on Hasura’s PostgreSQL connector, powers HMH’s rich interactive classroom application, ClassCraft. With ClassCraft, HMH built an engaging program that connected teachers and students in the classroom and allowed them to interact with content bi-directionally during lessons, thus increasing student participation in class.
In building ClassCraft, Iyer reiterates Hasura’s substantial impact on HMH’s core development metrics:
"For time to market, this is at least a 3x improvement over a traditional development effort. Adding new APIs also saw a 5x improvement in time to develop and test, as it only takes a few minutes with Hasura to configure and stand up a new capability or endpoint." – Kris Iyer, Principal Architect
This efficiency translates to significant cost savings in development efforts. The ClassCraft project progressed from concept to implementation in only a few weeks with a small team, demonstrating remarkable speed and efficiency.
Besides accelerating product velocity, out-of-the-box API standardization and composability with Hasura have been another huge win for the HMH team. Iyer praised the benefits of Hasura's features, saying that "the out-of-the-box features – Hasura’s aggregations, filtering, sorting, nested queries, live queries, streaming subscriptions, and mutations – would all take significant effort and money to build ourselves and maintain in-house, even with the best of the technologies available.”
Hasura subscriptions are also a key functionality of ClassCraft. Iyer added: “With this feature completely powered by Hasura GraphQL subscriptions comes various challenges, mostly scaling websockets on your infrastructure. With Hasura’s OpenTelemetry metrics and observability features, you have the right set of tools to support the scale of operations. Our goals at HMH are to support upwards of 500K active connections across the product by EOY 2024 and we are up to the challenge!”
Scalability and future plans: Expanding Hasura’s role at HMH
Combined with the comprehensive out-of-the-box feature set, Hasura’s ability to scale to meet HMH's future needs has been a key driver of Hasura’s success in their environment. HMH’s plans to scale over 500,000 subscriptions on ClassCraft in the first year of rollout could only be made possible due to the robust scalability of the Hasura platform.
“We have many real positives this year, and I would definitely count our success with Hasura among the top ones. It's a big win! It's very expensive to build paging and custom filters, which are entirely query related, not mutation related, and Hasura shines in that space.” – Paul Bernard, SVP Chief Architect
“Hasura is a game changer for our teams and puts us in a position to move quickly while improving quality. In fact, Hasura-powered services even helped us identify weaknesses in our infrastructure, or at least areas we hadn't had the chance to explore yet and harden!” – Stephane Guillemette, VP of Software Development
Looking ahead, HMH plans to continue expanding its use of Hasura across more data domains and products. They're also exploring how to further optimize their architecture for domain-driven design in their Hasura supergraph.
By adopting Hasura, HMH has accelerated their development cycles and enhanced the overall quality and performance of their digital offerings. This positions HMH for continued innovation in the competitive ed-tech space, enabling them to deliver better, more responsive educational experiences to students and teachers alike.
Have a similar use case? Talk to us about how Hasura can help.