Difference between revisions of "Accounting Library"
Luca.frosini (Talk | contribs) |
Luca.frosini (Talk | contribs) (→Library) |
||
Line 3: | Line 3: | ||
== Library == | == Library == | ||
− | The library has been tough to provide a common way to elaborate '''Usage Record''' | + | The library has been tough to provide a common way to elaborate '''Usage Record''' (''UR'') (see Accounting Model to check which Usage Records are supported by default). In particular is responsible for: |
* Collecting | * Collecting | ||
* Aggregating | * Aggregating | ||
Line 11: | Line 11: | ||
=== Collecting Usage Record === | === Collecting Usage Record === | ||
− | + | The library allow to collect Usage Records providing the following functionality: | |
− | === Buffering Usage Record === | + | * Attribute Validation and Harmonization |
+ | * Full Usage Record Validation | ||
+ | |||
+ | |||
+ | * Developer Friendly methods (getter and setter) | ||
+ | * Generic Key-Value method | ||
+ | * Generic Map method | ||
+ | |||
+ | For the same attribute each of the record is IDEMPOTENT. This means that | ||
+ | |||
+ | |||
+ | Record Validation | ||
+ | |||
+ | |||
+ | |||
+ | === Buffering & Aggregating Usage Record === | ||
+ | |||
+ | The library provide bufferization capabilities. | ||
+ | While the records are buffered for each new records requested to be accounted the library try to aggregate the new record with the one has already buffered. The aggregation made in this phase is lossless. | ||
=== Storing Usage Record === | === Storing Usage Record === | ||
+ | * Fallback | ||
== Development == | == Development == |
Revision as of 17:23, 16 November 2015
This component is responsible of collecting, harmonizing and storing accounting data.
Contents
Library
The library has been tough to provide a common way to elaborate Usage Record (UR) (see Accounting Model to check which Usage Records are supported by default). In particular is responsible for:
- Collecting
- Aggregating
- Buffering
- Storing
Collecting Usage Record
The library allow to collect Usage Records providing the following functionality:
- Attribute Validation and Harmonization
- Full Usage Record Validation
- Developer Friendly methods (getter and setter)
- Generic Key-Value method
- Generic Map method
For the same attribute each of the record is IDEMPOTENT. This means that
Record Validation
Buffering & Aggregating Usage Record
The library provide bufferization capabilities. While the records are buffered for each new records requested to be accounted the library try to aggregate the new record with the one has already buffered. The aggregation made in this phase is lossless.
Storing Usage Record
- Fallback
Development
The library is identified by the following maven coordinates:
<groupId>org.gcube.accounting</groupId>
<artifactId>accounting-lib</artifactId>
Persistence
The current implementation of persistence for this library is for CouchDB storage.
<groupId>org.gcube.accounting</groupId>
<artifactId>accounting-lib-persistence-couchdb</artifactId>
Less dependency is better than more
This library must be available on every node of the infrastructure. To respect as much possible ZERO-DEPENDENCY paradigm of SmartGears a simple couchdb-connector (simple HTTP client library) has been developed.