This database is used to store and retrieve the capacity and information of the trading desk to operate in the exchange (with the current asset).
This database can be implemented without a proper durable mechanism, but with a memory storage such as Infinispan, since it will be heavily accessed but the information contained there can be (must be) derived, roughly:
Deposited initial amount + Favourable trades - Lost trades - commissions = Current
Current - Assets bought - Margin (requirements for holding current assets) = Available
A derivation thread can perform these computations and store them so that any connector node can access this information to allow or deny orders.
Same as issues #18 and #28 , I close the issue. If further updates are necessary to the confirmed trades database mechanism, a new issue must be opened.
This database is used to store and retrieve the capacity and information of the trading desk to operate in the exchange (with the current asset).
This database can be implemented without a proper durable mechanism, but with a memory storage such as Infinispan, since it will be heavily accessed but the information contained there can be (must be) derived, roughly: Deposited initial amount + Favourable trades - Lost trades - commissions = Current Current - Assets bought - Margin (requirements for holding current assets) = Available
A derivation thread can perform these computations and store them so that any connector node can access this information to allow or deny orders.