DB2 NoSQL for JSON feature (iv) using IBM NoSQL Wire Listener for DB2

Source: Internet
Author: User
Tags db2 json mongodb mongodb driver

Before you start

IBM NoSQL Wire Listener for DB2 (hereinafter referred to as "Wired Listener") provides the following features:

Enables developers to use the skills they acquire in the process of storing the JSON document in DB2.

It also supports applications written using the MongoDB driver and applications written using the MongoDB command shell commands.

Use the features provided by the DB2 JSON API to process Bson documents.

Background information

Now the popular way to develop the Web user interface is JavaScript for Web 2.0. JavaScript is the key to moving, neat applications, so many people view its data Interchange Format JSON as the language of the Web. The advantage of the JSON format is that it implements schema flexibility and development, and reduces pattern design overhead.

In this context, HTTP Rest/json is typically used to communicate with the intermediate application layer. This has facilitated the development of native JSON-enabled document storage, such as MONGOFB, and has been accepted by more and more people. NoSQL storage such as MongoDB is ideal for server-side JavaScript, such as Nodejs, because both use the same language and understand JSON documents. The combination of these two powerful concepts makes it possible to rapidly develop real-time applications with high throughput and concurrency requirements.

Mongodb

MongoDB (from "great" meaning) is a scalable, high-performance, open source database. MongoDB is a document store; in other words, each document is written as a unit with its own independent structure. The MongoDB API is a native combination of JSON objects and JavaScript functions. Developers interact with MongoDB through a language driver that accesses the data store instance (Java, C + +, Ruby, Nodejs, and so on), or through a shell program. These applications interact with the database through the MongoDB wired protocol. MongoDB Wired protocol is a simple protocol based on socket, request-response style. The client communicates with the database server over TCP/IP.

Bson format

MongoDB supports modeless documents that are stored as Bson formats. Bson (binary JSON) is a binary encoded serialization form of a JSON document that contains extensions that support the data type representation of the JSON specification. It contains support for the JSON structure, such as arrays and nested objects (one document is contained in another document or array).

The Bson document in MongoDB has no schema, which makes it possible to build a collection of documents that contain different structures. The flexibility of the document structure is useful in a number of areas, such as where data has different but similar attributes, sparse attributes, or rapidly evolving document structures. A classic example is a collection of books in a Web application. Given some book entries, you'll see that they represent different data: Some entries contain authors and titles, and other entries contain user comments, summaries, or information about the publishing company. The data is different, but the model or function is the same.

IBM NoSQL Wire Listener

This article describes the wired listener, which enables DB2 users to use the MongoDB community driver to store and query JSON data in DB2 Zhongyuan, thereby using DB2 as a JSON document store.

A wired listener is a server application that accepts and processes MongoDB wired protocols. It uses a DB2 JSON API to process, store, and retrieve Bson documents from DB2. The following illustration shows communication between applications developed using the MongoDB API and DB2.

Figure 1. IBM NoSQL Wire Listener Architecture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.