[racket] Marketplace: A language for network-aware programming
Quick browsed the doc this morning.
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!!
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.
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?
Node 1 - Process A - sends M1 - sends M2 ----> Node 2 - Process B always
consumes M1 before M2?
Also rather curious on details of Marketplaces' approach to "Let-It-Fail"
semantics and Nanny monitoring / restarting of processes.
And it's in Typed Racket too. Double plus good.
On Wed, May 29, 2013 at 5:47 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>wrote:
> We are happy to announce the release of Marketplace, a new programming
> language for building functional network programs. Marketplace combines
> two fundamental ideas in a new way: nested virtual machines and
> publish/subscribe messaging. Nesting allows programs to isolate
> processes and to delimit conversations. While publish/subscribe generalizes
> point-to-point and broadcast messaging, it smoothly turns the appearance
> and disappearance of participants and resources into _presence_ and
> _absence_ messages. Such messages make it particularly easy to start and
> stop services and to manage resources based on demand.
>
> Here is a simple TCP echo server written in Marketplace:
>
> #lang marketplace
>
> (endpoint #:subscriber (tcp-channel ? (tcp-listener 5999) ?)
> #:conversation (tcp-channel from to _)
> #:on-presence (spawn #:child (echoer from to)))
>
> ;; echoer: TcpAddress TcpAddress -> Transition
> (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 initial `endpoint` subscribes to TCP messages on port 5999. When a
> conversational partner appears, the endpoint spawns a new process that
> runs an
> `echoer` process. The latter is stateless and subscribes to TCP
> messages. When it gets messages with payload `data`, it sends them back
> out with the opposite addressing; when the TCP conversation disappears, it
> quits.
>
> Thus far, we have built several real systems using Marketplace: a
> DNS server, a DNS proxy, and an SSH server. The DNS proxy has handled
> DNS traffic for ourselves and other members of our lab for the last
> several months.
>
> You can read an overview along with detailed documentation for
> Marketplace at http://tonyg.github.io/marketplace/ .
>
> To get the sources for Marketplace as well as the applications
> point your browser to https://github.com/tonyg/marketplace .
>
> Enjoy!
>
> Tony Garnock-Jones
> Sam Tobin-Hochstadt
> Matthias Felleisen
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130530/51fd2b38/attachment.html>