Overview #
In today’s data-driven economy, organizations and third-party integrators require timely and accurate data to make informed decisions. This calls for a more efficient, robust, and real-time data delivery mechanism that reduces database load and enhances the responsiveness of integrated systems.
The DataHub Subscription (DHS) module redefines the way integrators and organizations access and utilize data from the SCALAR DataHub. By implementing an effective push-based data delivery system, the aim is to provide real-time, efficient, and scalable data integration solutions. This results in integrators receiving immediate updates, reducing database load, and enhancing the overall system performance. The DHS module therefore offers a seamless and automated data exchange ecosystem that supports the dynamic needs of modern businesses, enabling them to operate more effectively and respond to critical events with greater agility.
Data transmission process #
The Datahub Portal captures and processes the data derived from SCALAR for events triggered such as assets, alarms, and sensors. The DataHub Subscription module stores and transmits this data to subscriber organizations. The administrator can set up the subscription in the DataHub Subscription module to start receiving data for the event groups defined.
Note: The DataHub Subscriptions module uses Webhooks as a push mechanism for data transmission.
Add subscription #
A subscription can be added from the Add subscription page, which includes the information specified below:
- Subscription details
- Subscription configuration details
- Subscription event groups
- In the Datahub Portal module > click Subscriptions . The Subscriptions page is displayed.
- Click Add subscription. The Add subscription page is displayed.
- Enter details in the various sections as explained in this table.
Field Action Subscription details Subscription name Enter a name for the subscription. Integrator name Select the integrator from the list.
Note: Data transmission from SCALAR Integration is only accessible through an integrator. You must create an integrator before adding a subscription.Batch size Enter the number of data points that can be transmitted in a batch.
For example, if the batch size is 10, the DHS module forms a batch of 10 data points to be transmitted at a time.
If the batch size is 0, the DHS module transmits the data immediately.Maximum waiting time Enter the waiting time where the unit of measurement is milliseconds.
The maximum waiting time should be between 5000ms (5s) to 1800000ms (30m).
Note: The DHS module considers both the batch size and the maximum waiting time while transmitting data after determining which parameter value is less. For example, if the batch size is 100 and the maximum waiting time is 5000, the DHS module transmits data to the customer every 5 seconds even if the batch size is less than 100.Subscription method Select the Subscription method from the list.
Note: Currently, the Webhook method is being supported.Subscription configuration Webhook URL Enter the URL or the endpoint to which the data will be transmitted. Webhook secret The system generates a base64 string. The data transmitted by the SCALAR DHS will be encrypted in the header using this secret. This ensures that the data is originating from a trusted source.
Note: You must store the string for authentication. This key is required for encryption and decryption.Subscription event groups Add event groups Click Add event groups to subscribe to event groups. The Add event groups dialog is displayed.
Note: A set of related events that are grouped together form an event group for the purpose of management and processing. The DHS module will transmit data when the selected events occur.Event group name Select the event group from the list.
Note: Assets, sensors, and spot contracting are examples of event groups.Version Select the version from the list. Custom event group options Enter a JSON value.
Example in JSON format
{“assets”:[{“assetId”:”9b11e94d-4215-4c75-afd2-445e21517d52″}, {“assetId”:”9a0154d4-673e-4509-b1d8-56de72489d4d”}, {“assetId”:”e47a2a15-6274-457d-9593-dadf621954f8″}]}
Note: This field is used to provide a JSON string that will have the ability to provide further functionality. For example, if Track and Trace event group wants to provide filtering on Asset IDs, this field can have an array of Asset IDs in JSON format.Event names For the selected event group, select the event from the list, for example, under the Asset event group, TPMS alarm and harsh braking events can be selected.
Note: You can enter multiple events specific to an event group.
Note: Click Add another event group to subscribe to more event groups. - Click Continue. The event groups subscribed are listed.
- Click Save. The event groups subscribed to are saved.
NOTE: The confirmation message indicating that the subscription is partially saved to the system suggests that further steps such as verification are required before the subscription is fully active. - Click Continue. The subscription is added and listed on the Subscriptions page. The status is active by default.
View subscriptions #
The administrator can view subscription details, such as subscription configuration and event groups subscribed for.
In the Datahub Portal module > click Subscriptions . The Subscriptions page is displayed (see the image inserted in the previous section).
Available columns
Column | Description |
Subscription name | Name of the subscription |
Event group name | Event groups subscribed to, for example, assets, sensors, and spot contracting |
Batch size | Number of data points that can be transmitted in a batch |
Maximum waiting time | Displays the milliseconds value of maximum waiting time since the last batch sent |
Integrator name | Name of the integrator |
Created date | Date when the subscription was created |
Overflow | Status type: Enabled or Disabled NOTE: The overflow functionality ensures that data is preserved even if the Webhook endpoint is unavailable for more than 30 minutes. |
Status | Status type: Active, Inactive, or On hold |
Actions | Click to view the menu, and then activate, deactivate, or delete a subscription |
Edit subscription #
The administrator can edit subscription details, such as subscription configuration and event groups.
- On the Subscriptions page, click the Subscription name link. The subscription details page is displayed.
- Click Edit, and on the Edit subscription page, modify the details.
- Click Save. The subscription details are updated.
Deactivate subscription #
An administrator can deactivate a subscription. Use this feature to suspend the subscription temporarily.
- On the Subscriptions page, in the Actions column, next to the required subscription name, click the menu , and then click Deactivate.
- In the Deactivate subscription dialog, click Deactivate to confirm. The subscription is deactivated.
Reactivate subscription #
Reactivate a subscription if required.
- On the Subscriptions page, in the Actions column, next to the required subscription name, click the menu , and then click Activate.
- In the Activate subscription dialog, click Activate to confirm. The subscription is activated.
Delete subscription #
An administrator can delete a subscription if the service is to be discontinued.
- On the Subscriptions page, in the Actions column, next to the required subscription name, click the menu , and then click Delete. The Delete subscription dialog is displayed.
- Click Delete to confirm. The subscription is deleted.
Note
- You can also delete the subscription from the subscription details page.
- Even if a subscription is deleted, it is not removed permanently. The record is archived.
- To suspend the subscription temporarily, use the deactivate feature.