What's new in JSON, Version 12.10
This publication includes information about new features and changes in existing functionality.
For a complete list of what's new in this release, go to What's new in Informix®.
Overview | Reference |
---|---|
Support for Mongo Compass. | Command utilities and tools |
Overview | Reference |
---|---|
Upgrade to BSON 3.5 library. | |
MQTT listener support for publishing to non-BSON timeseries tables. | Loading time series data with the MQTT protocol |
Overview | Reference |
---|---|
Listener support for creating array indexes. | Index creation |
Listener support for $bigint as an index type. | Index creation |
Overview | Reference |
---|---|
Ability to configure the listener to automatically retry a statement on certain SQL error codes. | The wire listener configuration file |
Overview | Reference |
---|---|
Consistent sharded insert, update, and delete
operations When you run sharded operations that insert, update, or delete data, the transactions are now applied with the two-phase commit protocol instead of being eventually consistent. Data is moved to the appropriate shard server before the transaction is committed. For sharding with MongoDB commands, you must set the sharding.enable wire listener configuration parameter to enable consistent sharded insert, update, and delete operations. |
Preparing shard servers |
Complex text search with regular expressions The JSON wire listener now supports searching with regular expressions with the $regex operator in MongoDB commands. |
Query and projection operators |
JSON compatibility enhancements JSON compatibility is enhanced in the following ways:
|
query operators and modifier |
Overview | Reference |
---|---|
JSON compatibility enhancements JSON compatibility is improved in the following ways:
|
The wire listener configuration file |
Load JSON documents with the MQTT protocol You can now load JSON documents into Informix databases with the MQTT protocol by defining an MQTT wire listener. The MQTT protocol is a light-weight messaging protocol that you can use to load data from devices or sensors. For example, you can use the MQTT protocol to publish data from sensors into a time series that contains a BSON column. You can also use the MQTT protocol to publish data to relational tables or JSON collections. You configure an MQTT wire listener by setting the listener.type=mqtt parameter in the wire listener configuration file. From an MQTT client, you send PUBLISH packets to insert data. You cannot, however, query data from MQTT clients with SUBSCRIBE packets. You can authenticate MQTT client users through the wire listener. |
MQTT protocol |
Overview | Reference |
---|---|
Parallel sharded queries You can now run SELECT statements in sharded queries in parallel instead of serially on each shard. Parallel sharded queries return results faster, but also have the following benefits:
To enable parallel sharded queries, set the new SHARD_ID configuration parameter in the onconfig file to a unique value on each shard server in the shard cluster. Also set the new sharding.parallel.query.enable=true and sharding.enable=true parameters in the wire listener configuration file for each shard server. You can customize how shared memory is allocated for parallel sharded queries on each shard server by setting the new SHARD_MEM configuration parameter. You can reduce latency between shard servers by increasing the number of pipes for SMX connections with the new SMX_NUMPIPES configuration parameter. If you plan to upgrade your existing shard cluster from a previous version of Informix 12.10, upgrade and set the SHARD_ID configuration parameter on all the shard servers to enable parallel sharded queries. |
JSON data sharding |
MongoDB 2.6
and 3.0 compatibility Informix now supports the following MongoDB commands:
You can authenticate MongoDB clients with the MongoDB 3.0 SCRAM-SHA-1 authentication method. You must upgrade the user schema for existing users. You upgrade to MongoDB 3.0 by setting the new mongo.api.version parameter to 3.0 in the wire listener configuration file. |
Query and projection operators |
Wire listener enhancements The wire listener has the following new parameters that you can set to customize the wire listener.
|
The wire listener configuration file |
Authenticate wire listener connections with Informix You can configure the database server to authenticate MongoDB client users, who connect through the wire listener, with a pluggable authentication module (PAM). Because you administer user accounts through the database server, you can audit user activities and configure fine-grained access control. In contrast, if you use MongoDB authentication, MongoDB clients connect to the database server as the wire listener user that is specified by the url parameter. |
Configuring database server authentication with PAM (UNIX, Linux) |
Starting the wire listener for the REST API You no longer need to provide the path to tomcat when you start the wire listener for the REST API. |
Starting the wire listener |
Overview | Reference |
---|---|
High availability for MongoDB and REST clients You can provide high availability to MongoDB and REST clients by running a wire listener on each server in your Informix high-availability cluster. You can also provide high availability between the wire listener and the Informix database server. Connect the wire listener to the database server through the Connection Manager or specify an sqlhosts file in the url parameter in the wire listener properties file. |
High availability support in the wire listener |
Wire listener configuration enhancements You can set these new or updated parameters in the wire listener properties file:
|
The wire listener configuration file |
Wire listener query support The wire listener now supports these types of queries:
|
Running join queries by using the wire listener |
Enhanced account management through the wire listener You can control user authorization to Informix databases through the wire listener by locking and unlocking user accounts or individual databases with the new Informix JSON lockAccount and unlockAccounts commands. |
Informix JSON commands |
Manipulate JSON and BSON data with SQL statements You can use SQL statements to manipulate BSON data. You can create BSON columns with the SQL CREATE TABLE statement. You can manipulate BSON data in a collection that was created by a MongoDB API command. You can use the CREATE INDEX statement to create an index on a field in a BSON column. You can insert data with SQL statements or Informix utilities. You can view BSON data by casting the data to JSON format or running the new BSON value functions to convert BSON field values into standard SQL data types, such as INTEGER and LVARCHAR. You can use the new BSON_GET and BSON_UPDATE functions to operate on field-value pairs. |
Manipulate BSON data with SQL statements |
Overview | Reference |
---|---|
Support for CORS requests in the REST API
(12.10.xC4W1) You can now set up cross-origin resource sharing (CORS) with the REST API. To do so, set the following optional parameters that were added to the jsonListener.properties file:
Use these parameters to configure the HTTP headers of all responses. The HTTP headers provide access to JSON fields that are required by synchronous JavaScript + XML (AJAX) applications in a web browser when these applications access the REST listener. |
Overview | Reference |
---|---|
Basic text searching support for JSON and BSON
data You can now create a basic text search index on columns that have JSON or BSON data types. You can create the basic text search index on JSON or BSON data types through SQL with the CREATE INDEX statement or on BSON data types through the Informix extension to MongoDB with the createTextIndex command. You can control how JSON and BSON columns are indexed by including JSON index parameters when you create the basic text search index. You can run a basic text query on JSON or BSON data with the bts_contains() search predicate in SQL queries or the $ifxtext query operator in JSON queries. |
|
Enhanced JSON
compatibility Informix now supports the following MongoDB 2.4 features:
You can perform the following new tasks that extend MongoDB functionality in your JSON application:
You can customize the behavior of the wire listener by setting new properties. For example, you can control logging, caching, timeout, memory pools, and the maximum size of documents. |
Database commands Query and projection operators |
Access Informix from REST API clients You can now directly connect applications or devices that communicate through the REST API to Informix. You create connections by configuring the wire listener for the REST API. With the REST API, you can use MongoDB and SQL queries against JSON and BSON document collections, traditional relational tables, and time series data. The REST API uses MongoDB syntax and returns JSON documents. |
REST API |
Create a time series with the REST API or the MongoDB API If you have applications that handle time series data, you can now create and manage a time series with the REST API or the MongoDB API. Previously, you created a time series by running SQL statements. For example, you can program sensor devices that do not have client drivers to load time series data directly into the database with HTTP commands from the REST API. You create time series objects by adding definitions to time series collections. You interact with time series data through a virtual table. |
Manage time series through the wire listener |
Overview | Reference |
---|---|
Use the Mongo API to access relational data You can write a hybrid MongoDB application that can access both relational data and JSON collections that are stored in Informix. You can work with records in SQL tables as though they were documents in JSON collections by either referencing the tables as you would collections, or by using the $sql operator on an abstract collection. |
About the JSON compatibility |
Improved JSON compatibility Informix now supports
the following MongoDB features:
|
Collection methods |