Mastering real-time Javascript and GraphQL & gRPC
Summary of my bookmarked links from Mar 29th, 2022
Links
- How to write low garbage real-time Javascript ★★★★★
This blog post discusses techniques for minimizing garbage collection (GC) pauses in HTML5 games written in JavaScript. Garbage collection can cause performance issues and interruptions in real-time code like game engines. The author emphasizes the importance of avoiding object creation during each frame and provides simple techniques such as reusing objects, clearing arrays efficiently, and optimizing function creation. The post also covers advanced techniques like rewriting library functions to reduce garbage creation and implementing object recycling for problematic libraries. Ultimately, the goal is to create highly responsive JavaScript applications with minimal GC overhead.
- When GraphQL meets gRPC… 😍
gRPC and GraphQL are powerful tools in microservice architectures, and Mali is a handy Node.js framework for working with gRPC. This article discusses using gRPC as a Backend for Frontend (BFF) architecture to address the limitations of GraphQL schema stitching. The project presented in the article demonstrates creating and listing blog posts using a GraphQL server as the BFF entry point and a gRPC server for functional operations. It also covers topics like SSL/TLS, token-based authentication, interceptors, error handling, and deployment on Kubernetes. Overall, gRPC and GraphQL complement each other effectively in a microservices environment.