Summaries > Technology > Rails Conf > RailsConf 2023 - Using Rails Engines...

Rails Conf 2023 Using Rails Engines To Supercharge Your Team By Austin Story

TLDR Austin Story discussed the project involving GraphQL Federation at Doximity, focusing on integrating systems using Rails features and an engine to address scalability challenges. The company's shift to microservices and the adoption of GraphQL Federation helped unify services, set internal standards, and improve developer experience. The conversation emphasized setting up the engine, implementing GraphQL playground, integrating it with Federation, and creating a test harness while highlighting the security concerns in exposing sensitive information under HIPAA regulations.

Key Insights

Prioritizing Physician Needs with Microservices

Doximity prioritizes the needs of physicians, recognizing their busy schedules and preference for mobile access. The expansion into different domains revealed resiliency issues with a monolithic architecture, leading to the adoption of microservices. The introduction of GraphQL in 2017 improved the mobile developer experience, streamlined documentation, and made changes safer. However, challenges arose with lack of internal standards and isolated services, prompting the adoption of GraphQL Federation to unify services, set internal standards, and improve developer experience.

Setting Up and Integrating GraphQL Playground

The strategy at Doximity revolves around encapsulating complexity within an internal engine while enabling product teams to focus on delivering for physicians. Key steps involve setting up the engine, implementing GraphQL playground, integrating it with Federation, and creating a test harness. The emphasis is on reading Rails guides, creating a smart dummy application, and deploying with intentional configuration to avoid production errors. GraphQL playground provides a full-featured interface for developers, reducing dependency on backend developers. The process of creating a Rails application, exposing logic, and configuring the engine is discussed, with a decision to keep the application and engine independent.

Easy Integration and Secure Configuration

The conversation covers the development and configuration of a GraphQL playground, emphasizing the need for easy integration without high barriers. Usage of generators for a smoother integration process is suggested, and the discussion shifts to the extraction of GraphQL classes into a gem. Security concerns regarding sensitive information are addressed with a secure-by-default approach for securing GraphQL Federation and object integrations.

Addressing Security Concerns and Integration with Apollo

Security concerns around exposing sensitive information under HIPAA regulations are emphasized, leading to the adoption of default security at the type level and Doximity's use of their spec for direct integration. Efforts were made to simplify the generation process for GraphQL types and avoid unnecessary complexity for developers. The conversation then shifted to the work on extracting and installing the GraphQL playground engine in their core monolith, preparing for integration with Federation, and addressing concerns related to requests, changes, and deployments. Detailed steps were provided for handling requests, changes, and deployments, along with the integration with external vendor Apollo for hosting Federation and managing GraphQL schema changes through a standardized printer integrated with continuous integration.

Automating Deployment and Integrated System

The speaker discussed the development of a tight API for integrating GraphQL changes with minimal developer involvement. Integration of error notifications into pull requests created a self-serving system for developers, and deployment validation involved a series of rake tasks with changes immediately visible. Slack integration and chat ops were utilized to alert developers about GraphQL changes and potential delays in production. The overall impact involved faster deployments and a fully integrated system for Rails developers.

Questions & Answers

What were the challenges faced by Doximity with their monolithic architecture and how did they address them?

The challenges faced by Doximity with their monolithic architecture included resiliency issues and lack of internal standards and isolated services. They addressed these challenges by turning to microservices, adopting GraphQL Federation to unify the services, setting internal standards, and improving developer experience.

What was the goal of integrating GraphQL Federation with Rails at Doximity?

The goal of integrating GraphQL Federation with Rails at Doximity was to ensure a cohesive system and enable product teams to focus on delivering for physicians by encapsulating complexity within an internal engine.

How did Doximity emphasize security concerns related to GraphQL Federation, especially under HIPAA regulations?

Doximity emphasized security concerns by incorporating default security at the type level, using their spec for direct integration, and simplifying the generation process for GraphQL types to avoid unnecessary complexity for developers.

What approach did Doximity take for handling GraphQL schema changes and deployments, and how did they ensure visibility and immediate validation for developers?

Doximity adopted a standardized printer integrated with continuous integration for managing GraphQL schema changes, integrated error notifications into pull requests, created a self-serving system for developers, and used Slack integration and chat ops to alert developers about GraphQL changes and potential delays in production, ensuring visibility and immediate validation for developers.

Summary of Timestamps

Austin Story, an engineering director at Doximity, shared a project involving GraphQL Federation at a conference. He expressed his love for Rails and discussed integrating systems intentionally.
Austin defined Ruby gems and engines, explaining their significance in a Rails-based web application.
The team at Doximity is focused on prioritizing the needs of physicians, recognizing that they are often busy and prefer mobile access.
The conversation revolves around the strategy of enabling product teams to focus on delivering for physicians by encapsulating complexity within an internal engine.
The discussion primarily revolved around the security concerns of exposing sensitive information like faxes and boxes under HIPAA regulations.
The speaker discussed a new tight API for integrating GraphQL changes, emphasizing minimal developer involvement.

Related Summaries