Coder Social home page Coder Social logo

forkkit / aquavm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fluencelabs/aquavm

0.0 1.0 0.0 6.31 MB

Aquamarine is a distributed choreography language & platform

License: Apache License 2.0

Rust 96.28% Clojure 1.63% Shell 0.13% JavaScript 0.02% PowerShell 0.12% TypeScript 1.81%

aquavm's Introduction

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

aquavm's People

Contributors

alari avatar coder11 avatar dependabot[bot] avatar diemyst avatar folex avatar justprosh avatar mikevoronov avatar valeryantopol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.