PLASMA Programming Language

PLASMA is a declerative programming languages. Programmers can define elasticity rules for an AEON applications. Here we would like to introduce the usage of PLASMA programming language.

Programming Model

A PLASMA program consists of multiple independent elasticity rules. A single elasticity rule includes two parts: (i) condition(s); and (ii) elasticity behaviors. The runtime will execute the elasticity behaviors when the condition(s) are satisfied.

Programming Language Syntax

plasma-syntax

Conditions

There are three types of conditions in the elasticity rules:

  1. Resource usage of servers: e.g., server.cpu > 80
  2. Message count of actors: e.g., Actor1(a).call(Actor2(b)).count > 1000
  3. Semantics relationship between actors: e.g., Actor1(a) in ref(Actor2(b).children)

Behaviors

There are five types of behaviors in the elasticity rules:

  1. balance: prompts the runtime to balance the workload on each server by migrating actors of given types from overloaded servers to ones with idle resources.
  2. reserve: instructs the runtime to keep those actors on dedicated servers exclusively, whose resources are sufficient to meet the actors’ demands.
  3. colocate: tells the runtime to keep the concerned actors on the same server.
  4. separate: instructs the runtime to keep the actors of the two types separated.
  5. pin: indicates that particular actors should not be moved.