Summaries > Technology > Rails Conf > RailsConf 2023 - Using Rails Engines...
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.