1. A method of performing a transaction in a distributed system, the method comprising: providing a first command and a second command that define functions to be performed in the transaction, wherein the first command further defines a dependency; holding the first command in a waiting state until the dependency is satisfied; prioritizing the first command and second command; and executing the first command and the second command in an order based at least in part on the prioritization.