summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-02 01:46:34 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-02 01:46:34 +0100 |
commit | 71c2f729208cecb039e2bd753a50b55c2788f2d0 (patch) | |
tree | a0905159ccb3cce53419dbe48457951245af9559 /other/db_bounty.txt | |
parent | a81ff643a823dde57ebd0ed5da8a91fb75d32267 (diff) |
Bounties?
Somehow, Dialyzer does not see the type issues with
src/bounty/bnt_join_battle.erl, but there are btl_character and
rst_character mix-ups.
Diffstat (limited to 'other/db_bounty.txt')
-rw-r--r-- | other/db_bounty.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/other/db_bounty.txt b/other/db_bounty.txt new file mode 100644 index 0000000..d31226a --- /dev/null +++ b/other/db_bounty.txt @@ -0,0 +1,18 @@ +Designing with a "it can crash at any point" mentality ++ can't combine DB queries in an atomic manner += Potential for partially completed tasks, "corrupting" the global DB. + +A solution could be having "bounty" entries, which work as follows: +A process P0 needs to do tasks T0, then T1, then T2. +P0 creates a bounty B0: +{ + not_before: 60s. + task: T0_T1_T2. + params: [{T0.id, T1.id, 20] +} +P0 adds B0 to the Bounty DB. +P0 attempts T0, T1, and T2. +P0 removes B0 from the Bounty DB. + +There are other processes trying to access available bounties (i.e. bounties +for which the "not_before" has expired) to complete them. |