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
Conditions
There are three types of conditions in the elasticity rules:
- Resource usage of servers: e.g.,
server.cpu > 80
- Message count of actors: e.g.,
Actor1(a).call(Actor2(b)).count > 1000
- Semantics relationship between actors: e.g.,
Actor1(a) in ref(Actor2(b).children)
Behaviors
There are five types of behaviors in the elasticity rules:
- 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.
- reserve: instructs the runtime to keep those actors on dedicated servers exclusively, whose resources are sufficient to meet the actors’ demands.
- colocate: tells the runtime to keep the concerned actors on the same server.
- separate: instructs the runtime to keep the actors of the two types separated.
- pin: indicates that particular actors should not be moved.