In the "Coffee with Blockchain" app produced by IBM, it performs price matching between Growers and Buyers. I'm wondering how that matching would be implemented (either in the example app or in an actual implementation).
Example of the app can be seen here:
How does "Coffee with Blockchain" match growers to buyers?
Some questions to help guide the answer:
Does that matching operate entirely as chaincode? If so, how would that be implemented?
Eg, would the Grower submit a transaction that they have a new batch of beans ready for shipment and that triggers the match-making part in the chaincode to find/choose a Buyer?
I have my doubts on making that process deterministic, otherwise, a grower's new batch announcement fails and they'd have to retry. Perhaps there's a different way of doing so in chaincode?
Or does the matching operate outside of the chaincode, listening for updates in the ledger, and instead it calls the API to invoke a chaincode method to transfer the beans from Grower-A to Buyer-B?
My doubt on that though is the matching is then centralized to some trusted provider, rather than validated/endorsed chaincode.
Thanks