February 2020 Summaries
5 posts from Couchbase
Filter
Month:
Year:
Post Summaries
Back to Blog
The article is the final part of a series on building a Fullstack React and GraphQL application using the Apollo Client. It focuses on setting up a React application with an Apollo GraphQL client, integrating it with an existing backend built with Express and Couchbase. The tutorial guides users through cloning a pre-built React app from GitHub, setting up the directory structure, and configuring the Apollo Client to connect with a GraphQL API. It explains how to build a master-detail page for displaying airline data, using React Router for navigation, and managing data queries with the useQuery hook from Apollo. The guide also discusses setting up CORS to allow API requests between different domains and provides instructions for running both the server and client concurrently using npm scripts. Furthermore, it emphasizes securing sensitive credentials by using a .env file and concludes by offering resources for further exploration of Apollo and React development. The final project code is available on GitHub, and the author invites readers to connect on Twitter for additional support.
Feb 28, 2020
2,626 words in the original blog post.
This introductory article in a three-part series guides readers through building a Fullstack React application using GraphQL, Express, and Couchbase Server, leveraging Docker for setup. It emphasizes the advantages of using GraphQL over REST, highlighting its efficiency in data fetching and ease of use with tools like GraphiQL. The article provides detailed instructions for setting up Couchbase Server, including using the NodeJS SDK to connect with Express and managing Couchbase buckets and indexes. It underscores the use of N1QL, a SQL-like query language, to interact with Couchbase's NoSQL document store, catering to developers familiar with SQL. The tutorial sets the stage for subsequent articles focusing on constructing an Express-GraphQL API and integrating an Apollo GraphQL client in React.
Feb 28, 2020
1,445 words in the original blog post.
The text outlines the process of building a full-stack application using React, GraphQL, Express, and Couchbase Server, specifically focusing on setting up a GraphQL server with Express in a Node.js environment. It begins with creating a project structure and initializing a Node.js project, including setting up a `.gitignore` file to exclude `node_modules`. The guide then details the steps to install necessary dependencies like Express, GraphQL, and Couchbase, and describes connecting to a Couchbase Server cluster to access a specific data bucket. The process includes defining a GraphQL schema with query and mutation endpoints for retrieving and updating airline data stored in Couchbase. The guide provides JavaScript implementations for these endpoints, including using N1QL queries and key-based retrieval methods. Finally, the setup involves configuring an Express server to handle GraphQL requests and running it on a specified port, enabling testing of queries through a GraphQL IDE.
Feb 28, 2020
1,972 words in the original blog post.
Couchbase Server 6.5 introduces significant enhancements to the handling of IN lists in N1QL queries, optimizing runtime performance by employing hash tables for large IN lists and dynamic index span generation for query parameters. When an IN list exceeds 16 elements, it is converted into a hash table, making evaluations more efficient compared to sequential element comparisons. The optimizations require the IN list to be static, or composed of constants and query parameters, while dynamic index span generation improves index scan efficiency by creating precise spans at runtime, provided the IN list size is known. Uncorrelated subqueries in IN clauses can be manually rewritten using common table expressions (CTEs) to leverage these optimizations, enhancing query performance by dynamically generating index spans during execution. These advancements collectively enhance the efficiency of IN list handling, making queries faster and more resource-effective.
Feb 17, 2020
2,215 words in the original blog post.
The Index Advisor service has released its February update, addressing several bugs to enhance its functionality. This service offers index recommendations to optimize query performance, making it useful for database administrators, developers, and architects. It is particularly beneficial for those who want to avoid manually understanding index creation rules, do not wish to upgrade to the latest Couchbase version, or are using older versions such as 5.5 or 6.0. Notable improvements include support for virtual keyspace operations, removal of identifiers in Meta() expressions, clearer error messages, and improved handling of queries with the USE index keyword. The update ensures that users receive monthly fixes and enhancements, aiming to improve query performance and productivity without requiring schema or data uploads. Feedback on the Index Advisor's recommended indexes can be provided through comments on the related blog.
Feb 12, 2020
1,068 words in the original blog post.