-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcards.htm
More file actions
276 lines (235 loc) · 7.49 KB
/
cards.htm
File metadata and controls
276 lines (235 loc) · 7.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Maxim Sokhatsky" />
<title>APP STACK</title>
<link rel="stylesheet" href="5HT.css" />
</head>
<body>
<div class=menu>
<a href="index.html">articles</a>
</div>
<hr>
<div class="app">
<center><h1>Erlang Application Stack<br> for LING and<br>Unikernel Environments</h1>
<h4>Maxim Sokhatsky<br>maxim@synrc.com<br>Synrc Research Center s.r.o.</h4></center>
<br><br>
<p><b>Pure and Simple</b>. This site is dedicated to full stack
Erlang applications: SLICE, VXZ, N2O, KVS, SHEN, REST, MAD, BPE, MQS, FORMS, UPL. They
provide you services such as provisioning instances, development
tools, frameworks, business engines and languages.</p>
<p><b>Minimal and Effective</b>. Because everything is so small
that can fit your old FD, everything is also fast. We tried to
keep number of levels and operability points as small as possible,
keeping in mind the full stack of application.</p>
<p><b>Unikernel Based</b>. This stack can be provisioned in
Erlang Xen containers under LING. So you can run full stack
in Xen (without OS) or in posix modes. Also all aplications could be
shipped as a single-file bundle which is able to run in
Windows, Linux and Mac environments with LING or BEAM virtual machine.</p>
<p><center>Picture 1. Synrc Application Stack</center><br>
<img src="img/SynrcStack.svg" width=700>
</p>
<br><br><br>
<h1>N2O Application Server</h1>
<p>N2O provides a microcore based on chain of handlers applied to each websocket request.
It also provide core services such as ETS-based expirable sessions, error formatting and logging,
term pickling, message queue service and others. The most comprehensive part is
the complete set of HTML elements. The JavaScript issuing withing IO protocol
messages #wire and #js could be extended with <b>shen</b> JavaScript-subset language.</p>
</div>
<div class=code>
<div id=left style="width:35%;float:left;">
<div style="width:45%;height:500px;float:left;">
<h2 style="text-align:right;margin-right:20px;">n2o</h2>
</div>
<div id=api style="width:48%;height:500px;float:left;">
<h2>api</h2>
<code style="font-size:11pt;">update(Name,Render)
insert_top(Name,Render)
insert_bottom(Name,Render)
insert_before(Name,Render)
insert_after(Name,Render)
remove(Name)
wire(Wiring)
async(Name,Fun)
flush(Name)
pickle(Term)
depickle(Binary)
session(Key)
session(Key,Term)
user()
user(User)
send(Name,Term)
reg(Name,Term)
unreg(Name)
q(Name)
qc(Name)
qp(Name)
Module:event(init)
Module:event(Parameters)
Module:event(terminate)
</code>
</div>
<div style="width:45%;height:400px;float:left;">
<h2 style="text-align:right;margin-right:20px;">n2o</h2>
</div>
<div id=protocol style="width:48%;height:400px;float:left;">
<h2>protocol</h2>
<code style="font-size:11pt;">{io,Eval,Data}
PING
PONG
N2O
{client,Data}
{server,Data}
{bin,Data}
{binary,_,_,_,_,_,_,_,_,_,_}
{pickle,_,_,_}
{ev,_,_,_,_}
</code>
</div>
</div>
<div id=right style="width:40%;float:left;">
<div style="width:45%;height:320px;float:left;">
<h2 style="text-align:right;margin-right:20px;">n2o</h2>
</div>
<div style="width:48%;height:320px;float:left;">
<h2>core</h2>
<code style="font-size:11pt;">#handler{name,module,config,state}
#ev{module,msg,trigger,name}
#cx{handlers,actions,req,module,lang,path,
session,params,form,state}
#element{}
#action{}
#wire{?ACTION}
#api{?ACTION,name,tag,delegate}
#event{?ACTION,type,postback, delegate}
#alert{?ACTION,text}
#confirm{?ACTION,text,postback,delegate}
#jq{?ACTION,property,method,args,right,format="~s"}
#transfer{?ACTION,state,events}
</code>
</div>
<div style="width:45%;height:600px;float:left;">
<h2 style="text-align:right;margin-right:20px;">n2o</h2>
</div>
<div style="width:48%;height:600px;float:left;">
<h2>elements</h2>
<code style="font-size:11pt;">area,audio,blockquote,button,canvas,checkbox,
col,colgroup,color,command,date,datetime,
datetime_local,del,details,dropdown,dtl,
email,embed,fieldset,file,form,hidden,html,
iframe,image,input,input_button,input_image,
input_time,ins,keygen,label,legend,li,link,
list,literal,map,menu,meta,meta_base,meta_link,
meter,month,number,object,output,panel,param,
password,progress,q,radio,radiogroup,range,reset,
script,search,select,source,style,submit,
summary,table,td,tel,textarea,textbox,th,time,
tr,track,url,video,week</code>
</div>
</div> <!-- right -->
<!--/div> <!-- code -->
<div class="app">
<h1>KVS Abstract Term Database</h1>
<p>KVS provides a simple database conectivity for various
database backends. It allows you to store linked lists and
to make any record foldable.
KVS doesn't provide consistency guarantees besides capabilities
provided by its backends. This framework is used in two servers:
chain replication database <b>cr</b>; and <b>feeds</b> server.
It is also a companion storage framework for N2O.</p>
</div>
<div class=code>
<div id=left style="width:35%;float:left;">
<div style="width:45%;height:400px;float:left;">
<h2 style="text-align:right;margin-right:20px;">kvs</h2>
</div>
<div id=api style="width:48%;height:400px;float:left;">
<h2>api</h2>
<code style="font-size:11pt;">delete(Table,Key)
remove(Table,Key)
get(Table,Key)
index(Table,K,V)
next_id(Table,DX)
join(Node)
count(Table)
add(Record)
all(Table)
put(Record)
link(Record)
change_storage(Table,Type)
start()
stop()
destroy()
version()
dir()
entries(Feed,Type,Count)
</code>
</div>
<div style="width:45%;height:200px;float:left;">
<h2 style="text-align:right;margin-right:20px;">kvs</h2>
</div>
<div id=protocol style="width:48%;height:200px;float:left;">
<h2>backends</h2>
<code style="font-size:11pt;">fs
kai
mnesia
redis
riak
sql
</code>
</div>
</div>
<div id=right style="width:40%;float:left;">
<div style="width:45%;height:320px;float:left;">
<h2 style="text-align:right;margin-right:20px;">kvs</h2>
</div>
<div style="width:48%;height:320px;float:left;">
<h2>core</h2>
<code style="font-size:11pt;">#id_seq{thing,id}
#container{id,top,count}
#iterator{id,version,container,
feed_id,prev,next,feeds,etc}
#interval{left,right,name}
#log{?CONTAINER,name,acc}
#operation{?ITERATOR(log),body,name,status}
#kvs{mod,cx}
#schema{name,tables}
#table{name,container,fields,keys,
copy_type,columns,order_by}
#column{name,type,key,ro,transform}
#query{body,types,values,next_ph_num}
</code>
</div>
<div style="width:45%;height:500px;float:left;">
<h2 style="text-align:right;margin-right:20px;"><b>kvs</b></h2>
</div>
<div style="width:48%;height:500px;float:left;">
<h2>people</h2>
<code style="font-size:11pt;">#group{?ITERATOR(feed,true),name,description,scope,
creator,created,owner,count,entries_count}
#subscription{key,who,whom,what,how,date,note}
#user{?ITERATOR(feed,true),email,username,
password,display_name,
register_date,tokens,avatar,
names,surnames,birth,sex,
date,status,zone,type }
#feed{?CONTAINER, aclver}
#entry{?ITERATOR(feed),entry_id,from,to,
title,description,created,hidden,
access,shared,starred,deleted,
media,type}
#comment{?ITERATOR(feed),comment_id,entry_id,
content,from,created,media,parent}
#access{?ITERATOR(acl),entry_id,acl_id,
accessor,action}
</code>
</div>
</div> <!-- right -->
<!--/div> <!-- code -->
</body>
</html>