Rust Async Runtime

Rust Async Runtime

Priority

MUST

Type of change request

FEATURE

Epic link



Status

DONE

Target release

0.1.0



Vision: Asynchronous programming in highly I\O application like `Iroha` should give better utilization of hardware resources. Async runtimes can give better performance and some OOB functionality for futures handling.

Functional details: Rust provides an ability (via `futures` crate) to abstract over futures executing runtime.

Environmental objectives: None

Changelog 

#

Change description

Affected component

Change motivation

#

Change description

Affected component

Change motivation

1

Async-std was introduced for several modules

`Kura`, `WSV`

Start using of async programming in Iroha



Research strategy

#

Research activity

Details

Acceptance criteria

Responsible (accepter) 

#

Research activity

Details

Acceptance criteria

Responsible (accepter) 

1

Reading of Tokio vs Async-Std articles

Important aspects that were identified: 

  • async-std has a safer layer of abstraction

  • a lot of old libraries heavily depends on tokio

  • overhead (lower is better)

  • OOB functionality (contains what we need)

  • promising future (what runtime can become standard choice in a year)

@Nikita Puzankov

Egor Ivkov

2

https://github.com/eadventurous/async-runtimes-cmp

Comparison of runtimes with sync approach

  • time (lower is better)

Egor Ivkov