Fix a bug with mutable state.
Although DateCalculator is mutable, I was using it as an immutable.
Enriching the test case
Add more simulation methods and enrich the test case
Cannot load the policy file from the test env though...
Add a simulations package
This will be handy when creating test cases for the new billing code.
Merge branch 'master' into 1852_billing_period_calc
Conflicts: src/main/scala/gr/grnet/aquarium/user/UserDataSnapshot.scala src/main/scala/gr/grnet/aquarium/user/UserStateComputations.scala src/main/scala/gr/grnet/aquarium/user/actor/UserActor.scala
A few changes so that everything compiles
Fix code assuming that a list always has a tail
Calculating resource instance amounts
Conflicts: src/main/scala/gr/grnet/aquarium/user/UserDataSnapshot.scala
[Does not compile] Clearing up some misunderstanding with amounts
User agreement history in user store
COntinue with billing code and start cleaning up user actor
Work in progress... Still in flux
Prune unused functionality.
Some new billing stuff.
Also using doubles everywhere instead of floats
Stylistic change
Cleanup some code before the coming changes
Doc cleanup in user actor
Gather billing computations in one file
WIP #1852 Periodic billing calculation
Change equals to ==
Merge stuff from benchmark branch
Alternative way to calculate state, with entry points commented out
Events are now replayed correctly
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
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
Store the last update timestamp per resource and instance id
This code has some errors with JSON serialization
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.
The log string has 2 args, not 3
Store the newly created user actor in the LRU cache
Refactor getInstanceId to not rely on global variables
Catch a message that is sent anyway
Consistent `Id` naming (II)
Forgot these cases when I refactored for the previosu commit.
Style: do not use return
WIP on user get balance request.
Puting everything in line with the rest of the system implementation.
Find previous wallet entries for this event
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.
Take into account active snapshot for timestamp computations
Use DEBUG shortcuts
Handle UserEvent in UserActor
Remove unused subclasses of UserDataSnapshot
More tests => several errors fixed
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 the resource state API, start using the new accounting code
Change update style to use copy on immutable data
Merge with my changes for user state handling.
I have also recreated ResourceNames and ResourceType (why were theydeleted?), as they are crucial for the polymorphic user state calculationand the resource event type and name specifications.
User state is updated immutably everywhere and every resource type...
Calculate user state from resource events (wip).
Messages and API for accessing resource state per actor
Rename master conf
Add min,max time calculations for user state
Delegate json-related functionality to JsonHelpers (UserState)
Clearer code for UserActorManager
Adding the owned resources snapshot
Add owned resources to user state (provisionally)
No snapshot for the moment, need to model it.
Use the time threshold for user state.
Change Dispatcher response model.
Add 'active' flag
Flat project hierarchy