Fix code assuming that a list always has a tail
Update available policies when on configuration file update
Wrapper for stored DSLPolicy YAML dumps
License headers
Logic to load/store policies from Policy store
User agreement history in user store
API methods for policies
Implement custom Policy entry and policy storage ops
Merge branch '1852_billing_period_calc'
Conflicts: src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSL.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLAgreement.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLCostPolicy.scala...
Fix all serialization to YAML issues
Work in progress... Still in flux
toMap() method for remaining DSL classes.
Also, immutable map generation for all classes
Method to parse YAML from a String
One fact in one place commit
Basic support for serializing policies to YAML
Prune unused functionality.
Some new billing stuff.
Also using doubles everywhere instead of floats
Support policy retrieval for a date
Policy store operations
Json support
Stylistic change
Cleanup some code before the coming changes
Avoid a compilation warning (-deprecation)
Doc cleanup in user actor
Gather billing computations in one file
Use receivedMillis for queries
Since Aquarium is the billing master, a billing period is defined in billing time.So we use receivedMillis (aquarium time) and not occurredMillis (the event occurrence time).This way we can easily make bills for past events and do not care when they will actually arrive.
Use wallet-specific json field names
Do some effectful composition instead of try/catch
WIP #1852 Periodic billing calculation
Change equals to ==
Merge stuff from benchmark branch
Alternative way to calculate state, with entry points commented out
Query to retrieve all events that comprise the history of an event
Names for event store fields
Configurable number of users to init (up to 1000)
Log verbosity--
Parametrise number of actors to spawn, more threads for reading from store
Events are now replayed correctly
The correct name of the field is occuredMillis
Compilation fixes
Support for replaying event logs to construct the user runtime state
Properly shutdown user actors on Aquarium shutdown
Save user state on shutdown
Method to delete user state from store
Take care of first time state changes
Simplify resources snapshot to make our lives easier with the lift-json library.
After a few failed attempts with lift-json, I sacrifice the Map for a List.
WIP on the algos documentation camp
Give the option of pretty or non-pretty json printing
Store the last update timestamp per resource and instance id
This code has some errors with JSON serialization
Add a few helper methods to resource event
Super documenter. Work in progress.
An attempt is being made to work the algorithms in plain prose.Hopefully, this will help everyone get a better understanding of thecomplexities involved and of the quite interesting problem domain.
As I said, this is Work in Progress...
Don't store the whole agreement to the user state
Store a reference by name instead.
Case objects instead of objects for cost policy definitions
The log string has 2 args, not 3
Use the list of resources defined in the policy
Store the newly created user actor in the LRU cache
Do not use default global value parameter and take advantage of pattern case class matching
Augment DSLCostPolicy with utility methods
Refactor getInstanceId to not rely on global variables
Equality is always a possibility
Catch a message that is sent anyway
Consistent `Id` naming (II)
Forgot these cases when I refactored for the previosu commit.
Consistent `Id` naming
Style: do not use return
Fix a couple of compilation warnings.
We still get the `head` though (via next), so the semantics are similar.
WIP on user get balance request.
Puting everything in line with the rest of the system implementation.
Find previous wallet entries for this event
Names for fields in the Json representation of the msg
Spice up WalletEntries with resource and instance info
Eliminate pattern matching since I am not doing anything with the specific cases
Small refactoring to ensure user state
Fill in and use UserState snapshots from DB.
Add documentation for store-related collections, give better names and fix a couple of bugs
Take into account active snapshot for timestamp computations
Use DEBUG shortcuts
Handle UserEvent in UserActor
Small doc addition for UserEvent
Remove unused subclasses of UserDataSnapshot
Collection renaming a bug fix in UserState query
Make UserState roles immutable
Add a few queries to UserEvent
Forward UserState events to dispatcher
Calculate hours, not minutes
More precise error message
More tests => several errors fixed
Generify EventProcessorService to avoid too many casts
Use UserDataSnapshotException
Refactor user state change code
Accounting changes, too many to commit individually:
-Make the resource state store hold values in a uniform format for complex and simple resources-Make the resource state retrieval method simpler and also containall resource state storage conventions into it....
Remove wrong test
Convert a timeslot to its duration in hours
States for discrete cost policy events
Stricted definitions and explantations for cost policies
Remove the resource state API, start using the new accounting code
Purify the accounting code
-All required resource state passed as params-Charge chunks exposed as top level entity
Support for user configurable accounting policy locations
Make the number of MongoDB connections a configurable property
Various performance related changes
-Start lots of actors by default, to compensate for slow I/O-Start a fair amount of threads by default-More detailed logging-Don't create a new dispatcher per request
Create a new connection per store request
This is to take advantage of the Mongo driver connection pool
Implement the remaining bits of the user event processor service