Holo Demo Scenario
@sqykly is working on a "good first demo" in Holochain. Here is the rough scenario:
A cast of agents: -- Al, who runs "Al's Apple Farm". -- Bea, who runs "Bea's Beans". -- Chloe, who runs "Cloe's Coffee".
The story: -- Al has picked 100 apples. -- Bea has gathered 2 kg of beans. -- Chloe owns 300 mL of coffee (beginning balance). -- At that exact moment, Al arrives with 3 apples. He gives them to Chloe, Chloe receives them. -- In exchange, Chloe gives Al a 300 mL cup of coffee. Al receives it. -- Chloe consumes 3 apples to bake 1 turnover. -- Bea wants the 1 turnover in exchange for 1/2 kg of her beans. See above for how that works. -- Chloe consumes those beans to brew 1000 mL of coffee
The idea for the demo is to enter the data at each step and be able to see inventory (or a primitive balance sheet) for each agent at each step.
I'd like to define this out in more detail here. Partly this is to contribute to the current discussions on transfers. Partly this is to better define this scenario in VF terms with expected outputs.
Al has picked 100 apples.
Process: -- id: 123 -- name: Pick apples EconomicEvent: -- id: 1 -- action: produce -- outputOf: Process 123 -- provider: Al -- receiver: Al -- affectedQuantity: ---- numericValue: 100 ---- unit: Count -- observedTime: 2018-10-10 -- affects: EconomicResource 1 EconomicResource: -- id: 1 -- resourceClassifiedAs: Apple -- currentQuantity: ---- numericValue: 100 ---- unit: Count
Bea has gathered 2 kg of beans.
Process: -- id: 456 -- name: Gather coffee beans EconomicEvent: -- id: 5 -- action: produce -- outputOf: Process 456 -- provider: Bea -- receiver: Bea -- affectedQuantity: ---- numericValue: 2 ---- unit: kg -- observedTime: 2018-11-11 -- affects: EconomicResource 5 EconomicResource: -- id: 5 -- resourceClassifiedAs: Coffee beans -- currentQuantity: ---- numericValue: 2 ---- unit: kg
Chloe owns 300 mL of coffee (beginning balance).
EconomicEvent: -- id: 10 -- action: adjust -- provider: Cloe -- receiver: Cloe -- affectedQuantity: ---- numericValue: 300 ---- unit: mL -- observedTime: 2018-11-20 -- affects: EconomicResource 10 EconomicResource: -- id: 10 -- resourceClassifiedAs: Coffee -- currentQuantity: ---- numericValue: 300 ---- unit: mL
Inventory
Al: 100 Apple Bea: 2 kg Coffee beans Cloe: 300 mL Coffee
Al arrives with 3 apples. He gives them to Chloe, Chloe receives them.
Transfer: -- id: 2 EconomicEvent: -- id: 30 -- action: give -- provider: Al -- receiver: Cloe -- affectedQuantity: ---- numericValue: 3 ---- unit: Count -- observedTime: 2018-11-20 -- affects: EconomicResource 1 (currentQuantity now 97) -- inputOf: Transfer 2 EconomicEvent: -- id: 31 -- action: receive -- provider: Al -- receiver: Cloe -- affectedQuantity: ---- numericValue: 3 ---- unit: Count -- observedTime: 2018-11-20 -- affects: EconomicResource 30 -- outputOf: Transfer 2 EconomicResource: -- id: 30 -- resourceClassifiedAs: Apple -- currentQuantity: ---- numericValue: 3 ---- unit: Count
Inventory
Al: 97 Apple Bea: 2 kg Coffee beans Cloe: 300 mL Coffee, 3 Apple
Chloe gives Al a 300 mL cup of coffee. Al receives it.
Transfer: -- id: 3 EconomicEvent: -- id: 33 -- action: give -- provider: Cloe -- receiver: Al -- affectedQuantity: ---- numericValue: 300 ---- unit: mL -- observedTime: 2018-11-20 -- affects: EconomicResource 10 (currentQuantity now 0) -- inputOf: Transfer 3 EconomicEvent: -- id: 34 -- action: receive -- provider: Cloe -- receiver: Al -- affectedQuantity: ---- numericValue: 300 ---- unit: mL -- observedTime: 2018-11-20 -- affects: EconomicResource 34 -- outputOf: Transfer 3 EconomicResource: -- id: 34 -- resourceClassifiedAs: Coffee -- currentQuantity: ---- numericValue: 300 ---- unit: mL
Inventory
Al: 97 Apple, 300 mL Coffee Bea: 2 kg Coffee beans Cloe: 0 mL Coffee, 3 Apple
Chloe consumes 3 apples to bake 1 turnover
Process: -- id: 789 -- name: Bake turnover EconomicEvent: -- id: 50 -- action: consume -- inputOf: Process 789 -- provider: Cloe -- receiver: Cloe -- affectedQuantity: ---- numericValue: 3 ---- unit: Count -- observedTime: 2018-12-01 -- affects: EconomicResource 30 (currentQuantity now 0) EconomicEvent: -- id: 51 -- action: produce -- outputOf: Process 789 -- provider: Cloe -- receiver: Cloe -- affectedQuantity: ---- numericValue: 1 ---- unit: Count -- observedTime: 2018-12-01 -- affects: EconomicResource 55 EconomicResource: -- id: 55 -- resourceClassifiedAs: Apple turnover -- currentQuantity: ---- numericValue: 1 ---- unit: Count
Inventory
Al: 97 Apple, 300 mL Coffee Bea: 2 kg Coffee beans Cloe: 0 mL Coffee, 0 Apple, 1 Apple turnover
Cloe gives Bea the 1 turnover
Transfer: -- id: 5 EconomicEvent: -- id: 60 -- action: give -- provider: Cloe -- receiver: Bea -- affectedQuantity: ---- numericValue: 1 ---- unit: Count -- observedTime: 2018-12-02 -- affects: EconomicResource 55 (currentQuantity now 0) -- inputOf: Transfer 5 EconomicEvent: -- id: 61 -- action: receive -- provider: Cloe -- receiver: Bea -- affectedQuantity: ---- numericValue: 1 ---- unit: Count -- observedTime: 2018-12-02 -- affects: EconomicResource 60 -- outputOf: Transfer 5 EconomicResource: -- id: 60 -- resourceClassifiedAs: Apple turnover -- currentQuantity: ---- numericValue: 1 ---- unit: Count
Bea gives Cloe 1/2 kg of her beans
Transfer: -- id: 5 EconomicEvent: -- id: 60 -- action: give -- provider: Bea -- receiver: Cloe -- affectedQuantity: ---- numericValue: .5 ---- unit: kg -- observedTime: 2018-12-02 -- affects: EconomicResource 5 (currentQuantity now 1.5) -- inputOf: Transfer 5 EconomicEvent: -- id: 61 -- action: receive -- provider: Cloe -- receiver: Bea -- affectedQuantity: ---- numericValue: 1 ---- unit: Count -- observedTime: 2018-12-02 -- affects: EconomicResource 60 -- outputOf: Transfer 5 EconomicResource: -- id: 60 -- resourceClassifiedAs: Coffee beans -- currentQuantity: ---- numericValue: .5 ---- unit: kg
Inventory
Al: 97 Apple, 300 mL Coffee Bea: 1.5 kg Coffee beans, 1 Apple turnover Cloe: 0 mL Coffee, 0 Apple, 0 Apple turnover, .5 kg Coffee beans
Chloe consumes those beans to brew 1000 mL of coffee
Process: -- id: 987 -- name: Brew coffee EconomicEvent: -- id: 70 -- action: consume -- inputOf: Process 987 -- provider: Cloe -- receiver: Cloe -- affectedQuantity: ---- numericValue: .5 ---- unit: kg -- observedTime: 2018-12-15 -- affects: EconomicResource 60 (currentQuantity now 0) EconomicEvent: -- id: 71 -- action: produce -- outputOf: Process 987 -- provider: Cloe -- receiver: Cloe -- affectedQuantity: ---- numericValue: 1000 ---- unit: mL -- observedTime: 2018-12-15 -- affects: EconomicResource 10 (currentQuantity now 1000)
Inventory
Al: 97 Apple, 300 mL Coffee Bea: 1.5 kg Coffee beans, 1 Apple turnover Cloe: 1000 mL Coffee, 0 Apple, 0 Apple turnover, 0 kg Coffee beans