Unikernel
Full-Stack
Erlang
Maxim Sokhatsky
@5HT
slid.es/maximsokhatsky/exe

Synrc Research Center
​coda
​prelude
intermission
N2O,KVS,BPE and Erlang System Description
Calculus of Inductive Constructions and Action Semigroup
Properties of Replicated Chain Storage, etc.
intro
OSI and Unikernels
OSI Stack
Unikernels
Lisp Machines
Smalltalk-80
Singularity
MirageOS
HaLVM
LING
OSv
netbsd/rump
Voxoz  Synrc  Spawnproc
N2O 1.2K
KVS 1.2K
SHEN 220
NITRO 2.6K
MQS 288
BPE 625
FORMS 290
UPL 6K
LDAP 730
XA 2.2K
MAD 1K
FS 190
ACT 175
VZ 200
* — Lines of code
Lean/HoTT 10K
Prelude
CiC
 Axiom> ⊦ * : □

    R1> ⊦ * ↝ * : * 
    R2> ⊦ □ ↝ * : *
    R3> ⊦ * ↝ □ : □ 
    R4> ⊦ □ ↝ □ : □
λ,FΛ,Fω,∏ : System
∀ := Π x:A, B x
∃ := Σ x:A, B x
∧ := +
∨ := *
U := Prop : Type.{1} : Type.{2} ...
// *⟶*,a:A ⤂ f a
// rec induction
// rec coinduction
// <a:A,b:B a>
record app (P S : Type) :=
       (action  : P → S → S)​
       (spawn   : P → S)
       (run     : S → P)
action — effect handler
     P — protocol
     S — state
Semigroup Action
Π,Σprovers
F*
Coq
Idris
Lean
Agda
CoInductive Structures, Type Classes
Polymorphic Stuctures, Type Classes
Type Classes
Type Classes
Type Classes, CoInductive Structures
Types and Effects
exception : rise
       io : read, write
    state : get, put
     comm : send, recv
      rnd : next
(action  : P → Eff P )​
Effects Encoding
Matija Pretnar
Gordon Plotkin
Andrej Bauer
eff-lang.org
Extensible Effects: an alternative to Monad Transformers
Oleg Kiselyov 
idris-lang.org
Edwin Brady
Linearizability
Transaction Logs
Chain Replication
Time Debugger
Statistics

Composing and Pipelining
Exe Model
Lean Network Proof
λ {A: Type.{1}}
  (a: A), a
1 #NS 0 A
2 #NS 1 a
1 #US 0
1 #ES 1
2 #EV 0
3 #EL #BD 2 2 2
4 #EL #BI 1 1 3
Notable:
Morte.Turtorial

Intermission
Intermission
definition ids   := option N
record container := (top: ids) (size: N)
record iterator  := (id: ids)
                    (next: ids) (prev: ids) 
Effects Persistence
Storage
record kv :=
       (get:   iterator → kvs)
       (put:   iterator → kvs)
       (index: iterator → kvs)
      record store extends app kvs container :=
             (sup: list container)
             (tab: list table)
             (tx:  iterator → container → container)
definition kvs := add + remove + reduce +
                  ok  + error  + io
Process
FS2
A scalaz-stream combinator library for Apache Camel, Akka Persistence and Akka Stream
Erlang
Open-source telecommunication platform created in Ericsson.
record task  := (name: string)
record event := (name: string)
record flow  := (source: task) (target: task)
record process extends iterator :=
       (env: list iterator)
       (tax: prod (prod (list task) (list flow))
                  (list event))

record proc extends app bpe process :=
       (sup: list process)
Specification
​Coda
Full-Stack Erlang
N2O Protocol
KVS
Packet Commands Transactions

> mnesia:activity(transaction, fun() ->
     kvs:append(#user{id=
     kvs:next_id("user",1)}) end).

[{get,container,_},
 {get,top,_},
 {put,iterator,_},
 {put,prev,_},
 {put,next,_},
 {put,container,_}].

KVS
> kvs:config(user).

[#in{l=902, r=infinity, name=user6, last=user2},
 #in{l=704, r=901,      name=user5, last=user2},
 #in{l=502, r=703,      name=user4, last=user2},
 #in{l=301, r=501,      name=user3, last=user},
 #in{l=200, r=300,      name=user2, last=user},
 #in{l=1,   r=199,      name=user,  last=user}]​
Chain Consistency
Link Atomic Txs
Record Versioning
Table Rotation
Distributed XA

N2O/BPE DSL
N2O Remote
BPE BPMN2

Exe Environment

By Maxim Sokhatsky

Exe Environment

  • 3,847