diff --git a/Concepts.html b/Concepts.html index 3b377fc..a4509b7 100644 --- a/Concepts.html +++ b/Concepts.html @@ -1,10 +1,10 @@ -1 Concepts
On this page:
1.1 What is a process, what are event handlers?
1.2 What is a VM?
1.3 Endpoints:   Subscription and Advertisement
1.4 Messages and Topics
1.5 Presence
1.6 Nesting, relaying, and levels of discourse
5.3.4.11

1 Concepts

Marketplace integrates ideas from both distributed systems and +1 Concepts

5.3.900.5

1 Concepts

Marketplace integrates ideas from both distributed systems and virtualized operating system designs to obtain an architecture of nested virtual machines (VMs). Each nested layer is equipped with its own publish/subscribe network that also propagates presence information about the (dis)appearance of services.

Throughout this manual, diagrams such as the following will illustrate -various process structures:

image

Rectangular boxes represent VMs. The processes running within each VM +various process structures:

image

Rectangular boxes represent VMs. The processes running within each VM are placed atop its box. The narrow rectangular strip at the top of each VM’s box represents the network connecting all the VM’s processes to each other; it will frequently contain a short description of the @@ -97,7 +97,7 @@ may be quite different in syntax and meaning from those sent across the same VM’s external network: consider the case of the TCP chat server, which employs a nested VM to separate out TCP-related messages from higher-level, application-specific chat -messages:

image

Each VM’s network corresponds to a distinct level of discourse. +messages:

image

Each VM’s network corresponds to a distinct level of discourse. The nesting of VMs is then roughly analogous to the layering of network protocol stacks. For example (and purely hypothetically!) the -TCP-IP/HTTP/Webapp stack could perhaps be represented as

image

 
\ No newline at end of file +TCP-IP/HTTP/Webapp stack could perhaps be represented as

image

 
\ No newline at end of file diff --git a/Drivers.html b/Drivers.html index 5b102c4..22c8970 100644 --- a/Drivers.html +++ b/Drivers.html @@ -1,5 +1,5 @@ -4 Drivers
On this page:
4.1 event-relay
event-relay
4.2 tcp-bare
tcp-driver
tcp
4.2.1 TCP channels
tcp-channel
Tcp  Sub  Packet
4.2.2 TCP addresses
Tcp  Address
tcp-address
tcp-handle
tcp-listener
4.2.3 Opening an outbound connection
4.2.4 Accepting inbound connections
4.2.5 Receiving data
4.2.6 Sending data
4.3 timer (typed and untyped)
4.4 udp (typed and untyped)
5.3.4.11

4 Drivers

4.1 event-relay

procedure

(event-relay self-id)  Spawn

  self-id : Symbol
Lets processes in some nested VM interact with the outside +4 Drivers
5.3.900.5

4 Drivers

4.1 event-relay

procedure

(event-relay self-id)  Spawn

  self-id : Symbol
Lets processes in some nested VM interact with the outside world using ground-vm-level event-based subscriptions.

Returns a spawn which starts an event-relay process with debug-name `(event-relay ,self-id).
The relay process observes subscriptions matching the topic-pattern (cons (? evt?) _), and when one appears, constructs an diff --git a/Examples.html b/Examples.html index 0a43dbf..6ada0a9 100644 --- a/Examples.html +++ b/Examples.html @@ -1,5 +1,5 @@ -6 Examples
5.3.4.11

6 Examples

6.1 TCP echo server

Here is a complete Marketplace program:

"examples/echo-paper.rkt"

#lang marketplace
 
(observe-publishers (tcp-channel ? (tcp-listener 5999) ?)
(match-conversation (tcp-channel from to _)
(on-presence (spawn (echoer from to)))))
 
(define (echoer from to)
(transition stateless
(publisher (tcp-channel to from ?))
(subscriber (tcp-channel from to ?)
(on-absence (quit))
(on-message
 [(tcp-channel _ _ data)
  (send-message (tcp-channel to from data))]))))

The top-level observe-publishers monitors TCP connections +6 Examples

5.3.900.5

6 Examples

6.1 TCP echo server

Here is a complete Marketplace program:

"examples/echo-paper.rkt"

#lang marketplace
 
(observe-publishers (tcp-channel ? (tcp-listener 5999) ?)
(match-conversation (tcp-channel from to _)
(on-presence (spawn (echoer from to)))))
 
(define (echoer from to)
(transition stateless
(publisher (tcp-channel to from ?))
(subscriber (tcp-channel from to ?)
(on-absence (quit))
(on-message
 [(tcp-channel _ _ data)
  (send-message (tcp-channel to from data))]))))

The top-level observe-publishers monitors TCP connections arriving on port 5999 and spawns a fresh process in response to each with the help of the auxiliary echoer function. The topic of conversation associated with the each new connection is diff --git a/Management_and_Monitoring.html b/Management_and_Monitoring.html index d8cc938..d9051b7 100644 --- a/Management_and_Monitoring.html +++ b/Management_and_Monitoring.html @@ -1,5 +1,5 @@ -5 Management and Monitoring

5.3.4.11

5 Management and Monitoring

5.1 generic-spy

procedure

(generic-spy label)  Spawn

  label : Any
Returns a spawn action that, when executed, creates a process +5 Management and Monitoring
5.3.900.5

5 Management and Monitoring

5.1 generic-spy

procedure

(generic-spy label)  Spawn

  label : Any
Returns a spawn action that, when executed, creates a process with a #:subscriber endpoint listening for every message. Each EndpointEvent received by the endpoint is printed to the current output port. Using this process gives a crude diff --git a/high-level-interface.html b/high-level-interface.html index 0d70f22..5fd6019 100644 --- a/high-level-interface.html +++ b/high-level-interface.html @@ -1,5 +1,5 @@ -2 High-level interface
5.3.4.11

2 High-level interface

This high-level interface between a VM and a process is analogous to +2 High-level interface

5.3.900.5

2 High-level interface

This high-level interface between a VM and a process is analogous to the C library interface of a Unix-like operating system. The Low-level interface corresponds to the system call interface of a Unix-like operating system.

2.1 Using #lang marketplace and friends

 #lang marketplace

Programs written for Marketplace differ from normal Racket modules diff --git a/index.html b/index.html index 0d2efba..d82be7f 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ -Marketplace: Network-Aware Programming

5.3.4.11

Marketplace: Network-Aware Programming

Tony Garnock-Jones <tonyg@ccs.neu.edu>

Every program is a network. +Marketplace: Network-Aware Programming

5.3.900.5

Marketplace: Network-Aware Programming

Tony Garnock-Jones <tonyg@ccs.neu.edu>

Every program is a network. This is the insight behind the π-calculus. Encoding a program as a π-calculus term shows it as a network of communicating processes. It is also one of the original inspirations for Smalltalk, where every diff --git a/low-level-interface.html b/low-level-interface.html index 4582226..f705a1e 100644 --- a/low-level-interface.html +++ b/low-level-interface.html @@ -1,5 +1,5 @@ -3 Low-level interface

5.3.4.11

3 Low-level interface

 (require marketplace)

At its heart, the interface between each process and its +3 Low-level interface

5.3.900.5

3 Low-level interface

 (require marketplace)

At its heart, the interface between each process and its containing VM is based on handler functions exchanging event and action structures with the VM. Both events and actions are simple Racket structures.

This low-level interface between a VM and a process is analogous to diff --git a/pict.png b/pict.png index a87c41e..0ab91cc 100644 Binary files a/pict.png and b/pict.png differ diff --git a/pict_2.png b/pict_2.png index 3ccb1c2..f8e93ce 100644 Binary files a/pict_2.png and b/pict_2.png differ diff --git a/pict_3.png b/pict_3.png index 170ae9f..1bf20d0 100644 Binary files a/pict_3.png and b/pict_3.png differ