Go to file
2021-12-15 12:46:09 +03:00
.cargo Fix a bug on json path on empty stream (#133) 2021-08-26 15:01:58 +03:00
.circleci use nightly-2021-07-13 (#131) 2021-08-24 16:43:17 +03:00
.github/workflows Update crate info; housekeeping (#153) 2021-10-05 20:08:10 +03:00
air Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
air-interpreter Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
avm bump fluence-faas version (#193) 2021-12-14 14:01:57 +03:00
crates Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
images Update images in readme (#44) 2020-12-21 18:27:21 +03:00
.gitignore Rename Aqua to AIR, move AVM from FCE (#99) 2021-05-10 14:25:34 +03:00
Cargo.lock Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
Cargo.toml Deduplicate SecuityTetraplet with marine-rs-sdk (#164) 2021-11-04 16:59:05 +03:00
CHANGELOG.md Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
Config.toml Rename Aqua to AIR, move AVM from FCE (#99) 2021-05-10 14:25:34 +03:00
LICENSE Initial commit 2020-09-18 14:05:43 +03:00
README.md Fix badge link (#111) 2021-06-02 14:04:41 +03:00

crates.io version npm version

Aquamarine

  • composability medium
  • allows developers to express network choreography in a script
  • moves script & data from peer to peer in a single-use logical network with checking merkle proofs and signatures.

aquamarine scheme


Fluence stack

Fluence nodes uses AIR to coordinate requests between different services run by Marine:


aquamarine scheme


Aquamarine Intermediate Representation

AIR: What is it?

  • S-expression-based low-level language
  • Controls Fluence network and its peers
  • Inspired by WAT (WebAssembly Text Format)
  • Meant to be a compile target
  • Development meant to happen in a higher-level language
  • Syntax is in flux, will change

Scripts written in AIR look like this:

fold example
  1. Gather chat members by calling chat.members
  2. Iterate through elements in members array, m = element
  3. Each m is an object, represented as array; [0] is the first field
  4. (next m) triggers next iteration

AIR: Instructions

call: execution

call structure
  • call commands the execution
  • moves execution to a peer, specified by location
  • peer is expected to have specified WASM service
  • the service must have specified function available to be called
  • argument list is given to the function
  • result of the function is saved and available under output name
  • example call could be thought of as data.result = dht.put(key, value)

seq: sequential

seq structure
  • seq takes two instructions
  • executes them sequentially

par: parallel

par structure
  • par takes two instructions
  • executes them in parallel

fold: iteration

fold structure
  • fold takes an array, a variable and an instruction
  • iterates through the array, assigning each element to the variable
  • on each iteration instruction is executed
  • instruction can read the variable
  • next triggers next iteration

xor: branching & error handling

xor structure
  • xor takes two instructions
  • iff first instruction fails, second one is executed

null

null structure
  • null takes no arguments
  • does nothing, useful for code generation