<div dir="ltr"><div><div class="gmail_extra"><div><div>Quick browsed the doc this morning.<br></div><div><br>Very happy to see this.  Some novelty here I think.  The Pub/Sub vs. say strict Actor Peer-To-Peer seems more flexible.  Typed Endpoints and Handlers. Yea!!  <br>
<br>Looks like I can throw out some really half-baked code that addresses similar functionality as Marketplace and does a poor job of doing so and use Marketplace.<br>


<br></div>What is the general assumption, if any, regarding message delivery guarantees?  Guaranteed, Once-And-Only-Once, At-Most-Once.  And Message Ordering.  Say between 2 physical node Ground-VMs across a network?<br>

</div><div>Node 1 - Process A - sends M1 - sends M2  ----&gt; Node 2 - Process B always consumes M1 before M2?<br><br></div><div>Also rather curious on details of Marketplaces&#39; approach to &quot;Let-It-Fail&quot; semantics and Nanny monitoring / restarting of processes.<br>
</div><div><br></div><div>And it&#39;s in Typed Racket too.  Double plus good.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 5:47 PM, Sam Tobin-Hochstadt <span dir="ltr">&lt;<a href="mailto:samth@ccs.neu.edu" target="_blank">samth@ccs.neu.edu</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We are happy to announce the release of Marketplace, a new programming<br>
language for building functional network programs.  Marketplace combines<br>
two fundamental ideas in a new way: nested virtual machines and<br>
publish/subscribe messaging.  Nesting allows programs to isolate<br>
processes and to delimit conversations. While publish/subscribe generalizes<br>
point-to-point and broadcast messaging, it smoothly turns the appearance<br>
and disappearance of participants and resources into _presence_ and<br>
_absence_ messages. Such messages make it particularly easy to start and<br>
stop services and to manage resources based on demand.<br>
<br>
Here is a simple TCP echo server written in Marketplace:<br>
<br>
#lang marketplace<br>
<br>
(endpoint #:subscriber (tcp-channel ? (tcp-listener 5999) ?)<br>
          #:conversation (tcp-channel from to _)<br>
          #:on-presence (spawn #:child (echoer from to)))<br>
<br>
;; echoer: TcpAddress TcpAddress -&gt; Transition<br>
(define (echoer from to)<br>
  (transition stateless<br>
    (endpoint #:subscriber (tcp-channel from to ?)<br>
              #:on-absence (quit)<br>
              [(tcp-channel _ _ data)<br>
               (send-message (tcp-channel to from data))])))<br>
<br>
The initial `endpoint` subscribes to TCP messages on port 5999. When a<br>
conversational partner appears, the endpoint spawns a new process that runs an<br>
`echoer` process.  The latter is stateless and subscribes to TCP<br>
messages.  When it gets messages with payload `data`, it sends them back<br>
out with the opposite addressing; when the TCP conversation disappears, it<br>
quits.<br>
<br>
Thus far, we have built several real systems using Marketplace: a<br>
DNS server, a DNS proxy, and an SSH server.  The DNS proxy has handled<br>
DNS traffic for ourselves and other members of our lab for the last<br>
several months.<br>
<br>
You can read an overview along with detailed documentation for<br>
Marketplace at <a href="http://tonyg.github.io/marketplace/" target="_blank">http://tonyg.github.io/marketplace/</a> .<br>
<br>
To get the sources for Marketplace as well as the applications<br>
point your browser to <a href="https://github.com/tonyg/marketplace" target="_blank">https://github.com/tonyg/marketplace</a> .<br>
<br>
Enjoy!<br>
<br>
Tony Garnock-Jones<br>
<span><font color="#888888">Sam Tobin-Hochstadt<br>
Matthias Felleisen<br>
____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</font></span></blockquote></div><br></div></div></div>