S3: the Small Scheme Stack A Scheme TCP/IP Stack Targeting Small Embedded Applications
Vincent St-Amour Universit´ e de Montr´ eal Joint work with Lysiane Bouchard and Marc Feeley Scheme and Functional Programming Workshop September 20, 2008
1 / 37
S 3 : the Small Scheme Stack A Scheme TCP/IP Stack Targeting Small - - PowerPoint PPT Presentation
S 3 : the Small Scheme Stack A Scheme TCP/IP Stack Targeting Small Embedded Applications Vincent St-Amour Universit e de Montr eal Joint work with Lysiane Bouchard and Marc Feeley Scheme and Functional Programming Workshop September 20,
1 / 37
2 / 37
◮ user (configuration, control) ◮ storage device (to keep logs) ◮ other embedded systems (automation, distribution) 3 / 37
4 / 37
5 / 37
◮ Why not? ◮ Scheme’s high-level features → compact code
6 / 37
7 / 37
8 / 37
◮ Server listens for connections on a port number ◮ Client connects to that port ◮ Stream paradigm ◮ Packets are acknowledged by receiver ◮ Sender retransmits after timeout 9 / 37
◮ PICOBIT Scheme virtual machine ◮ Higher-order functions 10 / 37
11 / 37
12 / 37
13 / 37
14 / 37
15 / 37
16 / 37
17 / 37
18 / 37
19 / 37
20 / 37
21 / 37
◮ Header stored in object space ◮ Data stored in a contiguous block in vector space ◮ Data space reclaimed when header gets garbage-collected
22 / 37
23 / 37
◮ Tasks stored as state functions within the connection
◮ Continuation-based coroutine mechanism ◮ Dynamic creation of state functions
24 / 37
25 / 37
◮ One packet in the stack at a time ◮ No buffering ◮ Low amount of traffic for expected applications
◮ No costs related to the upkeep of a packet queue (code, space,
◮ Not a threat to communication integrity
◮ Higher risk of congestion ◮ Dropping packets might cause delays
26 / 37
27 / 37
28 / 37
29 / 37
30 / 37
31 / 37
32 / 37
◮ Similar feature set ◮ Similar design choices ◮ No buffering ◮ Application program interface 33 / 37
◮ Na¨
◮ Other combinations possible to adapt to the target system
34 / 37
35 / 37
36 / 37
37 / 37