marketplace-2014/README.md

80 lines
3.1 KiB
Markdown
Raw Normal View History

2013-06-07 22:21:23 +00:00
# Marketplace: Bringing the Network into the Programming Language
2013-03-29 03:18:55 +00:00
2013-06-07 22:21:23 +00:00
Marketplace is a concurrent language able to express communication,
enforce isolation, and manage resources. Network-inspired extensions
to a functional core represent imperative actions as values, giving
side-effects locality and enabling composition of communicating
processes.
Collaborating programs are grouped within task-specific *virtual
machines* (VMs) to scope their interactions. Conversations between
programs are multi-party (using a publish/subscribe medium), and
programs can easily participate in many such conversations at once.
Marketplace makes *presence* notifications an integral part of
pub/sub. Programs react to presence and absence notifications that
report the comings and goings of their peers. Presence serves to
communicate changes in demand for and supply of services, both within
a VM and across *nested VM layers*. Programs can give up
responsibility for maintaining presence information and for scoping
group communications to their containing VM.
## Documentation
2013-03-29 03:18:55 +00:00
2013-05-21 16:04:07 +00:00
A (draft) manual for Marketplace is available
[here](http://tonyg.github.io/marketplace/).
2013-06-07 22:21:23 +00:00
## The code
2013-07-17 16:22:03 +00:00
This repository contains a [Racket](http://racket-lang.org/) package,
2013-03-29 03:18:55 +00:00
`marketplace`, which includes
2013-07-17 16:22:03 +00:00
- the implementation of the `#lang marketplace` language, in the
[top directory](https://github.com/tonyg/marketplace/tree/typeless/).
2013-03-29 03:18:55 +00:00
2013-06-07 22:21:23 +00:00
- a TCP echo server example, in
[`examples/echo-paper.rkt`](https://github.com/tonyg/marketplace/tree/typeless/examples/echo-paper.rkt).
2013-03-29 03:18:55 +00:00
2013-06-07 22:21:23 +00:00
- a TCP chat server example, in
[`examples/chat-paper.rkt`](https://github.com/tonyg/marketplace/tree/typeless/examples/chat-paper.rkt).
2013-03-29 03:18:55 +00:00
2013-06-07 22:21:23 +00:00
- Haskell, Erlang and Python implementations of the chat server for comparison, in
[`examples/chat.hs`](https://github.com/tonyg/marketplace/tree/typeless/examples/chat.hs),
[`chat.erl`](https://github.com/tonyg/marketplace/tree/typeless/examples/chat.erl),
2013-03-29 03:18:55 +00:00
and
[`chat.py`](https://github.com/tonyg/marketplace/tree/typeless/examples/chat.py)
2013-03-29 03:18:55 +00:00
respectively.
2013-06-07 22:21:23 +00:00
## Compiling and running the code
2013-03-29 03:18:55 +00:00
2014-08-06 16:52:26 +00:00
You will need Racket version 6.1.x or later.
2013-03-29 03:18:55 +00:00
2013-03-29 19:31:46 +00:00
Once you have Racket installed, run
2014-08-06 16:52:26 +00:00
raco pkg install marketplace
to install the package from the Racket package repository, or
2013-03-29 19:31:46 +00:00
raco pkg install --link `pwd`
2014-08-06 16:52:26 +00:00
from the root directory of the Git checkout to install the package
from a local snapshot. (Alternatively, `make link` does the same thing.)
2013-03-29 19:31:46 +00:00
This will make `#lang marketplace` available to programs.
2013-03-29 03:18:55 +00:00
At this point, you may load and run any of the example `*.rkt` files
in the
[`examples/`](https://github.com/tonyg/marketplace/tree/typeless/examples/)
2013-03-29 03:18:55 +00:00
directory.
Note that both the echo server and chat server examples do not print
any output on standard output: instead, they simply start running and
silently await TCP connections. Once one of the servers is running, in
a separate window, try `telnet localhost 5999`.
Note also that both the echo server and the chat server use port 5999,
so you cannot run both simultaneously.
## Copyright
2014-08-06 16:52:26 +00:00
Copyright © Tony Garnock-Jones 2010, 2011, 2012, 2013, 2014.