React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

Rejoiner creates a GraphQL schema from microservices

Microservices have been a recent megatrend. Everyone from start-ups to enterprises and internet giants are talking about them. The manageability of microservices is not trivial. Google is well aware of this, and is workin on a project that uses GraphQL to merge microservices behind a single API.

The Rejoiner project is an open source tool that creates a uniform GraphQL schema from gRPC microservices. The project comes from Google, which adds credibility for the future of the project as microservices are now a critical service for many. Adopting an open source without a corporate steward like Microsoft, Google or Facebook can be a risky business.

gRPC is a a high performance, open source universal RPC framework. The framework allows rapid development of Remote Procedure Calls, but also scales to millions of calls per second in production. The framework is designed to work across platforms, allowing generating client and server stubs in a number of languages. Packing commonly needed features like authentication as well as HTTP/2 communications gRPC is an industry standard.

Rejoiner is used to create GraphQL facade interfaces for gRPC components effortlessly. Developers can define GraphQL schemas flexibility, and the library promotes reuse through shared components. It uses Proto definitions as the source of the automatically generated schema definitions. To manually edit the automatically generated schema there is a DSL (Domain Specific Language) for post-generation modifications and customisations.

Joins in Rejoiner are performed by annotating class methods that have data fetching responsibilties. This in turn allows Proto FieldMasks generation based on standard complient GraphQL selectors. The software component is still heavily in development, and some interesting experimental features are full Relay support and Streaming GraphQL - built on the gRPC streaming definition.

Rejoiner is written in Java, a technology widely in use at Google and elsewhere in the industry. By merging Java, gRPC and the GraphQL standard (including queries, mutations and return types) the technology provides a reliable platform for organising microservices behind a developer friendly HTTP API.

Written by Jorgé on Saturday January 20, 2018

Permalink -

« Drupal CMS to include React.js - Conditional Types arriving in TypeScript 2.8 »