Accessing Persisted Data
In WSO2 DAS, persisted data can be accessed in the same DAS instance by connecting to underlying datasources via the AnalyticsDataServices OSGi service. This service provides the interface to interact with the event datasource. This section explains how to configure the Analytics API to interact with analytics data and to configure the parameters relating to the connections made to access AnalyticsDataServices OSGI services in remote instances.
Configuring the mode
The data service accessing mode of the node is specified in the <DAS_HOME>/repository/conf/analytics/analytics-data-config.xml
file. It can be one of the following.
Mode | Description |
---|---|
LOCAL | The Analytics API only accesses the AnalyticsDataServices OSGI service within itself. |
REMOTE | The Analytics API only accesses the AnalyticsDataServices OSGI service in a remote instance. This mode is suitable when the node is a light weight node and does not contain an AnalyticsDataServices OSGi service. When this mode is set, configure the connection related parameters as required. |
AUTO | This is the default mode. The Analytics API of a DAS server node always has access to a AnalyticsDataServices OSgi service that exists within that same server node. At the same time, the same API can be used to change the mode and connect to a remote instance. This is done by setting the connection mode to |
Configuring the connection related parameters
The following parameters in the <DAS_HOME>/repository/conf/analytics/analytics-data-config.xml
file can configured to optimize the performance of a node in terms of resource consumption when accessing data services.
These configurations are used only when the data service accessing mode of the node is REMOTE
.
Parameter | Description | Default Value |
---|---|---|
URL | The URL of the server in which the AnalyticsDataService OSGi service is hosted. |
http://localhost:9763
|
Username | The user name to access the server in which the required AnalyticsDataService OSGi service is hosted. | admin |
Password | The password to access the server in which the required data services are hosted. |
admin
|
MaxConnections | The maximum number of connections that are allowed to be made from the node to remote instances in order to access the AnalyticsDataService OSGi service. | 200 |
MaxConnectionsPerRoute | The maximum number of connections per route that are allowed to be made from the node to remote instances in order to access the AnalyticsDataService OSGi service. | 200 |
SocketConnectionTimeout | The number of milliseconds after which the socket connection should time out when the node connects to an AnalyticsDataService OSGi service. | 60000 |
ConnectionTimeout | The number of milliseconds after which the connection should time out when the node connects to an AnalyticsDataService OSGi service. | 60000 |
TrustStoreLocation | The path to access the trust store. A trust store is required only if the URL used to access remote data services is in HTTPS protocol. If this parameter is not configured, the trust store configured in the <DAS_HOME>/repository/conf/carbon.xml file is used by default. |
This parameter is commented out by default. |
TrustStorePassword | The password to access the trust store. |
This parameter is commented out by default. |