summaryrefslogblamecommitdiff
path: root/doc/spec-2.html
blob: a393467ac717a1e86703b069274012d8b488108e (plain) (tree)
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                          
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:x="http://www.texmacs.org/2002/extensions" xmlns:m="http://www.w3.org/1998/Math/MathML">
  <head>
    <title>No title</title>
    <meta content="TeXmacs 1.99.2" name="generator"></meta>
    <style type="text/css">
      body { text-align: justify } h5 { display: inline; padding-right: 1em }
      h6 { display: inline; padding-right: 1em } table { border-collapse:
      collapse } td { padding: 0.2em; vertical-align: baseline } .subsup {
      display: inline; vertical-align: -0.2em } .subsup td { padding: 0px;
      text-align: left} .fraction { display: inline; vertical-align: -0.8em }
      .fraction td { padding: 0px; text-align: center } .wide { position:
      relative; margin-left: -0.4em } .accent { position: relative;
      margin-left: -0.4em; top: -0.1em } .title-block { width: 100%;
      text-align: center } .title-block p { margin: 0px } .compact-block p {
      margin-top: 0px; margin-bottom: 0px } .left-tab { text-align: left }
      .center-tab { text-align: center } .balloon-anchor { border-bottom: 1px
      dotted #000000; outline:none;                  cursor: help; position:
      relative; }.balloon-anchor [hidden] { margin-left: -999em; position:
      absolute; display: none; }.balloon-anchor:hover [hidden] { position:
      absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; width:
      500px; display: inline-block; }.balloon-body { }.ornament  {
      border-width: 1px; border-style: solid; border-color:  black; display:
      inline-block; padding: 0.2em; } .right-tab { float: right; position:
      relative; top: -1em } 
    </style>
  </head>
  <body>
    <table class="title-block">
      <tr>
        <td><table class="title-block">
          <tr>
            <td><font size="+3"><b>The NARP protocol specification
            </b></font></td>
          </tr>
        </table><table class="title-block">
          <tr>
            <td><font size="+1"><b>A Generic Recursive Communication Protocol for
            Networked Applications</b></font></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <p>
      In this document we explain the purpose and provide a draft
      specification for the NARP protocol, a general-purpose networking
      protocol destined to be used in many layers of a new operating system
      and networking system.
    </p>
    <h2 id="auto-1">1<span style="margin-left: 1em"></span>Introduction</h2>
    <p>
      We begin by remarking that a basic operation in all computer operation
      processes consists in naming objects and providing acces to these named
      objects. Here are a few examples of naming in real use cases:
    </p>
    <ul>
      <li>
        <p>
          Naming of files on a local or distant file system
        </p>
      </li>
      <li>
        <p>
          Naming of devices in the <tt class="verbatim">/dev</tt> virtual filesystem on
          Unix machines
        </p>
      </li>
      <li>
        <p>
          Naming of networked machines (with IP adresses and DNS records)
        </p>
      </li>
      <li>
        <p>
          Naming of internet ressources over protocols such as HTTP, IMAP,
          IRC, specfic web services, &hellip;
        </p>
      </li>
    </ul>
    <p>
      We propose here a novel architecture with the purpose of unifying all
      the naming happening at all levels of the system, with two base concepts
      : <em>objects</em> and <em>service</em>.
    </p>
    <ul>
      <li>
        <p>
          <em>objects</em> are ressources that may implement different
          semantics : bidirectionnal communication (such as sockets) ;
          unidirectionnal communication (FIFO-like) ; file semantics ; etc.
        </p>
      </li>
      <li>
        <p>
          <em>services</em> are a way of naming objects, querying the
          interfaces they implement, and multiplexing communications with them
        </p>
      </li>
    </ul>
    <p>
      We suggest that a NARP service may be provided on any bidirectionnal
      channel of communication supporting the (reliable) sending and recieving
      of messages. In addition, NARP objects may implement such a send/recieve
      interface ; therefore a NARP service can be channeled into an object.
      Such a construction of using a NARP object to access a NARP service is a
      fundamental operation that we call <em>recursive multiplexing</em>, or
      just <em>multiplexing</em>.
    </p>
    <p>
      The NARP protocol is a client/server protocol meant to include a variety
      of different operations that may or may not be implemented by a specific
      NARP server.
    </p>
    <h2 id="auto-2">2<span style="margin-left: 1em"></span>High-level overview</h2>
    <h3 id="auto-3">2.1<span style="margin-left: 1em"></span>The basic operations on services and
    objects</h3>
    <p>
      A NARP service is basically any object that implements the following
      operations:
    </p>
    <ul>
      <li>
        <p>
          <em>query</em> : get information on a ressource identified by name
        </p>
      </li>
      <li>
        <p>
          <em>list</em> : know the names of ressources presented by the
          service (possibly in a specific sub-path)
        </p>
      </li>
      <li>
        <p>
          <em>attach</em> : get an object interface for accessing a ressource,
          identified by name
        </p>
      </li>
    </ul>
    <p>
      A NARP object is basically any object that implements the following
      operations :
    </p>
    <ul>
      <li>
        <p>
          <em>send</em> : send a message (an arbitrary byte string) to the
          object
        </p>
      </li>
      <li>
        <p>
          <em>recieve</em> : recieve a message from the object (this may be
          done asynchronously with handler functions)
        </p>
      </li>
      <li>
        <p>
          <em>detach</em> : delete object connection
        </p>
      </li>
    </ul>
    <h3 id="auto-4">2.2<span style="margin-left: 1em"></span>The basics of the NARP protocol</h3>
    <p>
      Given any interface with send/recieve capabilities considered as an
      assymetric (client/server) configuration, the following client messages
      consitute the basics of the NARP protocol for providing a NARP service
      on the interface:
    </p>
    <ul>
      <li>
        <p>
          <tt class="verbatim">hello</tt> : initialize a connection, check version
          information, &hellip;
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">authenticate</tt> and appropriate response messages : use
          credentials (user/password or access token) to gain acces to some
          ressources provided by the server (the protocol is thus statefull)
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">walk</tt>, <tt class="verbatim">list</tt> and appropriate response
          messages : get information about the available ressources
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">attach</tt> and appropriate response messages : give an
          identifier (a descriptor) to a ressource in order to communicate
          with it
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">send</tt> and appropriate response messages : send a
          message to an attached ressource, identified by its descriptor
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">detach</tt> : close a descriptor and detach from a
          ressource
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">create</tt>, <tt class="verbatim">delete</tt>, <tt class="verbatim">rename</tt>,
          <tt class="verbatim">link</tt> : requests the creation or modification of a
          ressource in the namespace
        </p>
      </li>
    </ul>
    <p>
      The server may also at any moment send a message, including:
    </p>
    <ul>
      <li>
        <p>
          a response to a query
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">recieve</tt> : a notification of a message sent from the
          object to the client
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">detached</tt> : the connection to the object has been
          terminated by the object server
        </p>
      </li>
    </ul>
    <h3 id="auto-5">2.3<span style="margin-left: 1em"></span>Recursion</h3>
    <p>
      If an object is a NARP server, the messages sent to it and recieved from
      it are messages of the NARP protocol. Otherwise, they are arbitrary.
    </p>
    <h3 id="auto-6"><a id="rev-sock"></a>2.4<span style="margin-left: 1em"></span>Reverse object</h3>
    <p>
      Some NARP servers may support reverse object serving: the client creates
      an object on the server and handles all the requests arriving to this
      object (therefore the initial NARP server only serves as a relay between
      the new server and its clients
      <p>
        <font size="-1"><div align="justify">
          <div style="margin-left: 0px">
            <div style="margin-right: 0px">
              <class style="font-style: normal"><p>
                1. Research is to be done on shortcutting mechanisms in
                specific situations where too many levels of recursion cause a
                performance issue.
              </p></class>
            </div>
          </div>
        </div></font>
      </p>
      <span style="margin-left: 0em"></span>
      <a id="footnr-1"></a>
      <sup><class style="font-style: normal"><a href="#footnote-1">1</a></class></sup>
      ). A client wishing to act as a reverse object server may use the
      following commands:
    </p>
    <ul>
      <li>
        <p>
          <tt class="verbatim">serve</tt> : listen for attach requests on a servable
          (empty) object created in the server namespace (if authorized)
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">accept</tt> and <tt class="verbatim">reject</tt> : accept (or
          reject) an attach request to the object
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">detach</tt> : close connection between object and client
          (this is the same detach message as in standard communications)
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">unserve</tt> : stop serving for the object. Attached
          clients continue to be attached.
        </p>
      </li>
    </ul>
    <p>
      The server may in turn send the following messages concerning the server
      object:
    </p>
    <ul>
      <li>
        <p>
          <tt class="verbatim">attach_request</tt> : a client is willing to attach to
          the object. A descriptor is already associated to the connection to
          be established, but the server may reject it.
        </p>
      </li>
    </ul>
    <p>
      Once a client is attached to the object, a classical send/recieved
      interface is provided.
    </p>
    <p>
      Typically, the protocol exchanged over the object is NARP protocol,
      therefore enabling the reverse server to provide its own namespace and
      other functionnality.
    </p>
    <h3 id="auto-7">2.5<span style="margin-left: 1em"></span>Specific object types and associated
    messages</h3>
    <h4 id="auto-8">2.5.1<span style="margin-left: 1em"></span>Objects are sockets</h4>
    <p>
      Sockets are the basis of the NARP protocol : attaching to an objects
      opens a socket connection to the process serving the object, and when
      the connection is accepted, basic send/recieve functionnality is
      provided. See also the reverse object protocol described in section <a
      href="#rev-sock">2.4</a>.
    </p>
    <h4 id="auto-9">2.5.2<span style="margin-left: 1em"></span>File objects</h4>
    <p>
      Small files may implement the following interface:
    </p>
    <ul>
      <li>
        <p>
          <tt class="verbatim">put</tt> : erase the whole file and put the transmitted
          content
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">get</tt> : retrieve the whole file content
        </p>
      </li>
    </ul>
    <p>
      Big files may implement the following interface:
    </p>
    <ul>
      <li>
        <p>
          <tt class="verbatim">write</tt> : write a portion of the file at a given
          offset
        </p>
      </li>
      <li>
        <p>
          <tt class="verbatim">read</tt> : read a portion of the file at a given offset
        </p>
      </li>
    </ul>
    <h4 id="auto-10">2.5.3<span style="margin-left: 1em"></span>User IO (terminals&hellip;)</h4>
    <p>
      Virtual terminals can be seen as objects implementing a simple
      send/recieve semantic, where the data transmitted is unstructured (or
      structured given a specific terminal data structure). More specific
      interfaces can be defined for advanced terminals and GUIs.
    </p>
    <h4 id="auto-11">2.5.4<span style="margin-left: 1em"></span>Specific applications</h4>
    <p>
      Specific applications may define custom messages. Examples include:
    </p>
    <ul>
      <li>
        <p>
          e-mail
        </p>
      </li>
      <li>
        <p>
          instant messaging
        </p>
      </li>
      <li>
        <p>
          collaborative editing of text-based documents
        </p>
      </li>
    </ul>
    <p>
      and many other applications yet to be invented.
    </p>
    <h3 id="auto-12">2.6<span style="margin-left: 1em"></span>Big messages</h3>
    <p>
      The message size in the NARP protocol is limited to 64kb, and
      recommended not to exceed 4kb+header (4kb is the size of a memory page
      on many machines). Therefore a possibility would be for the NARP
      protocol to include a way to transmit big messages by fragmenting them
      into small messages. Optionnal error correction may be included. This
      can be useful for example when using <tt class="verbatim">put</tt> or <tt class="verbatim">get</tt>
      on large files, or <tt class="verbatim">read</tt>s and <tt class="verbatim">write</tt>s of
      big file portions. The recieving of a large fragmented message may have
      a specific implementation allowing the reciever to work with the partial
      data as soon as it starts arriving and not having to wait for the whole
      message to be transmitted and buffered. Research is yet to be done on
      this specific subject.
    </p>
    <h3 id="auto-13">2.7<span style="margin-left: 1em"></span>Permissions</h3>
    <p>
      For each attached client the server may keep track of associated
      permissions, and accept or reject requests according to those
      permissions. The client may use an authentication command to gain
      supplementary privileges on the server's ressources. The client may
      request a token to delegate it's privileges on a given object to another
      client. Advanced right management functionnalities are to be discussed.
    </p>
    <h3 id="auto-14">2.8<span style="margin-left: 1em"></span>Reliability concerns</h3>
    <p>
      The NARP protocol relies on the fact that when transmitting a message,
      the other end will recieve it. It is nevertheless recommended that NARP
      implementations support the repeating of messages if an expected
      acknowlegment has not arrived after a given delay.
    </p>
    <h3 id="auto-15">2.9<span style="margin-left: 1em"></span>Example NARP servers</h3>
    <h4 id="auto-16">2.9.1<span style="margin-left: 1em"></span>Virtual NARP server (i.e. NARP
    router)</h4>
    <p>
      This server implements a namespace where any client may create an empty
      object and serve connections to it. Additionnaly, the server may
      implement the possibility to create virtual files, virtual directories,
      FIFO queues, etc.
    </p>
    <p>
      This server may be connected to other virtual NARP servers in order to
      provide a global namespace accessible to all. Each virtual NARP server
      acts as an endpoint into the network and may have functionnality for
      routing the communications to objects to the clients that serve them.
    </p>
    <h4 id="auto-17">2.9.2<span style="margin-left: 1em"></span>NARP file server</h4>
    <p>
      This server simply implements access to a filesystem : listed ressources
      are the same as the files present in a served directory, each of these
      implements the filing protocol (served directly by the file server), and
      the creation of files/directories may also be implemented.
    </p>
    <h4 id="auto-18">2.9.3<span style="margin-left: 1em"></span>NARP terminal/GUI server</h4>
    <p>
      Clients may create objects on the server ; each of these objects
      correspond to a GUI window. Two interfaces may be implemented : text IO
      (terminal) and graphical interaction. Advanced terminal interaction
      features may be implemented at the protocol level, such as
      auto-completion of commands or of text being edited&hellip;
    </p>
    <p>
      Suggestion for a third kind of window : the data sent by the client
      corresponds to a description of the scene in a given markup language and
      the server does the rendering. The client can also subscribed to events
      such as clicking on an item or entering text. This possibility is to be
      explored.
    </p>
    <h4 id="auto-19">2.9.4<span style="margin-left: 1em"></span>NARP e-mail and newsgroup server</h4>
    <p>
      Several features to be implemented:
    </p>
    <ul>
      <li>
        <p>
          user login and private user mailboxes
        </p>
      </li>
      <li>
        <p>
          bridge to standard SMTP/POP3/IMAP services
        </p>
      </li>
      <li>
        <p>
          private threads of conversation with access rights (the users don't
          each have a copy of the thread)
        </p>
      </li>
      <li>
        <p>
          synchronization between many servers
        </p>
      </li>
      <li>
        <p>
          public discussion forums
        </p>
      </li>
    </ul>
    <h4 id="auto-20">2.9.5<span style="margin-left: 1em"></span>NARP chat server</h4>
    <ul>
      <li>
        <p>
          user login and status notification
        </p>
      </li>
      <li>
        <p>
          online and offline private messaging
        </p>
      </li>
      <li>
        <p>
          public chat rooms, chat room logging independently of user being
          online or offline
        </p>
      </li>
      <li>
        <p>
          bridging and synchronization between many servers
        </p>
      </li>
    </ul>
    <h4 id="auto-21">2.9.6<span style="margin-left: 1em"></span>NARP applicative server</h4>
    <p>
      TODO&hellip;
    </p>
    <h2 id="auto-22">3<span style="margin-left: 1em"></span>Specifics of the NARP protocol</h2>
    <h3 id="auto-23">3.1<span style="margin-left: 1em"></span>Protocol description format</h3>
    <p>
      A protocol message is given in the following form:
    </p>
    <table style="display: inline; vertical-align: -1.1em">
      <tbody><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid">element type</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">element type</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">&hellip;</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">element type</td>
      </tr><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">element description</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">element description</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">&hellip;</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">element description</td>
      </tr></tbody>
    </table>
    <p>
      The following element types apply:
    </p>
    <ul>
      <li>
        <p>
          int16, int32, int64 : 16-bit, 32-bit or 64-bit little-endian
          integers
        </p>
      </li>
      <li>
        <p>
          str : a string, prefixed by a 16-bit length header
        </p>
      </li>
      <li>
        <p>
          arr(<var>T</var>) : an array of <var>T</var>'s (where <var>T</var>
          is another element type), prefixed by a 16-bit length header
        </p>
      </li>
      <li>
        <p>
          * (for the last element) : consider all the rest of the message as a
          byte string
        </p>
      </li>
    </ul>
    <h3 id="auto-24">3.2<span style="margin-left: 1em"></span>Basic message format</h3>
    <p>
      The basic format of a message is :
    </p>
    <table style="display: inline; vertical-align: -1.1em">
      <tbody><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
      </tr><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">message size</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message type</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">payload</td>
      </tr></tbody>
    </table>
    <p>
      We will abbreviate by &ldquo;header&rdquo; the first 32 bits (4 bytes)
      of the message. The list of message types is given in section <a href="#type-nums">3.7.1</a>.
    </p>
    <p>
      Messages for communication with an attached ressource will have the
      following format :
    </p>
    <table style="display: inline; vertical-align: -1.1em">
      <tbody><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
      </tr><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">message size</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message type</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">ressource descriptor (handle)</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">payload</td>
      </tr></tbody>
    </table>
    <p>
      Many client messages awating a response will have a message ID included
      ; this message ID is an arbitrary number generated by the client and
      used by the server when giving its response. The header then looks like
      this:
    </p>
    <table style="display: inline; vertical-align: -1.1em">
      <tbody><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int16</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
      </tr><tr>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">message size</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message type</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message ID</td>
        <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">payload</td>
      </tr></tbody>
    </table>
    <h3 id="auto-25">3.3<span style="margin-left: 1em"></span>Message list for core NARP protocol</h3>
    <p>
      Client messages have an up arrow (<var>&uarr;</var>) next to their name,
      while server messages have a down arrow (<var>&darr;</var>).
    </p>
    <p>
      The core NARP protocol is meant for small size and rapidity (so that
      many layers can be encapsulated with minimal overhead), therefore no
      acknowlegment is to be sent for recursive send/recieve messages. Other
      messages usually imply some kind of action or getting of information,
      therefore an acknowlegment or an error is usually sent as a response.
    </p>
    <p>
      <a id="auto-26"></a><h5>Hello<var>&uarr;</var><var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <p>
          <table style="display: inline; vertical-align: -1.1em">
            <tbody><tr>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">arr(int32)</td>
            </tr><tr>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">version</td>
              <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">list of needed/provided interfaces</td>
            </tr></tbody>
          </table>
          
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          When a NARP connection is established, the client is always the
          first to send a <strong>Hello</strong> message. The object may then
          respond either with a <strong>Hello</strong> message indicating that
          the requested interfaces can be provided, or with an
          <strong>Error</strong> message. The two common error causes are
          <em>interface not implemented</em> and <em>incompatible
          versions</em>.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          For interface numbers : see table in section <a href="#interface-nums">3.7.3</a>.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-27"></a><h5>Error<var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Generic error response message for any operation.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">error ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">error string</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Common error IDs are specified in section <a href="#error-nums">3.7.2</a>.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-28"></a><h5>Ack<var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Generic acknowlegment message for commands that require it. An
          acknowlege implies the command has been sucessfully executed
          (otherwise an error message is sent).
        </p>
      </div>
    </p>
    <p>
      <a id="auto-29"></a><h5>Stat<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">filename</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          The request ID is an ID decided by the client so that it can
          identify the answer.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-30"></a><h5>StatR<var>&darr;</var></h5>Response to the
      <strong>Stat</strong> message.
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">arr(int32)</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">implemented interface</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Common interface numbers are to be found in section <a href="#interface-nums">3.7.3</a>.
        </p>
        <p>
          If a <strong>Stat</strong> query on an object gives a certain list
          of interfaces, then when connecting to the object at least all these
          interfaces must be included in the server's <strong>Hello</strong>
          message as supported interfaces.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Note that some interface numbers correspond to actions that can be
          done on the object from the connection where the object exists (e.g.
          : symbolic link, directory), and others correspond to actions that
          can be performed after attaching to the object (e.g. file, terminal,
          &hellip;)
        </p>
      </div>
    </p>
    <p>
      <a id="auto-31"></a><h5>List<var>&uarr;</var></h5>
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -1.1em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">first entry number</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">number of entries requested</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">base path string</td>
        </tr></tbody>
      </table>
    </div>
    <p>
      <a id="auto-32"></a><h5>ListR<var>&darr;</var></h5>Response to the
      <strong>List</strong> message.
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <p>
          One message is passed for each entry in the requested range:
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">entry number</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">entry name</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          After the directory has finished being enumerated, a supplementary
          entry is given with entry number the last valid entry number plus
          one and an empty entry name. This supplementary entry is only given
          if its (ficious) entry number is included in the range requested by
          the client.
        </p>
      </div>
    </p>
    <p>
      Possible extension : combine List and Stat so that when the answer to
      List is given, information is also given on the object's implemented
      interfaces.
    </p>
    <p>
      <a id="auto-33"></a><h5>Attach<var>&uarr;</var></h5>
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -1.1em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">filename</td>
        </tr></tbody>
      </table>
    </div>
    <p>
      <a id="auto-34"></a><h5>Attached<var>&darr;</var></h5>Response to the
      <strong>Attach</strong> command.
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          (the handle, ie the ressource descriptor, is attributed by the
          server)
        </p>
      </div>
    </p>
    <p>
      <a id="auto-35"></a><h5>Send<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">payload</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message does not expect a response.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-36"></a><h5>Recieve<var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Spontaneous server message indicating some data is sent by an
          attached ressource. This message does not expect a response.
        </p>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">payload</td>
          </tr></tbody>
        </table>
      </div>
    </p>
    <p>
      <a id="auto-37"></a><h5>Detach<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message does not expect a response.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-38"></a><h5>Detached<var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Spontaneous server message indicating the object has been detached.
        </p>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle</td>
          </tr></tbody>
        </table>
      </div>
    </p>
    <p>
      <a id="auto-39"></a><h5><strong>Create<var>&uarr;</var></strong></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">arr(int32)</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">needed interfaces</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">path</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          A create request is accompanied with a list of needed interfaces
          that direct the server into creating the corresponding type of
          object (e.g. an empty object to be served, a directory, a file,
          &hellip;)
        </p>
      </div>
    </p>
    <p>
      <a id="auto-40"></a><h5>Created<var>&darr;</var></h5>Response to the
      <strong>Create</strong> command.
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">arr(int32)</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">implemented interfaces</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Signals that the object has been created, and has corresponding
          interfaces associated to it.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-41"></a><h5>Delete<var>&uarr;</var><tt class="verbatim"></tt></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">path</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message expects a standard <strong>Ack</strong> response
          message.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-42"></a><h5>Link<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">destination path</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">link path</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message expects a standard <strong>Ack</strong> response
          message.
        </p>
        <p>
          Semantics of the link object:
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <ul>
          <li>
            <p>
              attaching or serving on this objects corresponds to resolving
              the linked path and attaching/serving on the linked object
            </p>
          </li>
          <li>
            <p>
              stating the link will stat the linked object and add as an
              implemented interface the &ldquo;this is a symlink&rdquo;
              information
            </p>
          </li>
          <li>
            <p>
              directory listings follow links
            </p>
          </li>
          <li>
            <p>
              deleting the link will not delete the original file but only the
              link
            </p>
          </li>
        </ul>
      </div>
    </p>
    <p>
      <a id="auto-43"></a><h5>ReadLink<var>&uarr;</var></h5>
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -1.1em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">path</td>
        </tr></tbody>
      </table>
    </div>
    <p>
      <a id="auto-44"></a><h5>ReadLinkR<var>&darr;</var></h5>Response to the
      <strong>ReadLink</strong> message.
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">link description</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This will only return the first level of linking, ie the link data
          directly associated to the link object.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-45"></a><h5>Rename<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">original path</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">new path</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message expects a standard <strong>Ack</strong> response
          message.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-46"></a><h5>Serve<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">array(int32)</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">path</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">announced interfaces</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message is a request for the client to be a reverse server to
          an object. The response message to this message is an
          <strong>Attached</strong> message. The handle attributed to the
          served object is known as the <em>server handle</em> and is used in
          the <strong>Incoming</strong> and <strong>Detach</strong> messages.
        </p>
        <p>
          To stop serving an object, the client simply sends a
          <strong>Detach</strong> command on the server handle. The semantics
          is that all connections that have been openned through the
          reverse-served object are preserved when the object stops being
          served, and an individual <strong>Detach</strong> message must be
          sent to all of them if we want to close them.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          The <em>announced interfaces</em> serves to answer
          <strong>Stat</strong> messages on the object while we are serving
          it.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-47"></a><h5>Incoming<var>&darr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">server handle</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">client hande</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          This message is sent by the server when another client wishes to
          attach to an object reverse-served by this client. The server handle
          is the one given as a response to the <strong>Serve</strong>
          message. The client handle is a handle associated to the connection.
          The reverse server may reject the connection by issuing a
          <strong>Detach</strong> command on the client handle, or may accept
          it using the <strong>Accept</strong> message given below.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-48"></a><h5>Accept<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">client handle</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Once a connection has been accepted, the reverse server may at any
          moment close it by sending a <strong>Detach</strong> command on the
          corresponding client handle.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-49"></a><h5>Unbox<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">outer handle</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">inner handle</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Consider the handle <em>outer handle</em> as a NARP protocol
          service, and associate a handle in the outer layer to the handle of
          the inner layer with handle <em>inner handle</em>.
        </p>
        <p>
          Example : in connection A we have a connection open on handle 5
          which contains NARP data that we will call B, and in connection B we
          have another connection open on handle 7. Issuing a Unbox(id, 5, 7)
          request on A will lead to the server creating a handle (say 12)
          where sending corresponds to sending a message to handle 7 on
          connection B, and such that all messages recieved on handle 5 (ie on
          connection B) are filtered and messages whose destination is handle
          7 on connection B are removed from the stream and issued on handle
          12 of connection A instead.
        </p>
        <p>
          The answer to such a request is an <strong>Attached</strong>
          response giving a handle to the unboxed connection.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Systematically unboxing open connections may lead in some cases to
          the network infrastructure being able to do simplifications in the
          interconnections. In other cases it may result to useless overhead
          on the server side : in such a case the server may refuse an unbox
          request.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-50"></a><h5>Plug<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle A</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle B</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Ask the server to redirect all messages recieved on handle A to
          handle B and all mesages recieved on handle B to handle A. The
          messages recieved on either handle are not sent to the client
          anymore.
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          The answer messages are standard
          <strong>Ack</strong>/<strong>Error</strong> messages.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-51"></a><h5>Unplug<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">request ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle A</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">handle B</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Undoes a plugging.
        </p>
      </div>
    </p>
    <h3 id="auto-52">3.4<span style="margin-left: 1em"></span>Big message protocol</h3>
    <p>
      To be defined. Is it really usefull? What role exactly does it have? Can
      it implement repetition in the case where the message hasn't been
      acknowledge? &hellip;
    </p>
    <h3 id="auto-53">3.5<span style="margin-left: 1em"></span>Authentification and rights managment
    commands</h3>
    <p>
      <a id="auto-54"></a><h5>Authenticate<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">*</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">authentification method</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">authentification data</td>
          </tr></tbody>
        </table>
      </div>
      <div style="margin-left: 35.145870328812px">
        <p>
          Used to gain access using credentials (user/password, token,
          &hellip;). Response messages are standard <strong>Ack</strong> on
          success or <strong>Error</strong> on failure. Autentification
          methods include :
        </p>
      </div>
      <div style="margin-left: 35.145870328812px">
        <ul>
          <li>
            <p>
              1 : user + password
            </p>
          </li>
          <li>
            <p>
              2 : token
            </p>
          </li>
        </ul>
      </div>
    </p>
    <p>
      <a id="auto-55"></a><h5>NewToken<var>&uarr;</var></h5>
    </p>
    <p>
      <div style="margin-left: 35.145870328812px">
        <table style="display: inline; vertical-align: -1.1em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message ID</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">path</td>
          </tr></tbody>
        </table>
      </div>
      <p>
        
      </p>
      <div style="margin-left: 35.145870328812px">
        <p>
          Requests the server to create an authentication token for accessing
          a given object with the privileges of the connected client. Once the
          token has been returned, it may be transmitted to another client so
          that that client will use it to gain same access to the object.
        </p>
      </div>
    </p>
    <p>
      <a id="auto-56"></a><h5>NewTokenR<var>&darr;</var></h5>Response to the
      <strong>NewToken</strong> message.
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -1.1em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid; border-top: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">int32</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-top: 1px solid">str</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center; border-left: 1px solid">header</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">message ID</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; text-align: center">token</td>
        </tr></tbody>
      </table>
    </div>
    <p>
      TODO : request account creation, manage user groups and ACLs, &hellip;
    </p>
    <h3 id="auto-57">3.6<span style="margin-left: 1em"></span>TODO</h3>
    <ul>
      <li>
        <p>
          file protocol
        </p>
        <p>
          
        </p>
      </li>
      <li>
        <p>
          system protocols (see section on OS design using NARP)
        </p>
      </li>
      <li>
        <p>
          UI protocols (terminal, GUI)
        </p>
      </li>
      <li>
        <p>
          communication protocols (mail, IM)
        </p>
      </li>
    </ul>
    <h3 id="auto-58">3.7<span style="margin-left: 1em"></span>Table of IDs</h3>
    <p>
      The tables presented in this section give the number associated to the
      message types. These tables are the reference on the subject ; any
      information found somewhere else is wrong if it is not the same as found
      here. This is for protocol version 1.
    </p>
    <h4 id="auto-59"><a id="type-nums"></a>3.7.1<span style="margin-left: 1em"></span>Message types</h4>
    <p>
      <a id="auto-60"></a><h5>Base protocol</h5>
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -6.6em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid; border-top: 1px solid">message</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&uarr;</var> id</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&darr;</var> id</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid; border-top: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid">message</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&uarr;</var> id</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&darr;</var> id</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Hello</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">0</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10000</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Stat</strong> / <strong>StatR</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10010</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Error</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10001</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>List</strong> / <strong>ListR</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">11</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10011</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Ack</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10002</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Create</strong> / <strong>Created</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">12</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10012</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Delete</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">13</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Attach</strong> / <strong>Attached</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">5</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10005</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Rename</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">14</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Send</strong> / <strong>Recieve</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">6</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10006</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Link</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">15</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Detach</strong> / <strong>Detached</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">7</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10007</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>ReadLink</strong> /
          <strong>ReadLinkR</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">16</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10016</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Serve</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">8</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Incoming</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10008</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Unbox</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">20</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Accept</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">9</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Plug</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">21</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 0 solid; border-bottom: 0 solid"></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Unplug</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">22</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr></tbody>
      </table>
    </div>
    <p>
      <a id="auto-61"></a><h5>Authentication &amp; privileges</h5>
    </p>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -1.65em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid; border-top: 1px solid">message</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&uarr;</var> id</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid"><var>&darr;</var> id</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>Authenticate</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">30</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"><strong>NewToken</strong> /
          <strong>NewTokenR</strong></td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">31</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">10031</td>
        </tr></tbody>
      </table>
    </div>
    <h4 id="auto-62"><a id="error-nums"></a>3.7.2<span style="margin-left: 1em"></span>Error messages</h4>
    <div style="margin-left: 35.145870328812px">
      <table style="display: inline; vertical-align: -6.05em">
        <tbody><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid; border-top: 1px solid">id</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid">cause</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">1</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Incompatible versions</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">2</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Command/interface not implemented</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">3</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Invalid request (e.g. : out of bounds)</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">4</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Invalid handle</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">5</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Attach request rejected</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">6</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Action impossible because object is in use (cannot
          delete, &hellip;)</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">7</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">No such object (invalid path)</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">8</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Could not resolve link</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">9</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Incorrect credentials</td>
        </tr><tr>
          <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">10</td>
          <td style="border-right: 1px solid; border-bottom: 1px solid">Unauthorized</td>
        </tr></tbody>
      </table>
    </div>
    <h4 id="auto-63">3.7.3<span style="margin-left: 1em"></span>Object interfaces<a id="interface-nums"></a></h4>
    <div style="margin-left: 35.145870328812px">
      <p>
        <table style="display: inline; vertical-align: -7.15em">
          <tbody><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid; border-top: 1px solid">id</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid">name</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-top: 1px solid">must implement messages</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">0</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">servable</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>Serve</strong>, <strong>Accept</strong>,
            <strong>Incoming</strong></td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">1</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">enumerable</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>List</strong>, <strong>ListR</strong></td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">2</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">is symlink</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"><strong>ReadLink</strong>,
            <strong>ReadLinkR</strong></td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">9</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">non-NARP inside</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, inside data is arbitrary</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">10</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">NARP service</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, inside data is a NARP service (ie has
            objects, &hellip;)</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">11</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">NARP unbox</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, <strong>Unbox</strong> command
            supported</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">12</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">NARP plug</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, <strong>Plug</strong> and
            <strong>Unplug</strong> commands supported</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
            <td style="border-right: 1px solid; border-bottom: 1px solid"></td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">20</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">file</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, file semantics</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">21</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">terminal</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, terminal semantics</td>
          </tr><tr>
            <td style="border-right: 1px solid; border-bottom: 1px solid; border-left: 1px solid">22</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">graphics window</td>
            <td style="border-right: 1px solid; border-bottom: 1px solid">once attached, GUI semantics</td>
          </tr></tbody>
        </table>
        
      </p>
    </div>
    <p>
      <a id="auto-64"></a><h5>Servable</h5>This interface specifies that the object is
      currently an empty object waiting for someone to issue a
      <strong>Serve</strong> command on it, providing it with an
      implementation of some interfaces.
    </p>
    <p>
      <a id="auto-65"></a><h5>non-NARP inside</h5>This interfaces indicates that once
      attached to the object, the messages sent/recieved to it are not
      supposed to be NARP format but any arbitrary format. If this interface
      is not specified, then it is expected that the messages transmitted will
      follow the general NARP protocol (message format, standard
      hello/ack/error messages).
    </p>
    <p>
      <a id="auto-66"></a><h5>NARP service</h5>This interface indicates that once
      attached to the object, one can have access to a new NARP namespace
      where at least the following operations are supported :
      <strong>Stat</strong>, <strong>Attach</strong>, <strong>Send</strong>,
      <strong>Recieve</strong>, <strong>Detach</strong>. Additionnal messages
      may or may not be supported.
    </p>
    <h2 id="auto-67">4<span style="margin-left: 1em"></span>Architecture of a NARP implementation in
    OCaml or Haskell</h2>
    <p>
      An asynchronous implementation can be easily programmed in functionnal
      languages such as OCaml or Haskell, using closures as continuations for
      <em>what to do when a (response) message arrives</em>.
    </p>
    <p>
      TODO
    </p>
    <h2 id="auto-68">5<span style="margin-left: 1em"></span>Using NARP to design an Operating System</h2>
    <p>
      When designing the NARP protocol, we had in mind that it would be
      possible to use it in a new operating system design at many levels :
      access to devices, process management, memory management, filesystems,
      IPC, GUI, &hellip;
    </p>
    <p>
      Kernel helpers could be developped so that a part of the NARP
      multiplexing and demultiplexing takes place in kernel land, before
      messages are passed to userspace. For instance, this would allow the
      simplification of useless mux-demux chains taking place on the same
      machine. The mux-demux helper can be implemented via the
      <strong>Unbox</strong> protocol message, handled at the level of the
      root stream of NARP communication with the kernel. Another possible
      helper would be to map a virtual memory region to a NARP ressource
      implementing a standard filing protocol, much like memory mapped files
      in standard OSes (only this would work with arbitrary ressources).
    </p>
    <p>
      In this section we will develop on a concrete proposal for a NARP-based
      operating system.
    </p>
    <h3 id="auto-69">5.1<span style="margin-left: 1em"></span>Architecture of the OS</h3>
    <p>
      The basic primitive of the system being message-passing, the system
      looks a lot like a micro-kernel. Only the message format has a complex
      semantic and the communication layer is not really &ldquo;simple&rdquo;.
      Furthermore, the system has device drivers, file system and networking
      running as kernel-mode processes, making the kernel more monolithic (but
      still having a micro-kernel spirit). It should be easy to make any user
      mode process run as a kernel mode process instead, for the sake of
      performance (eg : graphical server &amp; compositor).
    </p>
    <p>
      The kernel land is divided in three major parts, with strict dependency
      order:
    </p>
    <ul>
      <li>
        <p>
          Level 0 : System ressource managment : physical memory, virtual
          memory, hardware interaction (IRQ, v86), debug output
        </p>
      </li>
      <li>
        <p>
          Level 1 : Scheduler, IPC &amp; NARP core server : builds on top of
          level 0, adds support for processes and communication between them
          restricted to NARP protocol data.
        </p>
      </li>
      <li>
        <p>
          Level 2 : System processes : hardware, file systems, network,
          &hellip; (may access level 0 and level 1 features)
        </p>
      </li>
    </ul>
    <p>
      User processes are restricted to syscalls that call level 1 primitives.
    </p>
    <p>
      Here are a few basic principles for the design of these three levels :
    </p>
    <ul>
      <li>
        <p>
          Level 2 processes may not communicate directly nor share memory :
          they must go through level 0 and level 1 primitives to achieve such
          a goal. Each level 2 process has a separate heap, which is
          completely freed when the process dies. Level 2 processes do not use
          separate virtual memory spaces : since the kernel memory space is
          mapped in all page directories, a level 2 process may run with any
          page directory.
        </p>
        <p>
          Benefits : critical system parts are restricted to level 0 and level
          1. Level 2 components may leak or crash with less consequences.
        </p>
      </li>
      <li>
        <p>
          All synchronization &amp; locking is handle by level 1, except for
          level 0 that must implement its own locking devices (since it cannot
          rely on level 1).
        </p>
        <p>
          Benefits : no complex synchronization in most of the code (which is
          either level 2 or userland), only simple message passing and waiting
          for stuff to happen
        </p>
      </li>
      <li>
        <p>
          No concept of &ldquo;threads&rdquo; : system processes are actually
          kernel threads, but we call them processes since they use separate
          parts of memory. Userlands processes cannot spawn multiple threads
          of execution either : they must fork and communicate through NARP if
          they want to do so (eg: launching an expensive communication in the
          background).
        </p>
        <p>
          (since fork is a complicated system call, and features such as
          copy-on-write depend on processes using different paging
          directories, the fork system call is accessible only to userland
          processes : level 2 processes may not fork, but only create new
          processes)
        </p>
      </li>
      <li>
        <p>
          Level 1 also has a memory heap ; it is used with <tt class="verbatim">core_malloc/core_free</tt>.
          Level 2 proceses use standard <tt class="verbatim">malloc/free</tt>, which are
          modified to act on the heap of the current process.
        </p>
      </li>
      <li>
        <p>
          Each process (system or user) has a <em>mailbox</em>, ie a queue of
          incoming NARP messages waiting to be transferred. The mailbox has a
          maximum <em>size</em> (buffer size), and a <em>send</em> call may
          fail with a <em>no space left in queue</em> error. This is the only
          possible failure for a <em>send</em> call.
        </p>
        <p>
          System processes (level 2) spend most of their time in <em>waiting
          mode</em> ; they may be waked up by either recieving a NARP messsage
          or by a hardware event. Therefore the <em>wait_for_event</em>
          function that composes the main loop may return either : <em>a
          message was recieved</em> or <em>a system event happenned</em>. If
          the reason is <em>a message was recieved</em>, the process is free
          not to read the message immediately.
        </p>
        <p>
          On the other hand, user processes can wait for only one thing :
          recieving a NARP message. Each user process has a <em>message
          zone</em> in its memory space, and the <em>wait for message</em>
          function just copies the first message of the mailbox into this zone
          (overwriting whatever was there before) and returns control to the
          process (returning the length of the message).
        </p>
      </li>
      <li>
        <p>
          Handling of IRQs : some hardware stuff requires action as soon as
          the interrupt is fired, therefore a specifi IRQ handler may be used.
          Such a handler must do as little as possible, and when it is done
          signal level 1 that an IRQ has happenned (it may add specific data
          to the &ldquo;IRQ happenned&rdquo; message). Level 1 adds a message
          to the queue of the recipient process (if there is one) and returns
          immediately : the IRQ handler must leave as soon as possible. An IRQ
          is handled on whatever stack is currently used, and the IF flag is
          constantly off while the IRQ handler is running. The timer IRQ is
          the only one that behaves differently, since it has to trigger a
          task switch.
        </p>
      </li>
    </ul>
    <h3 id="auto-70">5.2<span style="margin-left: 1em"></span>Steps of the developpment of the OS</h3>
    <ol>
      <li>
        <p>
          Develop level 0 completely and with cleanest possible design
        </p>
      </li>
      <li>
        <p>
          Develop level 1 with only basic funcionnality
        </p>
      </li>
      <li>
        <p>
          Develop some basic applications in level 2 : display, keyboard, mini
          kernel shell, mini file system, &hellip;
        </p>
      </li>
      <li>
        <p>
          Improve level 1 with more complex stuff ; try to quickly attain a
          complete level 1
        </p>
      </li>
      <li>
        <p>
          Work on the rest of the stuff
        </p>
      </li>
    </ol>
  </body>
</html>