April 2016 Summaries
20 posts from Couchbase
Filter
Month:
Year:
Post Summaries
Back to Blog
The author of this text has created a REST API using Ratpack, a Java framework, to manage users through the Couchbase repository. The API supports HTTP verbs GET, PUT, and DELETE, as well as content-type headers. The author uses Ratpack's Chain object to compose handlers that are executed in order, and Guice for dependency injection. A custom RendererSupport class is used to render User objects based on the content-type of the request. The API is built using RxJava and Couchbase's AsyncRepository to interact with the database. The text provides a detailed explanation of how to create such an API with Ratpack, Couchbase, and RxJava, including examples of how to handle different HTTP verbs and render User objects based on the content-type of the request.
Apr 30, 2016
1,056 words in the original blog post.
Ratpack, a comprehensive sets of modules allowing you to elegantly add new features, has a registry that can be easily extended using a DI framework like Guice or Spring. The Ratpack Registry is a store of objects available from the context of a handler, and it can be used to avoid opening multiple Cluster connections. By default, the registry is empty, but it can be populated with object instances, which are retrieved by type. In this example, a CouchbaseCluster instance is added to the registry for use in asynchronous operations. The Guice module allows for more complex DI configurations and can be activated by adding the appropriate dependency to the build.gradle file. The RxJava module creates a bridge between Rx Observables and Ratpack Promises, allowing users to easily convert between the two. With these features, developers can create cleaner and more efficient code, making it easier to build lightweight applications or more complex REST APIs.
Apr 29, 2016
897 words in the original blog post.
Ratpack, a set of Java libraries for building modern HTTP applications, is highlighted in this text as a non-blocking, asynchronous framework that integrates well with Couchbase's Java SDK for document databases. The author explains how to set up a basic Ratpack application using Java, outlining the process of creating a simple CRUD API, starting with a "Hello World" example. Ratpack's core concept of handlers, which are functions associated with paths, is discussed, alongside the entry point for applications, the RatpackServer class. The text further delves into the implementation of Couchbase's entity model, demonstrating how to define and manipulate entities using annotations like @Id and @Field, and how to handle blocking code using Ratpack's asynchronous tools like Promise and Blocking. The author provides examples of creating and retrieving user data through HTTP paths, emphasizing the potential for Ratpack to facilitate the migration of existing applications to a more asynchronous model. Future posts are promised to explore the integration of RxJava with Ratpack for enhanced asynchronous capabilities.
Apr 29, 2016
1,292 words in the original blog post.
A new Developer Advocate at Couchbase shares his background and journey, highlighting his extensive experience in web development since the early 2000s, primarily with Microsoft technologies such as .NET and C#. Residing in Grove City, Ohio, he balances his professional life with personal interests like family time, video games, and TV. Previously engaged with the developer community through blogging, screencasts, and conferences, he now focuses on connecting with Microsoft developers in his full-time role at Couchbase. Despite his familiarity with relational databases like SQL Server, Oracle, MySQL, and SQLite, he is eager to delve into non-relational databases. He encourages interaction from fellow developers, especially those who have insights or success stories with Couchbase or NoSQL technologies, while acknowledging his ongoing learning curve with Couchbase. He invites connections through various online platforms and offers to meet in person with those in Central Ohio.
Apr 26, 2016
347 words in the original blog post.
Mobile + Web DevCon is a comprehensive conference focusing on mobile application development, taking place in San Francisco, California. It covers a range of topics from native iOS and Android apps to cross-platform applications like Apache Cordova and Ionic Framework. An attendee from Couchbase will be speaking about developing offline-first applications using NoSQL database technologies, specifically Couchbase Mobile, to ensure apps function without a network connection by syncing data between local devices and the cloud. The session aims to provide insights into creating resilient mobile applications, and it promises to be an engaging experience for participants.
Apr 26, 2016
207 words in the original blog post.
The text provides an overview of using Azure to create and manage Couchbase Server clusters through a set of scripts available on GitHub, designed for experimentation and testing purposes. It details the prerequisites for setting up the environment, such as installing necessary tools and generating certificates for passwordless connectivity, and explains the process of configuring Azure account details and Couchbase Server settings. The primary scripts discussed include one for setting up a virtual network (vnet), jumpbox, and Couchbase Server cluster, which automates the provisioning of virtual machines, installation of Couchbase Server, and formation of a cluster. Another script focuses on cleaning up by deleting the cluster, jumpbox, and vnet, emphasizing the importance of a unique VM name prefix for efficient cleanup. The text encourages users to explore the scripts for efficient cluster management and experimentation on Azure.
Apr 25, 2016
767 words in the original blog post.
Batch data manipulation in N1QL, a query language for Couchbase, offers robust support for both singleton and batch data transformations through Data Manipulation Language (DML) operations. This includes using the UPDATE statement to add and initialize new attributes in documents or to split an existing attribute into multiple attributes, as well as utilizing the INSERT statement to handle batch data insertion and to copy data between buckets for experimentation. Additionally, the UPSERT operation allows for merging changes from one data bucket to another, ensuring that updates are efficiently managed. These batch operations, which can be challenging to implement without the flexibility of SQL, are facilitated by N1QL's support for JSON, making it easier for users to conduct large-scale data manipulations. Cihan Biyikoglu, Director of Product Management at Couchbase, highlights these capabilities, providing references for further exploration of DML statements like INSERT, UPDATE, UPSERT, MERGE, and DELETE.
Apr 22, 2016
372 words in the original blog post.
Linq2Couchbase v1.1.0, the official Linq provider for Couchbase Server and N1QL, introduces several new features, improvements, and bug fixes over its previous version. Key updates include compatibility with custom serializers through the new IExtendedTypeSerializer interface, support for various date functions and operations on arrays, as well as enumeration and GUID constants in queries. The release also enhances the handling of UNION and UNION ALL statements, supports asynchronous LINQ queries, and implements experimental change tracking via proxy objects for batch document mutations. Additionally, it improves error handling and inline XML documentation, and updates dependencies like Relinq to version 2.0 using ILRepack for easier integration with projects like Entity Framework 7. This community-driven project encourages contributions and feedback through its GitHub and Jira platforms.
Apr 21, 2016
1,209 words in the original blog post.
Alex Dorandish is a Canadian developer with a passion for performance optimization and creating libraries of proof-of-concept (PoC) projects. He works at a company that designs high-performing applications, leveraging his PoCs to ensure optimal performance. Based in Vancouver, BC, Canada, Alex enjoys learning about new concepts and has never heard of the concept of "spare time." He was drawn to Couchbase due to its exceptional performance and people, and has successfully converted multiple projects from relational databases to NoSQL. In his role as a Couchbase Champion, Alex aims to increase market share, provide enterprise-level installation and tuning guidelines, and host events in Vancouver or Seattle.
Apr 20, 2016
486 words in the original blog post.
Couchbase is an in-memory, distributed document database that offers features such as SQL queries with N1QL, full-text queries through Bleve integration, GeoSpatial queries, and Map/Reduce queries. It supports mobile and embedded devices with automatic synchronization and integrates well into the Big Data ecosystem with connectors for Hadoop, Spark, Kafka, Talend, as well as JDBC and ODBC drivers. Couchbase is suitable for various applications, including real-time big data, mobile applications, profile and content management, customer 360° views, the Internet of Things, fraud detection, and more. At DevoxxFR 2016, Couchbase is sponsoring the event and inviting attendees to visit their booth to discuss the latest features in Couchbase 4.5, collect swag, and explore how Couchbase can address various data management needs.
Apr 19, 2016
336 words in the original blog post.
RxJava is an asynchronous data stream programming tool that can also be used as a Java CSV reader. It's useful for event-based programming where you can observe and react to changes in the stream of data. In this example, RxJava is used to load CSV data into Couchbase by transforming it into JSON documents that can be stored in the NoSQL database. The process involves creating a CSVReader object, connecting to the Couchbase server, mapping the CSV data into JSON documents, and upserting them into the database using an Observable. This approach allows for reactive programming and efficient processing of large datasets.
Apr 19, 2016
1,012 words in the original blog post.
The text discusses the use of Telerik NativeScript, a cross-platform development framework that enables building native Android and iOS applications using JavaScript without relying on web views, thus ensuring excellent performance. The text highlights the lack of a good data storage solution in NativeScript apps until the introduction of a Couchbase Lite plugin, which allows the use of NoSQL databases and synchronization of data across devices through the Couchbase Sync Gateway. The guide provides step-by-step instructions on creating a simple name list application with features like data synchronization, application logic, and UI design, emphasizing the integration of Couchbase for data management. The text also addresses the storage of databases on mobile devices, noting that databases are kept in a protected area, accessible only through rooting or jailbreaking.
Apr 18, 2016
1,995 words in the original blog post.
The text provides a detailed exploration of implementing an Internet of Things (IoT) project using Couchbase Lite for data storage and synchronization, particularly focusing on tracking iBeacons to monitor the movement of pets within a home. It explains the potential of IoT devices running Java applications and outlines a project where iBeacons are attached to a pet's collar, allowing IoT gateways to scan and record their location and timestamp, which are then uploaded to a server for analysis. The project requires specific hardware and software, including Intel IoT Gateways, Gimbal proximity beacons, Java 1.7+, Maven, and Couchbase Sync Gateway, to function. The narrative also delves into the technical aspects of data management using Java, emphasizing the creation of a Java Beacon class for data handling and synchronization with Couchbase Sync Gateway. Additionally, the text discusses challenges such as SQLite dependency errors and offers solutions to overcome them, while highlighting useful tools like the hcitool and hcidump for scanning iBeacons on Linux systems. The narrative concludes by illustrating how this project demonstrates the capability of Java-based applications in the IoT realm and provides links to full source code on GitHub for further exploration.
Apr 14, 2016
2,204 words in the original blog post.
Spring Boot 1.4.0 MILESTONE 2 has been released, offering a first-class integration of Couchbase into the Spring Boot ecosystem. The integration allows direct recognition of the Couchbase SDK in the classpath, instantiating a Cluster and Bucket bean with autoconfiguration properties such as spring.couchbase.bootstrap-hosts, spring.couchbase.bucket.name, and spring.couchbase.bucket.password. Environment tuning options like IO endpoints, SSL support, and default sync API timeouts are exposed through additional properties. The Spring Cache abstraction now supports Couchbase 2.x implementation, couchbase-spring-cache, which integrates nicely with the previous section's autoconfigured Bucket for caches. The implementation allows storing data from multiple caches into a single Couchbase bucket by prefixing keys with cache names. Additionally, Spring Data Couchbase 2.1.0 has been released, including modifications that make integration with Spring Boot easier, such as autoconfiguring Spring Data to use the default Bucket created by Spring Boot. The release includes new features like optional automatic touch on reads, improvements to sorting and pagination, added support for auditing, and more.
Apr 14, 2016
796 words in the original blog post.
Transitioning from a MySQL relational database to a schema-less NoSQL database like Couchbase is a significant shift but manageable with the right understanding of key differences. MySQL operates with structured tables, rows, and columns, while Couchbase uses JSON objects and arrays, allowing more flexibility in data storage without the constraints of a structured schema. In Couchbase, data relationships can be maintained through referring documents or embedding documents, offering versatility compared to the traditional relational model. Querying data in Couchbase with its N1QL language is similar to MySQL's SQL, enabling familiar operations like joins, albeit with differences like using bucket names instead of tables. Development tools and practices also differ, with Couchbase using its Java SDK rather than JDBC, and offering tools like CBQ and Query Workbench for interaction. Data migration can be facilitated by tools converting MySQL rows to Couchbase JSON documents, making the transition smoother. Despite these differences, Couchbase provides a flexible alternative for data storage and querying, maintaining some relational model aspects while offering expanded data handling capabilities.
Apr 12, 2016
1,536 words in the original blog post.
The guest blog by Amrith Kumar, co-founder of Tesora and Project Technical Lead for the OpenStack Trove project, outlines the capabilities and benefits of the Tesora Database as a Service (DBaaS) Platform, which is built on OpenStack's Trove service. This platform simplifies database management by automating operational tasks for provisioning and managing databases, supporting a wide range of SQL and NoSQL databases including Couchbase. The platform integrates seamlessly with OpenStack's core services like Nova, Cinder, and Neutron, allowing users to efficiently manage compute, storage, and networking resources. It offers a unified API, CLI, and GUI for database operations such as provisioning, resizing, and configuration management, enhancing security and reducing operational risks. Additional features include automated backup, restore, upgrade, and license management, making it suitable for both development and production environments. The blog also mentions Tesora's presence at the OpenStack Summit, inviting attendees to learn more about their offerings.
Apr 10, 2016
755 words in the original blog post.
The Couchbase .NET SDK version 2.2.7 is now available, featuring the Developer Preview of Index Management, which allows for easy creation and management of primary and secondary indexes using the BucketManager class. This release includes improvements to the Sub-Document API, such as performance enhancements and support for async operations on sub-documents. Additionally, the SDK has been updated with bug fixes and new features, including extended support for Index Management and improved error handling.
Apr 08, 2016
899 words in the original blog post.
There are many use cases where auto expiry of documents work perfectly, such as maintaining session state, shopping carts, and price quotes for travel. Applications using Couchbase Server set the expiry time to seconds, minutes or hours to manage user behavior. The server has built-in intelligence to make data disappear at the given expiry time, but also allows for renewal or notifications of expiring data through a process that queries upcoming expirations of documents, which can be done faster with global indexes and N1QL. Global indexes hold an advantage over map/reduce views due to their ability to partition independently from data, reside on a single node, and not require the same hardware for indexing as data nodes. To detect data that is expiring, documents are indexed by expiration time using GSI, and queries can be used to retrieve documents expiring in a given timeframe, such as the next 30 seconds.
Apr 07, 2016
490 words in the original blog post.
Java projects often face long build and redeployment times, particularly impacting developers who frequently check their work. JRebel by ZeroTurnAround offers a solution by enabling the reloading of changes to class files, resources, and frameworks without the need for a full redeployment, thus saving significant time. For instance, a developer spending 96 minutes daily on redeployment can save about 60 minutes using JRebel. Integrating JRebel into a project, particularly with IntelliJ IDEA, involves installing the plugin and activating a license, after which developers can benefit from reduced wait times. Testing JRebel with a Couchbase Java project, such as the restful-angularjs-java example from GitHub, demonstrates its convenience; developers can make quick changes to queries without full redeployment, enhancing the efficiency of development and testing processes. Overall, JRebel significantly reduces the time and trouble associated with Java application development, particularly when working with Couchbase Server.
Apr 04, 2016
608 words in the original blog post.
The text outlines the process of using graphing techniques to analyze user login data for a social network application. It emphasizes the importance of tracking login times to optimize network usage and identify security issues. The process involves updating the 'loginTimes' attribute in user documents via an API endpoint and using a N1QL query to retrieve and organize this data for graphical representation. The data is grouped by time intervals, either by day or week, and visualized using Chart.js integrated with Angular.js for the front-end. The backend work involves generating an array of login counts indexed by time, ensuring that no undefined values disrupt the graphing process. The data is then sent to the client through an API endpoint, and the integration details with the front-end graphing library are documented in a GitHub repository. The tutorial concludes by inviting feedback and suggesting that the described method facilitates easier creation of charts using N1QL and a robust graphing library.
Apr 03, 2016
932 words in the original blog post.