Abstract | ||
---|---|---|
Most implementations of critical Internet protocols are written in type-unsafe languages such as C or C++ and are regularly vulnerable to serious security and reliability problems. Type-safe languages eliminate many errors but are not used to due to the perceived performance overheads. We combine two techniques to eliminate this performance penalty in a practical fashion: strong static typing and generative meta-programming. Static typing eliminates run-time type information by checking safety at compile-time and minimises dynamic checks. Meta-programming uses a single specification to abstract the low-level code required to transmit and receive packets. Our domain-specific language, MPL, describes Internet packet protocols and compiles into fast, zero-copy code for both parsing and creating these packets. MPL is designed for implementing quirky Internet protocols ranging from the low-level: Ethernet, IPv4, ICMP and TCP; to the complex application-level: SSH, DNS and BGP; and even file-system protocols such as 9P. We report on fully-featured SSH and DNS servers constructed using MPL and our OCaml framework Melange, and measure greater throughput, lower latency, better flexibility and more succinct source code than their C equivalents OpenSSH and BIND. Our quantitative analysis shows that the benefits of MPL-generated code overcomes the additional overheads of automatic garbage collection and dynamic bounds checking. Qualitatively, the flexibility of our approach shows that dramatic optimisations are easily possible. |
Year | DOI | Venue |
---|---|---|
2007 | 10.1145/1272996.1273009 | Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007 |
Keywords | Field | DocType |
source code,quantitative analysis,overlays,meta programming,domain specific language,internet protocol,garbage collection | Internet Protocol,Computer science,Source code,Network packet,Server,Real-time computing,Garbage collection,Internet Control Message Protocol,Bounds checking,The Internet,Embedded system | Conference |
Volume | Issue | ISSN |
41 | 3 | 0163-5980 |
Citations | PageRank | References |
23 | 1.19 | 25 |
Authors | ||
5 |
Name | Order | Citations | PageRank |
---|---|---|---|
Anil Madhavapeddy | 1 | 674 | 52.83 |
Alex Ho | 2 | 3450 | 338.89 |
Tim Deegan | 3 | 166 | 8.36 |
David Scott | 4 | 430 | 40.65 |
Ripduman Sohan | 5 | 368 | 30.28 |