[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]


How the VTA Works

The VTA manages subscriber accounts using a rule-driven event processing system that can prioritize the actions taken for certain conditions. The VTA is triggered by events, such as the logging in of subscribers, the use of network services, or the changing of account balances. These events can cause actions, such as updating account balances, starting or stopping network services, or running scripts to perform external actions.

A VTA processes external events based on its configuration. A VTA configuration is made up of:

Events

Each VTA event corresponds to one subscriber and contains some attributes. The VTA supports the following types of events:

Event Attributes

Each event carries attributes. Table 2 describes the types of attributes that are available for each type of event.




Table 2: Event Attributes  
Event Type
Available Attributes

Service and subscriber tracking events from the SAE

  • Plug-in attributes, such as PA_SERVICE_NAME or PA_LOGIN_NAME, associated with an SAE plug-in event. For a list of SAE plug-in events, see the SAE CORBA plug-In SPI online documentation on the Juniper Networks Web site at http://www.juniper.net/techpubs/software/management/sdx/api-index.html or in the SDX software distribution SDK/doc/idl/sae/html/index.html.
  • The currentTime attribute, which is the time since January 1, 1970 UTC when the VTA receives the event. The value is the number of milliseconds in the range 0-9223372036854775807.

Account update events

  • Old status of the account.
  • New status of the account.
  • Last time the account was updated—both old time and new time.
  • Old balance of the account.
  • New balance of the account.
  • Time since January 1, 1970 UTC, when the VTA receives the event.

Callback events

  • The callId attribute and all parameters provided with the callback.
  • The currentTime attribute is the time since January 1, 1970 UTC, when the VTA receives the event. The value is the number of milliseconds in the range 0-9223372036854775807.

Event Handlers

An event handler defines how the VTA processes an event. VTA event handlers consist of:

You can set up multiple event handlers to process events. For example, the first event handler could retrieve the balance for a quota account, and the next event handler could refill the quota account, depending on whether the condition of the second event handler is met.

Figure 2 shows the event handler model. The VTA processes an event as follows:

  1. The event handler with the highest priority receives the event, checks if the event's type is the same as the event type of the event handler, and checks if the event satisfies the condition of the event handler.
  2. If the condition is met, the VTA performs the corresponding actions based on the event attributes. An action invokes a function and provides the parameters required by that function to the processor.
  3. When an event handler finishes processing an event, the next applicable event handler according to the priority of the event handler processes the event.

Figure 2: VTA Event Handler Model

Actions

You can specify actions that the VTA takes in response on an event; for example, updating an account balance, starting a service, or stopping a service. The actions are performed if the event is of the specified type and matches the specified condition. An action is modeled as a call to a function.

An action can update event attributes or add new attributes to an event for subsequent processing of the same event by another event handler.

An action configuration includes:

VTA Processors

Processors receive and process events. The VTA has four processors:

Database Engine Processor

The database engine processor is a proxy to a database. You can use the database engine processor to:

Mail Processor

You use the mail processor to set up the VTA to send e-mail notifications to subscribers when certain events occur.

SAE Proxy Processor

You can use the SAE proxy processor to:

The SAE proxy processor is a proxy to the SAE external interface that resolves the subscriber interface based on the event types to which functions are applied.

Script Runner Processor

The Script runner processor can invoke external executable scripts or JavaScripts. We recommend using JavaScript, where possible, for better performance.

VTA Operation

Figure 3 illustrates the VTA operation process.


Figure 3: Operation of the VTA

The VTA operates as follows:

  1. When an event that activates a value-added service occurs (for example, a subscriber logs in), the SAE sends a session start event to the VTA through the SAE external plug-in interface.
  2. Optionally, the VTA queries a database for the subscriber's current set of sessions and accounts.
  3. Depending on the configuration of the VTA, it may activate or deactivate services based on the subscriber's use of resources.
  4. The VTA tracks the subscriber's use of resources for a period of time.
  5. The VTA updates sessions and account balances in the database.
  6. The VTA sends to the SAE changes in the interim accounting interval and takes action to limit excessive bandwidth use or to allow increased bandwidth use.
  7. When an event that deactivates a value-added service occurs (for example, the subscriber logs out), the VTA updates the VTA session, closes the VTA session, and may update the account balances.

Events received through the remote interface can also cause the VTA to activate services, deactivate services, or change the accounting interval.

Example: Limiting Subscriber Access Based on Account Balances

The sample data provides an example called Quota that limits a subscriber's access rate based on the balances of accounts that record the subscriber's use of network resources. Subscribers receive a quota of transfer (upload and download) volume in two ways:

As a subscriber consumes volume, the VTA debits the accounts, using first the periodic quota and, if no periodic quota is available, the bought quota.

Subscribers managed by a VTA require a subscription to quota services—value-added services for which a VTA monitors and manages usage. You must configure these subscriptions to be activated when the subscriber logs in. When a subscriber logs in to the SAE, the SAE tries to activate the quota services. However, if neither the periodic account nor the bought account has a positive balance, the VTA deactivates the quota services, and the SAE applies to the subscriber either the default policy or another policy that implements a service with a lower bandwidth.

The units of the accounts depend on the formula that you define to determine the use of network resources. With this formula, the VTA calculates the change to the accounts and the interim accounting interval.

The Quota configuration example provides a VTA that operates as follows:

  1. When a service session for the quota service starts, the SAE sends a start event to the VTA.
  2. The VTA starts a VTA session that has the same identifier as the service session and a qualifier of zero.
  3. When the VTA receives the first interim update from the SAE in a VTA session, it records a balance change that details the use of resources and the event time for the VTA session. When the VTA receives interim updates in the VTA session, it updates the use of resources and the event time in the balance change recorded previously.
  1. If the SAE session ends, the VTA session ends. When a new service session starts, Steps 1 to 3 recur. However, a service session may last for several VTA sessions. In this case, the SAE and VTA continue the process described in Step 3.
  2. When an administrator replenishes the periodic quota, the VTA ends the VTA session, finalizes all balance changes for the session, and records a credit to the periodic account.
  3. When the subscriber buys additional volume, the VTA ends the VTA session, finalizes all balance changes for the session, and records a credit to the bought account.
  4. When the VTA next receives an interim update event from the SAE, it starts a new VTA session. The VTA obtains the start time for the VTA session from the SAE event, and records debits to the accounts as described in Step 3.

The VTA always ends the VTA session when an administrator replenishes periodic quota or the subscriber buys volume. However, a service session may last for several billing periods. In this case, when the VTA starts a new VTA session, it continues to assign the SAE session identifier to the VTA session and increments the qualifier by one. Keeping the VTA session within a billing period allows the VTA to finalize balance changes.


[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]