Crude sketch of documentation

This commit is contained in:
Tony Garnock-Jones 2013-04-22 20:55:07 -04:00
parent d3045920e2
commit 6fd0ad0451
8 changed files with 1134 additions and 0 deletions

1
marketplace/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
doc/

2
marketplace/info.rkt Normal file
View File

@ -0,0 +1,2 @@
#lang setup/infotab
(define scribblings '(("scribblings/marketplace.scrbl" (multi-page))))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
#lang scribble/manual
@require[racket/include]
@include{prelude.inc}
@title{Example: Echo Server}
Here is a complete Marketplace program, @tt{examples/echo-paper.rkt}:
@#reader scribble/comment-reader (racketmod marketplace
(endpoint #:subscriber (tcp-channel ? (tcp-listener 5999) ?)
#:conversation (tcp-channel from to _)
#:on-presence (spawn #:child (echoer from to)))
(define (echoer from to)
(transition stateless
(endpoint #:subscriber (tcp-channel from to ?)
#:on-absence (quit)
[(tcp-channel _ _ data)
(send-message (tcp-channel to from data))])))
)
The top-level @racket[endpoint] action subscribes to TCP connections
arriving on port 5999, and @racket[spawn]s a fresh process in response to
each (@racket[#:on-presence]). The topic of
conversation (@racket[#:conversation]) associated with the newly-present
subscription is analyzed to give the remote
(@racket[from]) and local (@racket[to]) TCP addresses, which are
passed to the @racket[echoer] function to give the initial actions for
the corresponding process. Here, the process is stateless, using the
special constant @racket[stateless] as its state.
Each connection's process creates an endpoint subscribing to data
arriving on its particular connection, using @racket[from] and @racket[to]
passed in from the top-level @racket[endpoint]. When data arrives, it is
echoed back to the remote peer using @racket[send-message]. Presence
manages disconnection; when the remote peer closes the TCP connection,
the @racket[#:on-absence] handler in @racket[echoer] issues a @racket[quit]
action, terminating the connection's process. The heart of our system
is the interface between a process and its containing VM. Our
implementation instantiates this interface as a collection of Typed
Racket programs.

View File

@ -0,0 +1,17 @@
#lang scribble/manual
@require[racket/include]
@include{prelude.inc}
@title[#:tag "marketplace"]{Marketplace: Functional Systems Programming}
@author[(author+email "Tony Garnock-Jones" "tonyg@ccs.neu.edu")]
@defmodulelang[marketplace]
This manual TODO
@local-table-of-contents[]
@include-section["overview.scrbl"]
@include-section["echo-server-example.scrbl"]
@include-section["MISC.scrbl"]

View File

View File

@ -0,0 +1,28 @@
#lang scribble/manual
@require[racket/include]
@include{prelude.inc}
@title{Overview}
In this paper, we present a novel "marketplace" approach to
functional systems programming, generalizing
Felleisen et al.'s "Worlds and Universes" approach to
functional I/O
[ICFP 2009]. We integrate ideas from both distributed systems
and virtualized operating system designs to obtain a novel
architecture of nested virtual machines. Each nested layer is equipped with
its own publish/subscribe network that also propagates information
about the (dis)appearance of services. Our paper presents
several case studies, including a recursive DNS resolver that
has served our lab's DNS traffic for the past nine months.
Our goal is to reconcile this tension, starting from the "Worlds
and Universes" approach to functional I/O and
generalizing to
functional systems programming. We augment
its inherent support for concurrency with publish/subscribe (pub/sub)
messaging, a notion of presence, and
nestable virtual machines (VMs). The result suggests a @emph{
marketplace} metaphor, where communicating programs exist in a
noisy, crowded, even chaotic context, rather than in a quiet place
systematically going through their inboxes.

View File

@ -0,0 +1,3 @@
(require scribble/racket
scriblib/footnote
(for-label racket))