Best Practices for setting up the Persistent Mobile Foundation Analytics production Cluster


This topic describes the list of best practices that include the DOs and the DON’Ts to be followed while setting up an Analytics Server in production.

PMF Analytics Server - Configuration settings

Data purging has to be applied to the production environment, mandatorily, in order to not persist the entire document set from the beginning. By setting the appropriate TTL values for various event documents, the search scope for OpenSearch queries can be reduced considerably. Following are the TTL values that are to be set for the Persistent Mobile Foundation Analytics PMF 9.x Server:

TTL properties for Analytics Event/Documents

  • TTL_PushNotification
  • TTL_PushSubscriptionSummarizedHourly
  • TTL_ServerLog
  • TTL_AppLog
  • TTL_NetworkTransaction
  • TTL_AppSession
  • TTL_AppSessionSummarizedHourly
  • TTL_NetworkTransactionSummarizedHourly
  • TTL_CustomData
  • TTL_AppPushAction
  • TTL_AppPushActionSummarizedHourly
  • TTL_PushSubscription

Example usage:

<jndiEntry jndiName="analytics/TTL_AppLog" value= '"30d"' />

TTL value are expected to be String literals and should be passed within single quotes.
If the TTl entry for a particular document-type is not defined in JNDI property, then by default, the TTL value is 30.

PMF Analytics Server - Topology

Multi-Node Analytics Cluster

  • It is important to have a load balancer in front of the nodes to ensure that the analytics layer is offered an even load across the nodes.
  • In a two-node analytics cluster when a load balancer is not used, it is good to configure or use the Analytics console of the node that is not used for accepting the data from the Persistent Mobile Foundation Server.

Example

Consider that there are two nodes for the analytics server. In such a case, the recommendation for the Persistent Mobile Foundation server configuration for analytics is as below:

Recommended

mfp/mfp.analytics.url -> http://node1:9080/analytics-service/rest
mfp/mfp.analytics.console.url -> http://node2:9080/analytic/console

NOT recommended:

mfp/mfp.analytics.url -> http://node1:9080/analytics-service/rest
mfp/mfp.analytics.console.url -> http://node1:9080/analytic/console

This allows the user to reduce the load on the nodes when the user views the analytics console.

PMF Analytics Server - Performance Tuning

PMF Analytics Server - DOs and DON’Ts

  • In a multi node cluster, avoid using the same node for pushing the events into analytics cluster and access the console. Best practice would be to use a Load balancer in front of the analytics cluster.

PMF Analytics Server - SDK issues

  1. Cordova Applications must initialize at native platform for Lifecycle events to enable AppSession capture

    In the Persistent Mobile Foundation PMF 9.x, the app sessions are incremented/recorded when the app goes from background to foreground.

    Capturing AppSessions is enabled by adding listeners for lifecycle events. The native SDKs provide appropriate APIs for adding these listeners. However, in the case of Cordova there is no JavaScript API for adding these lifecycle event listeners. Instead, the listeners have to be added using native platform APIs even for Cordova applications.

    Excerpt from the documentation:

    After the Analytics SDK is configured, app sessions start to be recorded on the users device. A session in the Persistent Mobile Foundation Analytics is recorded when the app is moved from the foreground to the background, which creates a session on the Analytics Console. As soon as the device is set up to record sessions and you send your data, you can see the Analytics Console populated with data, as shown below.

    For example, for a Cordova app on iOS Platform (iOS) it is mandatory to add the following under AppDelegate.m:

    [[WLAnalytics sharedInstance] addDeviceEventListener:LIFECYCLE];
    [[WLAnalytics sharedInstance] send];
    
  2. View the custom Data on Analytics console

    To quickly locate the custom data sent to Analytics server using the Analytics Client SDK APIs, following step can be performed.

    Go to Analytics Console > Dashboard > Custom Charts > Create a Custom Chart

    Create a custom chart

    For more information refer to the documentation Creating Custom Charts.

PMF Analytics Server - Troubleshooting steps

  1. Customer Environment Version:

    Gather the details of the complete software stack, including OS, JDK/JRE, AppServer, the Persistent Mobile Foundation version, and the Persistent Mobile Foundation build version.

  2. Compare the environment details with the Persistent Mobile Foundation Analytics Software Compatibility Matrix/requirements.
  3. Gather the Analytics Topology & Hardware specifications used.
  4. Check if there was any performance tuning performed (in case of performance issues).
  5. Gather the Persistent Mobile Foundation Server’s server.xml (Liberty) to verify the Analytics integration configuration.
  6. Gather the screen shot of the Analytics administration console.
  7. Gather the Analytics server.xml (Liberty) to verify the Analytics integration configuration.
  8. Collect the output of the following REST APIs.

References

Last modified on