Home / Companies / Hasura / Blog / April 2018

April 2018 Summaries

4 posts from Hasura

Filter
Month: Year:
Post Summaries Back to Blog
The text discusses the benefits and drawbacks of using a JSON-based query language (DSL) versus GraphQL for API development. While a JSON DSL can be flexible and doesn't require changes in client or server-side tooling, it lacks a standardized grammar and schema, making it difficult to maintain over time. In contrast, GraphQL enforces a standard query language and requires the server to publish a schema, enabling community tooling and type safety. Despite some challenges with writing GraphQL servers, the author argues that GraphQL is an improvement over JSON DSLs for API development due to its emphasis on type safety and community support.
Apr 24, 2018 1,436 words in the original blog post.
The Hasura platform's data microservice provides a HTTP API to query Postgres using GraphQL or JSON in a permission safe way. It is designed for high performance with fast response times, large throughput, and low CPU and memory usage. A GraphQL query goes through stages of session resolution, query parsing, validation, execution, and response generation. The architecture aims to minimize HTTP stack overhead, enable efficient query translation from GraphQL to SQL, generate efficient Postgres compiled SQL queries, and efficiently send back results. Optimizations include batching queries, using joins for data collection, optimizing response generation by pushing transformations into Postgres, and utilizing prepared statements. These enhancements result in significant performance benefits compared to other architectures.
Apr 19, 2018 1,449 words in the original blog post.
The author experienced network connectivity issues in their Kubernetes cluster running on Google Kubernetes Engine (GKE). They noticed delayed API responses and connection refused errors, particularly when the response body size was larger. After investigating, they found that one particular node was running out of TCP stack memory. This issue led to a discussion about kubelet's responsibility for monitoring health of a node, including CPU/RAM/disk usage but not network health. The author filed an issue with Kubernetes to consider monitoring tcp_mem statistics as well.
Apr 17, 2018 996 words in the original blog post.
This case study explores the use of Gatsby, a static site generator for React, to build out a web app with dynamic content. The author provides an overview of what a static site is and how it differs from a dynamic one, as well as explaining what Gatsby is and its various features. They then outline an action plan on how to build a website with dynamic content using Gatsby, including adding external data into Gatsby's internal data store, generating a static listing page with the external data, dynamically creating static pages based on data, and making sure that the listing page is paginated. The author also discusses caveats and current solutions for building such an app, as well as providing a step-by-step tutorial where they build out a product listing app with pagination and programmatic page creation from an external data source. Finally, the author shares their final thoughts on using Gatsby for this type of app.
Apr 04, 2018 3,234 words in the original blog post.