Buckets Data Model

The UDRs in PCC.Buckets store usage related data for each subscriber. Use the APL function pccBucketDataLookup (see the section pccBucketDataLookup in APL - PCC BucketData Support - Buckets) to get a BucketDataHolder from the database and the APL function pccBucketDataStore (see the section pccBucketDataStore in APL - PCC BucketData Support - Buckets) to store a BucketDataHolder in the database.

See APL - PCC BucketData Support - Buckets for further information about how to use the PCC.Buckets UDRs with APL and REST HTTP Interface - Buckets for information on how to access the PCC.Buckets UDRs from the REST HTTP interface.

From the BucketDataHolder all usage related data for a subscriber is accessible via the following objects in the data model:

Object

Description

Object

Description

Buckets

Stores the actual usage information and statistics. There can be multiple buckets and multiple types of information counted. When a recurring usage counter is reset, its previous values can be kept for future processing.

Sessions

Stores session related data. No additional data to uphold a session should be needed, that is, do not rely on workflow memory to hold any session information.

Subscriber

Stores meta data about the subscriber necessary for usage counting. The amount of data should be kept to a minimum and only hold data to reduce the number of times an external subscriber database needs to be queried.

Overview of the BucketDataHolder Data Model

The different UDRs within the BucketDataHolder Data Model are connected as follows:

Overview of the BucketDataHolder Data Model

BucketDataHolder UDR

The BucketDataHolder UDR holds information about all usage related data for a subscriber.

Field

Description

Field

Description

Subscriber (Subscriber(PCC.Buckets.Subscriber))>

Holds the subscriber meta data necessary for usage counting, see the section below, Subscriber UDR.

Buckets (list<PCC.Buckets.Bucket>)

The list of buckets associated with the subscriber, see the section below Bucket UDR.

Sessions (list<PCC.Buckets.Session>)

The session list associated with the subscriber, see the section below Session UDR.

Below is a screenshot of the UDR Assistance displaying the BucketDataHolder UDR:

BucketDataHolder UDR

Example - BucketDataHolder UDR

The following values:

will give the following setup:

  • The subscriber for the first bucket data holder will receive notifications 700, 702 and 703, while the subscriber for the second bucket data holder will receive notifications 700 and 703.

  • The subscriber for the first bucket data holder has two buckets, 1 and 3, where the usage is counted for product 100.

  • The subscriber for the second bucket data holder has one bucket, 2, where the usage is counted for product 110.

  • The subscriber for the first bucket data holder had a session with ID ggsn1.operator.se;555111 open towards IP-address 127.0.0.1 where the installed rules with IDs 1 and 2 was applied, the protocol Gx was used, and a reservation of 500.000 bytes of data for product 100 was granted. The last request for the session was received on the 24th of October, 2011, at 10:34:42.

  • The subscriber for the second bucket data holder had a session with ID ggsn2.operator.se;55522 open towards IP-address 127.0.0.1 where the installed rule with ID 3 was applied, the protocol Gy was used, and a reservation of 250.000 bytes of data for product 110 was granted. The last request for the session was received on the 25th of October, 2011, at 16:12:53.

Subscriber UDR

The Subscriber UDR holds the subscriber meta data necessary for usage counting, such as information if the subscriber information has been updated, the different notifications a subscriber should receive, etc.

Field

Description

Field

Description

Groups (list<string>)

Indicates the group(s) that the subscriber belongs to.

IsChanged (boolean)

Indicates whether bucket structure needs to be updated from an external source.

Notifications (list<int>)

The notifications that the subscriber should receive, see Notification UDR in Product Data Model.

SentNotifications (list<int>)

The notifications that has been sent to the subscriber.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Subscriber UDR:

Subscriber UDR

Example - Subscriber UDR

The following values:

IsChanged=true Notifications=[700,702,703] IsChanged=false Notifications=[703]

will give the following setup:

  • The data for the first subscriber has been updated externally, and the bucket structure needs to be updated accordingly.

  • The data for the second subscriber has not been updated.

  • The first subscriber will receive notifications 700, 702 and 703, while the second subscriber will only receive notification 703.

Both subscribers will also receive any notifications that has been set to be Required, see Notification UDR in Product Data Model.

Bucket UDR

The Bucket UDR stores the actual usage information and statistics. Each bucket references one product and has a start time and stop time that determines when the bucket should be activated and expire. Each bucket also contains one or several counters which are depending on the configuration for the selected product.

Field

Description

Field

Description

ID (string)

The ID of the bucket. The ID must be unique within the bucket list, and is used to identify a particular bucket both in the BucketDataHolder UDR, and from the REST HTTP interface.

Product (int)

References a product using its identifier. Each bucket must be associated with a product. The product has information that controls the behavior of the bucket.

StartTime (date)

The date and time when the bucket is to be activated, or when the last reset was done, depending on if the date is in the future or in the past.

StopTime (date)

The date and time when the bucket expires.

Counters (list<PCC.Buckets.Counter>)

Holds a list of counters. Each counter in the list can count multiple items. The list can retain multiple counters depending on the product configuration.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Bucket UDR:

Bucket UDR

Example - Bucket UDR

The following values:

will give the following setup:

  • The IDs for the three buckets; 1, 2 and 3, are used in the BucketDataHolder UDR for determining which buckets usage should be counted in.

  • All of the buckets will start on the 1st of October and expire by the end of the 30th October, but at different times of the day.

  • The counters for the first bucket has counted 100 bytes in output, 200 bytes in input and 300 bytes in total.

  • The counters for the second bucket has counted 50 bytes in output, 300 bytes in input and 350 bytes in total.

  • The counters for the third bucket has counted 20 bytes in output, 100 bytes in input and 120 bytes in total.

Counter UDR

The Counter UDR counts usage. Each counter can count multiple items.

Field

Description

Field

Description

Usage (map<byte, long>)

Records usage counts for multiple items; 0 - Input, 1 - Output, 2 - Total, 3 - Other.

Below is a screenshot of the UDR Assistance displaying the Counter UDR:

Counter UDR

Session UDR

The Session UDR stores data related to Diameter sessions, which includes information about the rules that applies, the workflow that is responsible for the session, any reservations made, when the session was last active, the session destination and the protocol used for the session.

Field

Description

Field

Description

ID (string)

The ID of the session. This ID must be unique within the session list. Usually a Diameter session id is used as the id.

InstalledRules (list<InstalledRule>)

Records the rules installed by this session, if any.

Reservations (list<Reservation>)

Records the reservations made by this session, if any.

LastActive (date)

The date and time when the session was last active.

Workflow (string)

Holds the name of the workflow responsible for this session.

Destination (string)

The destination for the session, for instance the Diameter destination host.

Protocol (string)

The protocol for this session, for instance Gx or Gy.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Session UDR:

Session UDR

InstalledRule UDR

The InstalledRule UDR contains rule settings used by the Session UDR. Each installed rule references one bearer as well as the rules and QoS levels installed for the bearer.

Field

Description

Field

Description

Bearer (bytearray)

The bearer on which this rule is installed.

QoS (int)

The QoS installed for the bearer.

Rules (list<int>)

The list of rules installed on the bearer.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the InstalledRule UDR:

InstalledRule UDR

Reservation UDR

The Reservation UDR controls the amount of data granted for the used counter items, i e products and buckets.

Field

Description

Field

Description

Granted (map<byte, long>)

Holds the amount of data granted for the used counter items.

Products (list<int>)

Records the list of products, and indirectly the buckets, that the reservation refers to, if applicable.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Reservation UDR:

Reservation UDR