Company
Date Published
Author
David Yahalomi
Word count
1497
Language
English
Hacker News points
None

Summary

The author of the text is David Yahalomi and he implemented Redis Pub/Sub system for GraphQL subscriptions as part of the Apollo project. The implementation allows for easy integration of external Pub/Sub systems like Redis, enabling consistent propagation of published events to their subscribers. The package `graphql-redis-subscriptions` makes it easy to connect Redis with GraphQL subscriptions by providing a `RedisPubSub` class that can be used in place of the default pub/sub system. The author tested the performance of the system and found that it scales well, but noted that running a GraphQL query for each subscriber and each event could become a bottleneck if not optimized. To improve scalability, the author suggests implementing shared execution for subscribers with the same query. The package has been updated to include options for passing configuration to each call of subscribe, allowing pub/sub engines to reduce their subscription set using the best method of that engine.