Asynchronous Message Passing
Asynchronous message passing is a communication model where a sender transmits a message and continues its execution without waiting for an immediate response. In the context of sharded blockchains, this is often the only viable way to handle cross-shard communication due to the high latency of waiting for consensus across independent partitions.
When a derivative trade is initiated on one shard, it sends a message to the collateral shard and continues to process other trades. The collateral shard processes the request and sends a message back to confirm the update.
This design allows for higher throughput but introduces the need for robust handling of pending states and potential failures. Developers must implement mechanisms to track the status of these messages and ensure that the system can recover if a message is lost or a shard fails.
It requires a more complex application logic compared to synchronous systems but is essential for scaling to global levels. By decoupling the execution of different shards, the system becomes more resilient and capable of handling a larger volume of transactions.
It is a fundamental pattern for building scalable, distributed financial infrastructure.