Home / Companies / Couchbase / Blog / July 2017

July 2017 Summaries

12 posts from Couchbase

Filter
Month: Year:
Post Summaries Back to Blog
The text provides a comprehensive tutorial on creating a user profile store and session management system using Node.js and the NoSQL database Couchbase. It illustrates the flexibility and efficiency of NoSQL databases for handling user profiles, which often require adaptability and performance advantages over traditional relational databases. The guide, updated to work with Couchbase Node.js SDK 3, showcases the implementation of a backend API using Node and Express, detailing endpoints for user account creation, login, and blog posting, while emphasizing secure storage practices such as hashing passwords with bcrypt and managing sessions with expiry times. The tutorial includes code snippets for setting up the Node.js environment, creating document models for profiles and accounts, and implementing session management through middleware. It also discusses querying blog posts associated with specific user profiles using the N1QL query language and optimizing performance with specific indexing. Finally, it hints at further developments, such as using JSON Web Tokens for sessions and creating a client front-end, with resources available on GitHub for additional learning and exploration.
Jul 31, 2017 2,198 words in the original blog post.
Couchbase has unveiled a developer preview of its server cluster running on Red Hat OpenShift Enterprise, leveraging Kubernetes for stateful container orchestration. This initiative stems from a collaboration between Couchbase, Red Hat, Amadeus, and JetStack, and was presented at the Red Hat Summit in May 2017. The preview showcases Couchbase's adaptability to microservices architectures through its multidimensional scaling (MDS), which allows independent scaling of database services such as data, index, query, and search. Kubernetes' StatefulSets feature plays a crucial role by enabling the deployment of stateful applications like databases within containers, which were traditionally considered stateless. The preview includes a Couchbase sidecar container to manage lifecycle operations such as scaling and node failure responses. The release highlights the use of Docker for Couchbase Server on RHEL, dynamic volume provisioning, and integration with OpenShift's scheduling and resource allocation capabilities. Users are encouraged to provide feedback to influence future product development.
Jul 27, 2017 943 words in the original blog post.
When developing applications with Couchbase, a common challenge arises when newly created documents do not immediately appear in query results due to the time needed for indexers to process mutations. To address this, developers can define scan consistency within a Node.js application to ensure that queries yield the desired results. By default, N1QL queries are unbounded, prioritizing speed by returning only currently indexed data. However, developers can use REQUEST_PLUS consistency to delay query execution until all mutations are processed. Similarly, when using Ottoman.js, setting LOCAL consistency achieves the same effect. This flexibility allows developers to balance performance and accuracy based on their application's needs. For more detailed information, referring to Couchbase's documentation on scan consistency is recommended.
Jul 27, 2017 605 words in the original blog post.
The text provides guidance on integrating Couchbase with R for data analysis, highlighting the ease of importing data from Couchbase into R without needing additional components. By utilizing Couchbase's N1QL query engine to accept REST requests and return JSON documents, users can efficiently import data into R. The document illustrates this process through examples, such as loading airline data into an R Data Frame to create a bar graph and mapping pet-friendly hotels in London using the leaflet library. It also mentions the need to manage server addresses when using R, as it lacks the cluster management capabilities found in other Couchbase SDKs. The text serves as a practical introduction for those interested in combining Couchbase and R for data analysis tasks.
Jul 24, 2017 751 words in the original blog post.
A tutorial was presented on building a web application using the OCEAN stack (Ottoman.js, Couchbase Server, Express Framework, Angular, and Node.js) and the CEAN stack (Couchbase, Express Framework, Angular, and Node.js). The tutorial covered creating an API with Ottoman.js, then using N1QL for the second example. Both examples included a client frontend built in Angular, which interacted with the backend APIs to create, read, update and delete data stored in Couchbase Server. The OCEAN stack was used as the first example, while the CEAN stack was used as the second example.
Jul 20, 2017 3,485 words in the original blog post.
Querying and indexing document arrays in Couchbase, particularly for array entries within specific date ranges, is an advanced feature that enhances data retrieval efficiency. The process involves creating a secondary index on the date field of an embedded account history array, allowing for precise range queries. By using the DISTINCT function within the index creation, the index only includes entries that have a date field, thereby excluding irrelevant data. This functionality is demonstrated using N1QL's UNNEST feature, which integrates account history data with root document fields like email, without requiring additional JSON parsing. The document illustrates a query example that retrieves email and account information for entries dated between '2016-02-01' and '2017-06-01', showcasing the ease of extracting structured data from complex JSON documents. The text also encourages trying out the setup using Docker, with a GitHub repository providing resources to create a development environment featuring a single-node Couchbase cluster and a Node.js service for provisioning.
Jul 18, 2017 532 words in the original blog post.
A video compares SQL Server with Couchbase Server, providing insights into their differences and similarities. For those who prefer reading, a blog post series covers the same material, with the source code available on GitHub. The video can be accessed via a YouTube link, and viewers are encouraged to reach out with questions or feedback through email, Twitter, or by leaving a comment.
Jul 17, 2017 79 words in the original blog post.
The article explains how to convert XML data to JSON using C# and Json.NET, specifically for loading into Couchbase Server, though the method is applicable to other scenarios as well. It begins by outlining how to handle a simple XML example and convert it into a JSON representation using Json.NET, highlighting the conversion rules and options like omitting root objects or formatting choices. The JSON can then be stored in Couchbase by deserializing it into a C# object and using Couchbase's `bucket.Insert` method. The article emphasizes the benefits of a JSON-centric database system such as Couchbase, which includes features like indexing and querying, and provides insight into managing data types and field naming conventions during conversion. The author also encourages readers to explore additional resources on Couchbase and offers to share more insights or tips based on user inquiries.
Jul 06, 2017 795 words in the original blog post.
Sync Gateway 1.5 and Couchbase Server 5.0 enable seamless access to documents across mobile and web clients through a unified bucket, allowing for automatic replication of documents between the two types of clients. A travel sample application demonstrates this capability, showcasing converged access and advanced query features in Couchbase 2.0, while also providing insights into its architecture, data model, UI workflows, and Couchbase Lite queries. The source code for the sample mobile app and web app with backend is available on GitHub, along with a tutorial that guides users through installing and running the application, as well as provides additional resources and support channels.
Jul 06, 2017 256 words in the original blog post.
Couchbase Server is a document-oriented NoSQL database that addresses the common trade-off between NoSQL systems and SQL's rich querying capabilities by using its own N1QL query language, which is a superset of SQL. This language is currently supported by Couchbase Server and is expected to be included in Couchbase Lite with the upcoming version 2.0 release. In a presentation at the Silicon Valley Couchbase Meetup, Keshav Murthy, Senior Director of Couchbase R&D, explains the advantages of using NoSQL, how to model NoSQL data, and how to query NoSQL with N1QL. Couchbase is an open-source platform, available for free trial, with resources accessible through their developer portal and an active presence on platforms like Twitter and Stack Overflow for community engagement and support.
Jul 05, 2017 164 words in the original blog post.
Couchbase has introduced Plasma, a new high-performance key-value storage engine, as a successor to ForestDB, promising significant advancements in scalability and performance for Couchbase Server 6.0. Unlike its predecessor Memory Optimized Indexes, Plasma is designed to be cost-effective by minimizing reliance on memory, using lock-free data structures to leverage multi-core CPUs, and supporting persistent snapshots for efficient data recovery. Plasma demonstrates superior performance in latency, throughput, and disk efficiency compared to ForestDB, with markedly faster initial and incremental load times. Available exclusively with Couchbase Enterprise Edition (EE), Plasma aims to provide a seamless upgrade for existing users and encourages feedback and engagement through its community forum.
Jul 04, 2017 399 words in the original blog post.
A recent Couchbase Meetup in Mountain View, California, focused on integrating NativeScript, Angular, and NoSQL development, particularly highlighting how Couchbase can be used for NoSQL storage and data synchronization in mobile applications. The event, featuring TJ VanToll from Progress, demonstrated creating a mobile app using NativeScript CLI with Angular support, which involves building a database service to manage a Couchbase Lite database for storing and displaying movie data. A key feature of the project is its ability to synchronize data with the Couchbase Sync Gateway, allowing continuous replication. The application consists of components for listing and adding movies, with UI elements bound via Angular's ngModel and navigated through a routing module. Additionally, a basic sync-gateway-config.json file is used to configure data synchronization, showcasing the potential for more advanced setups. Attendees were encouraged to explore further resources and join the Couchbase Silicon Valley group for continued learning and engagement.
Jul 04, 2017 2,271 words in the original blog post.