aquarium
12 years agoTowards the new billing and state computation algorithms billing
Christos KK Loverdos [Thu, 12 Jan 2012 13:59:52 +0000 (15:59 +0200)]
Towards the new billing and state computation  algorithms

12 years agoEvents are now replayed correctly
Georgios Gousios [Wed, 11 Jan 2012 20:06:25 +0000 (22:06 +0200)]
Events are now replayed correctly

12 years agoThe correct name of the field is occuredMillis
Georgios Gousios [Wed, 11 Jan 2012 20:05:23 +0000 (22:05 +0200)]
The correct name of the field is occuredMillis

12 years agoCompilation fixes
Georgios Gousios [Wed, 11 Jan 2012 17:05:14 +0000 (19:05 +0200)]
Compilation fixes

12 years agoSupport for replaying event logs to construct the user runtime state
Georgios Gousios [Wed, 11 Jan 2012 17:01:35 +0000 (19:01 +0200)]
Support for replaying event logs to construct the user runtime state

12 years agoProperly shutdown user actors on Aquarium shutdown
Georgios Gousios [Wed, 11 Jan 2012 12:47:41 +0000 (14:47 +0200)]
Properly shutdown user actors on Aquarium shutdown

12 years agoSave user state on shutdown
Georgios Gousios [Wed, 11 Jan 2012 12:46:59 +0000 (14:46 +0200)]
Save user state on shutdown

12 years agoMethod to delete user state from store
Georgios Gousios [Wed, 11 Jan 2012 12:46:32 +0000 (14:46 +0200)]
Method to delete user state from store

12 years agoTake care of first time state changes
Georgios Gousios [Wed, 11 Jan 2012 09:44:12 +0000 (11:44 +0200)]
Take care of first time state changes

12 years agoWIP on the algos documentation camp
Christos KK Loverdos [Tue, 10 Jan 2012 23:44:47 +0000 (01:44 +0200)]
WIP on the algos documentation camp

12 years agoSimplify resources snapshot to make our lives easier with the lift-json library.
Christos KK Loverdos [Tue, 10 Jan 2012 23:44:23 +0000 (01:44 +0200)]
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.

12 years agoGive the option of pretty or non-pretty json printing
Christos KK Loverdos [Tue, 10 Jan 2012 23:40:27 +0000 (01:40 +0200)]
Give the option of pretty or non-pretty json printing

12 years agoMore on billing
Georgios Gousios [Tue, 10 Jan 2012 22:01:07 +0000 (00:01 +0200)]
More on billing

12 years agoBit of text rearrangement, billing descriptions
Georgios Gousios [Tue, 10 Jan 2012 21:12:21 +0000 (23:12 +0200)]
Bit of text rearrangement, billing descriptions

12 years agoStore the last update timestamp per resource and instance id
Georgios Gousios [Tue, 10 Jan 2012 16:17:13 +0000 (18:17 +0200)]
Store the last update timestamp per resource and instance id

This code has some errors with JSON serialization

12 years agoSimple test to try serialization of the complex user state class
Georgios Gousios [Tue, 10 Jan 2012 15:40:49 +0000 (17:40 +0200)]
Simple test to try serialization of the complex user state class

12 years agoMethod to assert that an exception is not thrown
Georgios Gousios [Tue, 10 Jan 2012 15:39:41 +0000 (17:39 +0200)]
Method to assert that an exception is not thrown

12 years agoA great contribution to the paper.
Christos KK Loverdos [Tue, 10 Jan 2012 15:00:56 +0000 (17:00 +0200)]
A great contribution to the paper.

12 years agoSuper documenter. Work in progress.
Christos KK Loverdos [Tue, 10 Jan 2012 14:43:59 +0000 (16:43 +0200)]
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 the
complexities involved and of the quite interesting problem domain.

As I said, this is Work in Progress...

12 years agoAdd a few helper methods to resource event
Christos KK Loverdos [Tue, 10 Jan 2012 14:42:33 +0000 (16:42 +0200)]
Add a few helper methods to resource event

12 years agoDon't store the whole agreement to the user state
Georgios Gousios [Tue, 10 Jan 2012 14:28:33 +0000 (16:28 +0200)]
Don't store the whole agreement to the user state

Store a reference by name instead.

12 years agoCase objects instead of objects for cost policy definitions
Georgios Gousios [Tue, 10 Jan 2012 14:27:42 +0000 (16:27 +0200)]
Case objects instead of objects for cost policy definitions

12 years agoThe log string has 2 args, not 3
Georgios Gousios [Tue, 10 Jan 2012 13:27:51 +0000 (15:27 +0200)]
The log string has 2 args, not 3

12 years agoStore the newly created user actor in the LRU cache
Georgios Gousios [Tue, 10 Jan 2012 13:27:18 +0000 (15:27 +0200)]
Store the newly created user actor in the LRU cache

12 years agoUse the list of resources defined in the policy
Georgios Gousios [Tue, 10 Jan 2012 13:26:45 +0000 (15:26 +0200)]
Use the list of resources defined in the policy

12 years agoDo not use default global value parameter and take advantage of pattern case class...
Christos KK Loverdos [Tue, 10 Jan 2012 10:00:24 +0000 (12:00 +0200)]
Do not use default global value parameter and take advantage of pattern case class matching

12 years agoAugment DSLCostPolicy with utility methods
Christos KK Loverdos [Tue, 10 Jan 2012 09:59:01 +0000 (11:59 +0200)]
Augment DSLCostPolicy with utility methods

12 years agoRefactor getInstanceId to not rely on global variables
Christos KK Loverdos [Tue, 10 Jan 2012 09:34:10 +0000 (11:34 +0200)]
Refactor getInstanceId to not rely on global variables

12 years agoEquality is always a possibility
Christos KK Loverdos [Tue, 10 Jan 2012 09:10:49 +0000 (11:10 +0200)]
Equality is always a possibility

12 years agoCatch a message that is sent anyway
Christos KK Loverdos [Tue, 10 Jan 2012 09:01:27 +0000 (11:01 +0200)]
Catch a message that is sent anyway

12 years agoIgnore some auxilary latex files (emacs)
Christos KK Loverdos [Tue, 10 Jan 2012 01:10:34 +0000 (03:10 +0200)]
Ignore some auxilary latex files (emacs)

12 years agoImplementation experience
Georgios Gousios [Tue, 10 Jan 2012 07:56:26 +0000 (09:56 +0200)]
Implementation experience

12 years agoConsistent `Id` naming (II)
Christos KK Loverdos [Mon, 9 Jan 2012 16:09:14 +0000 (18:09 +0200)]
Consistent `Id` naming (II)

Forgot these cases when I refactored for the previosu commit.

12 years agoConsistent `Id` naming
Christos KK Loverdos [Mon, 9 Jan 2012 15:50:17 +0000 (17:50 +0200)]
Consistent `Id` naming

12 years agoStyle: do not use return
Christos KK Loverdos [Mon, 9 Jan 2012 15:47:42 +0000 (17:47 +0200)]
Style: do not use return

12 years agoFix a couple of compilation warnings.
Christos KK Loverdos [Mon, 9 Jan 2012 15:43:53 +0000 (17:43 +0200)]
Fix a couple of compilation warnings.

We still get the `head` though (via next), so the semantics are similar.

12 years agoWIP on user get balance request.
Christos KK Loverdos [Mon, 9 Jan 2012 15:37:47 +0000 (17:37 +0200)]
WIP on user get balance request.

Puting everything in line with the rest of the system implementation.

12 years agoFind previous wallet entries for this event
Georgios Gousios [Mon, 9 Jan 2012 15:17:27 +0000 (17:17 +0200)]
Find previous wallet entries for this event

12 years agoNames for fields in the Json representation of the msg
Georgios Gousios [Mon, 9 Jan 2012 15:16:10 +0000 (17:16 +0200)]
Names for fields in the Json representation of the msg

12 years agoSpice up WalletEntries with resource and instance info
Georgios Gousios [Mon, 9 Jan 2012 14:47:42 +0000 (16:47 +0200)]
Spice up WalletEntries with resource and instance info

12 years agoEliminate pattern matching since I am not doing anything with the specific cases
Christos KK Loverdos [Mon, 9 Jan 2012 14:48:28 +0000 (16:48 +0200)]
Eliminate pattern matching since I am not doing anything with the specific cases

12 years agoSmall refactoring to ensure user state
Christos KK Loverdos [Mon, 9 Jan 2012 14:46:59 +0000 (16:46 +0200)]
Small refactoring to ensure user state

12 years agoFill in and use UserState snapshots from DB.
Christos KK Loverdos [Mon, 9 Jan 2012 14:41:48 +0000 (16:41 +0200)]
Fill in and use UserState snapshots from DB.

12 years agoAdd documentation for store-related collections, give better names and fix a couple...
Christos KK Loverdos [Mon, 9 Jan 2012 14:03:38 +0000 (16:03 +0200)]
Add documentation for store-related collections, give better names and fix a couple of bugs

12 years agoTake into account active snapshot for timestamp computations
Christos KK Loverdos [Mon, 9 Jan 2012 13:46:35 +0000 (15:46 +0200)]
Take into account active snapshot for timestamp computations

12 years agoUse DEBUG shortcuts
Christos KK Loverdos [Mon, 9 Jan 2012 13:43:41 +0000 (15:43 +0200)]
Use DEBUG shortcuts

12 years agoHandle UserEvent in UserActor
Christos KK Loverdos [Mon, 9 Jan 2012 13:30:00 +0000 (15:30 +0200)]
Handle UserEvent in UserActor

12 years agoSmall doc addition for UserEvent
Christos KK Loverdos [Mon, 9 Jan 2012 13:28:02 +0000 (15:28 +0200)]
Small doc addition for UserEvent

12 years agoRemove unused subclasses of UserDataSnapshot
Christos KK Loverdos [Mon, 9 Jan 2012 13:17:09 +0000 (15:17 +0200)]
Remove unused subclasses of UserDataSnapshot

12 years agoCollection renaming a bug fix in UserState query
Christos KK Loverdos [Mon, 9 Jan 2012 13:10:24 +0000 (15:10 +0200)]
Collection renaming a bug fix in UserState query

12 years agoMake UserState roles immutable
Christos KK Loverdos [Mon, 9 Jan 2012 12:59:12 +0000 (14:59 +0200)]
Make UserState roles immutable

12 years agoAdd a few queries to UserEvent
Christos KK Loverdos [Mon, 9 Jan 2012 12:57:03 +0000 (14:57 +0200)]
Add a few queries to UserEvent

12 years agoForward UserState events to dispatcher
Christos KK Loverdos [Mon, 9 Jan 2012 12:47:40 +0000 (14:47 +0200)]
Forward UserState events to dispatcher

12 years agoMore tests => several errors fixed
Georgios Gousios [Mon, 9 Jan 2012 12:27:07 +0000 (14:27 +0200)]
More tests => several errors fixed

12 years agoAdd new discrete resource, test method to parse Maybe's
Georgios Gousios [Mon, 9 Jan 2012 12:25:02 +0000 (14:25 +0200)]
Add new discrete resource, test method to parse Maybe's

12 years agoMore precise error message
Georgios Gousios [Mon, 9 Jan 2012 12:24:21 +0000 (14:24 +0200)]
More precise error message

12 years agoCalculate hours, not minutes
Georgios Gousios [Mon, 9 Jan 2012 12:23:45 +0000 (14:23 +0200)]
Calculate hours, not minutes

12 years agoGenerify EventProcessorService to avoid too many casts
Christos KK Loverdos [Mon, 9 Jan 2012 12:41:41 +0000 (14:41 +0200)]
Generify EventProcessorService to avoid too many casts

12 years agoUse UserDataSnapshotException
Christos KK Loverdos [Mon, 9 Jan 2012 12:29:22 +0000 (14:29 +0200)]
Use UserDataSnapshotException

12 years agoRefactor user state change code
Christos KK Loverdos [Mon, 9 Jan 2012 11:38:15 +0000 (13:38 +0200)]
Refactor user state change code

12 years agoSome text on Aquarium requirements and benchmarking
Georgios Gousios [Sun, 8 Jan 2012 19:20:35 +0000 (21:20 +0200)]
Some text on Aquarium requirements and benchmarking

12 years agoAccounting changes, too many to commit individually:
Georgios Gousios [Thu, 5 Jan 2012 14:15:56 +0000 (16:15 +0200)]
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 contain
all resource state storage conventions into it.
-Implement the cost policy algorithms in the accounting method.
Separate accounting for complex/simple resources
-Docs++

12 years agoRemove wrong test
Georgios Gousios [Thu, 5 Jan 2012 12:58:36 +0000 (14:58 +0200)]
Remove wrong test

12 years agoCorrect unit names
Georgios Gousios [Thu, 5 Jan 2012 12:41:06 +0000 (14:41 +0200)]
Correct unit names

12 years agoConvert a timeslot to its duration in hours
Georgios Gousios [Thu, 5 Jan 2012 12:40:40 +0000 (14:40 +0200)]
Convert a timeslot to its duration in hours

12 years agoStates for discrete cost policy events
Georgios Gousios [Thu, 5 Jan 2012 12:40:20 +0000 (14:40 +0200)]
States for discrete cost policy events

12 years agoStricted definitions and explantations for cost policies
Georgios Gousios [Thu, 5 Jan 2012 08:53:11 +0000 (10:53 +0200)]
Stricted definitions and explantations for cost policies

12 years agoSkeleton for the Aquarium architectural description
Georgios Gousios [Wed, 4 Jan 2012 12:44:05 +0000 (14:44 +0200)]
Skeleton for the Aquarium architectural description

12 years agoRemove the resource state API, start using the new accounting code
Georgios Gousios [Wed, 4 Jan 2012 12:05:03 +0000 (14:05 +0200)]
Remove the resource state API, start using the new accounting code

12 years agoPurify the accounting code
Georgios Gousios [Wed, 4 Jan 2012 12:04:28 +0000 (14:04 +0200)]
Purify the accounting code

-All required resource state passed as params
-Charge chunks exposed as top level entity

12 years agoSupport for user configurable accounting policy locations
Georgios Gousios [Wed, 4 Jan 2012 09:21:42 +0000 (11:21 +0200)]
Support for user configurable accounting policy locations

12 years agoMake the number of MongoDB connections a configurable property
Georgios Gousios [Wed, 4 Jan 2012 07:16:22 +0000 (09:16 +0200)]
Make the number of MongoDB connections a configurable property

12 years agoVarious performance related changes
Georgios Gousios [Tue, 3 Jan 2012 15:56:30 +0000 (17:56 +0200)]
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

12 years agoCreate a new connection per store request
Georgios Gousios [Tue, 3 Jan 2012 15:53:58 +0000 (17:53 +0200)]
Create a new connection per store request

This is to take advantage of the Mongo driver connection pool

12 years agoLogging format similar to Akka's default
Georgios Gousios [Tue, 3 Jan 2012 15:52:44 +0000 (17:52 +0200)]
Logging format similar to Akka's default

12 years agoImplement the remaining bits of the user event processor service
Georgios Gousios [Tue, 3 Jan 2012 13:36:56 +0000 (15:36 +0200)]
Implement the remaining bits of the user event processor service

12 years agoImplement the user event store
Georgios Gousios [Tue, 3 Jan 2012 13:36:20 +0000 (15:36 +0200)]
Implement the user event store

12 years agoMake the load balancing managers regular objects. Docs++
Georgios Gousios [Tue, 3 Jan 2012 12:09:09 +0000 (14:09 +0200)]
Make the load balancing managers regular objects. Docs++

12 years agoFirst attempt to make the resource processor service abstract
Georgios Gousios [Tue, 3 Jan 2012 11:26:49 +0000 (13:26 +0200)]
First attempt to make the resource processor service abstract

12 years agoHelper method to immutably set the receive timestamp
Georgios Gousios [Tue, 3 Jan 2012 11:24:52 +0000 (13:24 +0200)]
Helper method to immutably set the receive timestamp

12 years agoForward messages to the dispatcher after ACK
Georgios Gousios [Tue, 3 Jan 2012 10:05:19 +0000 (12:05 +0200)]
Forward messages to the dispatcher after ACK

12 years agoChange update style to use copy on immutable data
Christos KK Loverdos [Mon, 2 Jan 2012 20:54:59 +0000 (22:54 +0200)]
Change update style to use copy on immutable data

12 years agoCorrect documentation
Christos KK Loverdos [Mon, 2 Jan 2012 17:59:55 +0000 (19:59 +0200)]
Correct documentation

12 years agoMerge with my changes for user state handling.
Christos KK Loverdos [Mon, 2 Jan 2012 16:32:51 +0000 (18:32 +0200)]
Merge with my changes for user state handling.

I have also recreated ResourceNames and ResourceType (why were they
deleted?), as they are crucial for the polymorphic user state calculation
and the resource event type and name specifications.

User state is updated *immutably* everywhere and every resource type
knows exactly which part(s) of the UserState to update.

There is still work to be done though, so this is work in progress.

Conflicts:
src/main/scala/gr/grnet/aquarium/logic/events/ResourceEvent.scala
src/main/scala/gr/grnet/aquarium/logic/events/ResourceNames.scala
src/main/scala/gr/grnet/aquarium/logic/events/ResourceType.scala
src/main/scala/gr/grnet/aquarium/user/UserDataSnapshot.scala
src/main/scala/gr/grnet/aquarium/user/actor/UserActor.scala

12 years agoCalculate user state from resource events (wip).
Christos KK Loverdos [Mon, 2 Jan 2012 16:10:15 +0000 (18:10 +0200)]
Calculate user state from resource events (wip).

12 years agoMessages and API for accessing resource state per actor
Georgios Gousios [Mon, 2 Jan 2012 15:29:27 +0000 (17:29 +0200)]
Messages and API for accessing resource state per actor

12 years agoValidate presence of descriminator field in complex resource events
Georgios Gousios [Mon, 2 Jan 2012 12:15:42 +0000 (14:15 +0200)]
Validate presence of descriminator field in complex resource events

12 years agoResource names should only be specified in the DSL
Georgios Gousios [Mon, 2 Jan 2012 12:07:48 +0000 (14:07 +0200)]
Resource names should only be specified in the DSL

12 years agoAdd DSL field to describe different instances for complex resources
Georgios Gousios [Mon, 2 Jan 2012 12:06:55 +0000 (14:06 +0200)]
Add DSL field to describe different instances for complex resources

12 years agoMore consistent naming for resource(type)s
Christos KK Loverdos [Mon, 2 Jan 2012 08:49:11 +0000 (10:49 +0200)]
More consistent naming for resource(type)s

12 years agoCodify resource event types.
Christos KK Loverdos [Mon, 2 Jan 2012 08:05:49 +0000 (10:05 +0200)]
Codify resource event types.

These must be constant across the whole platform.

12 years agoFix compilation error
Christos KK Loverdos [Mon, 2 Jan 2012 08:04:24 +0000 (10:04 +0200)]
Fix compilation error

12 years agoDocument xml support
Christos KK Loverdos [Thu, 29 Dec 2011 14:42:07 +0000 (16:42 +0200)]
Document xml support

12 years agoDocument json support
Christos KK Loverdos [Thu, 29 Dec 2011 14:39:26 +0000 (16:39 +0200)]
Document json support

12 years agoConsolidating timestamps.
Christos KK Loverdos [Thu, 29 Dec 2011 14:34:08 +0000 (16:34 +0200)]
Consolidating timestamps.

I believe aqTimestamp was semantically the same as receivedMillis.
This value will be properly provided and it should not be a var anyway.

12 years agoAdd one more timestamp to resource event that denotes the reception time.
Christos KK Loverdos [Thu, 29 Dec 2011 14:22:11 +0000 (16:22 +0200)]
Add one more timestamp to resource event that denotes the reception time.

12 years agoRefactor to accomodate MasterConf rename
Christos KK Loverdos [Thu, 29 Dec 2011 13:17:58 +0000 (15:17 +0200)]
Refactor to accomodate MasterConf rename

12 years agoRename the store to better reflect the domain objects
Christos KK Loverdos [Thu, 29 Dec 2011 12:53:41 +0000 (14:53 +0200)]
Rename the store to better reflect the domain objects

12 years agoRename MongoDB collection to comply with the RabbitMQ key name
Christos KK Loverdos [Thu, 29 Dec 2011 12:45:21 +0000 (14:45 +0200)]
Rename MongoDB collection to comply with the RabbitMQ key name

12 years agoMore MongoDB query refactoring
Christos KK Loverdos [Thu, 29 Dec 2011 12:39:21 +0000 (14:39 +0200)]
More MongoDB query refactoring