Skip to content

RCB workflow

skovzhaw edited this page Jul 4, 2016 · 49 revisions

Prerequisites

Now that you have installed, configured and deployed the RCB Cyclops framework, you can proceed with the Rating-Charging-Billing workflow.

Usage collection

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.

Rating, Charging and Billing

Every single core micro service is listening on two queues, one being data queue and second designated for execution of predefined commands.

UDR micro service

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.

Queries

The usage data records are made available to you via RESTful API paginated queries, where more domain specific APIs are to come.

Commands

If you need to process ingested data points/events and create usage records manually, you can proceed by writing your own commands.

As the micro services can already process batches of data points, we will be releasing "flush" processing commands very soon.

RC micro service

As can be seen in the picture above, RC micro service consists of the following two components:

Rating function

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, [Rule engine] (https://github.com/icclab/cyclops/wiki/Rule-engine) with your own pricing strategies, or write your own.

CDR micro service

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.

Billing micro service

There are currently two ways how to invoke an invoice generation:

With Rule engine

If you've deployed a rule engine you can simply send a command to Billing micro service with the following format:

{  
  "_class": "GenericBillRequest",
  "subject": "martin",
  "from": 1465047094,
  "to": 1467639096
}

Where Billing micro service will ask Rule engine to prepare an account statement for the specified subject, over the specified time window and by using predefined set of rules.

Created bill will be automatically stored and made available to you over RESTful API queries. More domain specific and sophisticated API calls are coming very soon!

Without Rule engine

Clone this wiki locally