marketplace-2014/index.html

37 lines
20 KiB
HTML
Raw Permalink Normal View History

2013-05-20 20:45:07 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2014-01-18 01:58:19 +00:00
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Marketplace: Network-Aware Programming</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Marketplace:<span class="mywbr"> &nbsp;</span> Network-<wbr></wbr>Aware Programming</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="Concepts.html" class="tocviewlink" data-pltdoc="x">Concepts</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="high-level-interface.html" class="tocviewlink" data-pltdoc="x">High-<wbr></wbr>level interface</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="low-level-interface.html" class="tocviewlink" data-pltdoc="x">Low-<wbr></wbr>level interface</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="Drivers.html" class="tocviewlink" data-pltdoc="x">Drivers</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="Management_and_Monitoring.html" class="tocviewlink" data-pltdoc="x">Management and Monitoring</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="Examples.html" class="tocviewlink" data-pltdoc="x">Examples</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._marketplace%29" class="tocsubseclink" data-pltdoc="x">Marketplace:<span class="mywbr"> &nbsp;</span> Network-<wbr></wbr>Aware Programming</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.0.0.1</span></div><div class="navsettop"><span class="navleft">&nbsp;&nbsp;</span><span class="navright">&nbsp;&nbsp;<span class="nonavigation">&larr; prev</span>&nbsp;&nbsp;<span class="nonavigation">up</span>&nbsp;&nbsp;<a href="Concepts.html" title="forward to &quot;1 Concepts&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h2><a name="(part._marketplace)"></a>Marketplace: Network-Aware Programming</h2><div class="SAuthorListBox"><span class="SAuthorList"><p class="author">Tony Garnock-Jones &lt;<a href="mailto:tonyg@ccs.neu.edu">tonyg@ccs.neu.edu</a>&gt;</p></span></div><p><span style="font-weight: bold">Every program is a network.</span>
2013-05-20 20:45:07 +00:00
This is the insight behind the &#960;-calculus. Encoding a program as a
&#960;-calculus term shows it as a network of communicating processes. It
is also one of the original inspirations for Smalltalk, where every
object, every value, was imagined to be a separate computer in a vast
network, and where objects communicated by message-passing.</p><p><span style="font-weight: bold">Every program is part of a network.</span>
A program that computes a result but cannot communicate it is useless
indeed. Every complete program both <span style="font-style: italic">computes</span> and
<span style="font-style: italic">communicates</span>. Furthermore, it does so with some finite set of
<span style="font-style: italic">resources</span>, which it must carefully manage.</p><p><span style="font-weight: bold">Our programming languages do not recognise that every program is
a network.</span> They blur the distinction between stateful and stateless
portions of a program, making it difficult for programmers to reason
about concurrency, contention, and distribution. They often treat
partial failure as an afterthought, despite its importance in
reasoning about program behaviour, particularly in connection with the
effect of exceptions on stateful programs. They seldom consider issues
of trust and security.</p><p><span style="font-weight: bold">Our programming languages do not recognise that every program is part of a network.</span>
They treat communication with the outside world in an ad-hoc manner.
They frequently treat network communication separately from
<span class="stt">1950s-style terminal input and output</span>. They force the programmer
to divine failures in other parts of the network by arcane means such
as timeouts and examining the entrails of dead communication channels.
They offer no support for allocating or releasing local resources in
response to changes in other parts of the network. They seldom
consider issues of trust and security.</p><p><span style="font-weight: bold">Marketplace is a network-aware programming language.</span> As a
corollary, because every program not only computes but also
communicates and manages its resources, Marketplace is also a
distributed operating system.</p><p>By recognising that programs communicate both
<span style="font-style: italic">internally</span> (between subprograms) and <span style="font-style: italic">externally</span> (between
peers), we recognise an inherently recursive layered architecture. We
see at every level the <span style="font-style: italic">same</span> concerns of resource management,
location of mutable state, failure detection and recovery, access
control, I/O and user interface, debugging and profiling.</p><p>Marketplace addresses these concerns with a small set of primitives
chosen to make network programming in-the-small as flexible, scalable,
manageable and securable as network programming in-the-large&#8212;<wbr></wbr>and
2013-06-11 00:04:06 +00:00
vice versa.</p><table cellspacing="0"><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html" class="toptoclink" data-pltdoc="x">1<span class="hspace">&nbsp;</span>Concepts</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._.What_is_a_process__what_are_event_handlers_%29" class="toclink" data-pltdoc="x">1.1<span class="hspace">&nbsp;</span>What is a process, what are event handlers?</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._.What_is_a_.V.M_%29" class="toclink" data-pltdoc="x">1.2<span class="hspace">&nbsp;</span>What is a VM?</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._.Endpoints__.Subscription_and_.Advertisement%29" class="toclink" data-pltdoc="x">1.3<span class="hspace">&nbsp;</span>Endpoints: Subscription and Advertisement</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._messages-and-topics%29" class="toclink" data-pltdoc="x">1.4<span class="hspace">&nbsp;</span>Messages and Topics</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._.Presence%29" class="toclink" data-pltdoc="x">1.5<span class="hspace">&nbsp;</span>Presence</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="Concepts.html#%28part._.Nesting__relaying__and_levels_of_discourse%29" class="toclink" data-pltdoc="x">1.6<span class="hspace">&nbsp;</span>Nesting, relaying, and levels of discourse</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html" class="toptoclink" data-pltdoc="x">2<span class="hspace">&nbsp;</span>High-level interface</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._hashlang-variations%29" class="toclink" data-pltdoc="x">2.1<span class="hspace">&nbsp;</span>Using <span class="stt">#lang marketplace</span> and friends</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._.Using_.Marketplace_as_a_library%29" class="toclink" data-pltdoc="x">2.2<span class="hspace">&nbsp;</span>Using Marketplace as a library</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._constructing-transitions%29" class="toclink" data-pltdoc="x">2.3<span class="hspace">&nbsp;</span>Constructing transitions</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._endpoint-dsl%29" class="toclink" data-pltdoc="x">2.4<span class="hspace">&nbsp;</span>Creating endpoints</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._.Receiving_messages%29" class="toclink" data-pltdoc="x">2.4.1<span class="hspace">&nbsp;</span>Receiving messages</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._.Action-only_vs__.State_updates%29" class="toclink" data-pltdoc="x">2.4.2<span class="hspace">&nbsp;</span>Action-only vs. State updates</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._.Handling_presence_and_absence_events%29" class="toclink" data-pltdoc="x">2.4.3<span class="hspace">&nbsp;</span>Handling presence and absence events</a></p></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="high-level-interface.html#%28part._.Exit_reasons%29" class="toclink" data-p