The Metaswitch Rhino Diameter resource adaptors manage Diameter peer connections and provide SLEE services with the ability to send and receive Diameter messages.
Below are an overview of the responsibilities of the RA and services, resource adaptor type API summary, sending and receiving non-standard AVPs and messages, and a description of the context of the Diameter Resource Adaptor package.
Resource adaptor responsibilities
The resource adaptor is responsible for the following aspects of the Diameter protocol:
-
Initiate and maintain peer connections configured in peer table.
-
Route and load-balance outgoing messages according to the realm table and configuration properties.
-
Send outgoing connection-related Diameter messages (CER/CEA, DWR/DWA, DPR/DPA).
-
Process incoming connection-related Diameter messages (includes CUR, see RFC6737).
-
Start and end SLEE activities for Diameter sessions where applicable.
-
Encode Java objects into Diameter’s on-the-wire encoding.
-
Decode incoming messages and create equivalent Java objects.
-
Optionally replicate activities to support credit control session failover.
This leaves the service needing only to: construct Java objects for application-level Diameter messages and submit them to the resource adaptor; and process application-level Diameter messages received as Java objects in SLEE events.
Resource adaptor type API summary
The Diameter resource adaptor type API includes these features:
-
Each Diameter resource adaptor type contains a comprehensive mapping of the Diameter messages and grouped AVPs defined by the applicable specification. Every message and grouped AVP is represented by a Java interface with bean-style access methods.
-
Enumerated types defined by the specification are provided as Java constant objects.
-
The provider interface has methods to create activities and send messages synchronously.
-
Activity interfaces contain methods to send messages asynchronously.
Services written using this API are easy to understand and maintain, and services can send and receive any AVP combination permitted by the specification.
Sending and receiving non-standard AVPs and messages
Many Diameter specifications allow arbitrary AVPs to be added to messages and grouped AVPs. These are indicated in the specification by the following line in the definition of that message or grouped AVP:
* [AVP]
These are known as "extension AVPs" in the Diameter resource adaptors. The resource adaptors can be configured to handle arbitrary AVP definitions, and all resource adaptor types provide methods to set and get these extension AVPs.
The Diameter Base Resource Adaptor Type API also provides methods to construct and send a Diameter message with an arbitrary command code and vendor ID.
What’s in the Diameter resource adaptors package?
The Diameter resource adaptors package includes:
-
Resource adaptors and corresponding resource adaptor types for Diameter CCA, Diameter Ro, Diameter Rf, Diameter Sh, Diameter Gx, and Diameter Base (which covers Diameter Base Accounting as well as supporting custom Diameter applications). For each resource adaptor type there is a component JAR file to compile services against and a deployable unit JAR for deployment. Resource adaptors only need the deployable unit JARs.
-
Simulator tools with very basic functionality to respond to incoming Diameter requests.
-
Example services with Ant scripts for building and deploying them.
-
Other deployable units that are shared by all Diameter resource adaptors: Diameter profile specification, Diameter base types library, Netty library, Google Guava library.