Enhance default user state creation
A day's worth of debugging enhancements. Back to square one.
Delete the secondary event store on the User simulator
wip
A data structure for ignored first-time events
Enriching new wallet entries with some extra info
Documentation fixes. Just to catch semantics better
Handle a corner case with "lonely" events
Computing new wallet entries
Rename stuff to capture semantics better
Finally, returning the fully computed charge slots
Throw away a few compilation warnings
Use billing month info, according to the new API
Change the repr of latest events snapshot
Start putting charge chunk in context
Use previous billing month
Generalize implicit OFFs to implicitly issued events
Using billing month info
Make all snapshot contribute to user state snapshot time
Reorgaize user state computation for billing period
Date calculator is mutable
Merge branch 'master'
Conflicts: src/main/scala/gr/grnet/aquarium/logic/accounting/Accounting.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLCostPolicy.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/DSLCostPolicyVar.scala src/main/scala/gr/grnet/aquarium/logic/accounting/dsl/Timeslot.scala...
Store policies indexed per applicability timeslot
Trivial fixes, toString implementation
Add bandwidth simulator
Start computing wallet entries
WIP on wallet entries.
Constructing a proper value map depending on the cost policy.
Add two UID generator implementations
Ignoring non-billable events
Special data structure for implicit OFF events
Oh, I like contextual loggers.
Really handy when debugging.
Termination condition for billing month calculation
Rework data snapshots. Add one more to user state
Start the real deal
Pruning stuff from user state
Add some debugging beautification
Make UID generators for simulations more flexible
Better implement one query on resource event store
Better names for mutable date calc methods
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).