Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The aggregation session data is fetched using an N1QL query. 

...

Note!

N1QL queries are used by default. If you want to use views instead, set the property mz.cb.use.n1ql to false in ECs.

The data returned by the query is split into chunks of a configurable size. The size of each partial set of data can be configured by setting the property view.iteratorpageSize in the  Advanced tab of the assigned Couchbase profile. Setting a higher value than the default 1000 may increase throughput performance but it depends on the available RAM of the Execution Context host.

...

Excerpt

Session Storage Format

The aggregation sessions are stored in JSON format. However, some of the data within the JSON strings can be stored in binary format instead of plain text (default). You can change the stored format by setting the property mz.cb.agg.json_serializer.format. The valid values are:

  • MZ-BIN - The session data is serialized into JSON strings with binary content.

  • JSON - The session data is serialized into JSON strings with plain text content.

Info

Example - Binary Format

Code Block
languagetext
{ 
  "drType": "MZ-BIN", 
  "drFormatVersion": 2, 
  "data": "Af+cAAAAR2NvbS5tZWRpYXRpb256b25lLnVsdHJhLmluLmFnZ3Jl 
  Z2F0aW9uX2NvbW1vbl9zZXNz\naW9uX3Nlc3Npb25fMTk1MzI3MTEwAAABT 
  C19yJgAAAAAAAAAAAEAAAAGAQAAAAExAQAAAAExAQAA\nAAExAAAABgEAAA 
  AHY29uc3VtZQ==", 
  "SessionTimeout": 1426692360344, 
  "initialized": true 
 }

Info

Example - Plain text format

Code Block
languagetext
{ 
  "drType": "JSON", 
  "drFormatVersion": 2, 
  "data": { 
  "Type": "udr", 
  "StorableId": "aggregation_common.session.session", 
  "TypeName": "aggregation_common.session.session", 
  "Version": 1, 
  "Content": { 
  "CRCValue": 0, 
  "v_bnum": "1", 
  "SessionID": null, 
  "initialized": true, 
  "SessionTimeout": 1426691920461, 
  "v_response": "consume", 
  "v_anum": "1", 
  "v_total_duration": 5 
  } 
  }, 
  "SessionTimeout": 1426691920461, 
  "initialized": true 
 }

The Aggregation agent can read stored session data in both formats, regardless of the selected value.

In order to To obtain the best possible performance in the Aggregation agent, you should use the binary format.

Tip

Hint

You can use an Aggregation agent with Force Read Only selected to read the stored sessions. You can then encode the binary content to JSON with the APL function jsonEncodeUdr. This is useful for debugging, or when you want to view the sessions in an external system. For more information about jsonEncodeUdr, see the APL Reference Guide(4.3.0).

Replication and Persistence

You can use the properties mz.cb.awaitPersistenceTo and mz.cb.awaitReplicationTo in the Advanced tab of the selected Couchbase profile to minimize the risk of data loss. However, setting a higher value than the default 0 will reduce the throughput performance.

Automated Index Updates

...

Note!

This section only applies if you are using ‘view’ instead of ‘queries’.

In order to obtain the best possible performance in the Aggregation agent, you should disable automatic index updates in Couchbase.

...