-
Notifications
You must be signed in to change notification settings - Fork 38
RCB workflow
Now that you have installed, configured and deployed the RCB Cyclops framework, you can proceed with the Rating-Charging-Billing workflow.
Based on your underlying system, whether you are measuring CloudStack or OpenStack - both being IaaS, or you have developed your own collector for any PaaS, SaaS or IoT scenario, all events and usage records will be processed and persisted by UDR micro service.
Every single core micro service is listening on two queues, one being data queue and second designated for execution of predefined commands.
In case of UDR micro service the usage data records are being stored into InfluxDB time series database and based on developer's preference, published over RabbitMQ.
The usage data records are made available to you via RESTful API paginated queries
The UDR micro service has a command support for generating UDR records out of available Usage Data frames. Those are automatically downsampled based on the combination of measurement type, account data belongs to, and its unique metadata.
In order to request UDR micro service to process Usage Data and generate UDR, as well as push it to the next step (RC micro service, with either Static Rating, send the following command:
{
"_class": "GenerateUDR",
"broadcast": true,
"from": 0,
"to": 1514764799
}
This way you can control the time period of UDR generation, by sending those commands with consecutive from
and to
parameters.
As can be seen in the picture above, RC micro service consists of the following two components:
Once UDR publishes usage data records over RabbitMQ, it's the rating function that takes care of calculating charge data records. You can either use included [Static rating] (https://github.com/icclab/cyclops/wiki/Static-rating) micro service, or write your own.
Rating function is also responsible for sending created charge data records to CDR micro service, which continues by persisting them into the time series database, as well as making them available over RESTful API queries.
Make sure Billing micro service is configured to use the same database as CDR micro service.
In order to do that simply send a command to Billing micro service with the following format:
{
"_class": "LocalBillRequest",
"subject": "martin",
"from": 1465047094,
"to": 1467639096
}