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 object, every value, was imagined to be a separate computer in a vast network, and where objects communicated by message-passing.
Every program is part of a network. A program that computes a result but cannot communicate it is useless indeed. Every complete program both computes and communicates. Furthermore, it does so with some finite set of resources, which it must carefully manage.
Our programming languages do not recognise that every program is a network. 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.
Our programming languages do not recognise that every program is part of a network. They treat communication with the outside world in an ad-hoc manner. They frequently treat network communication separately from 1950s-style terminal input and output. 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.
Marketplace is a network-aware programming language. As a corollary, because every program not only computes but also communicates and manages its resources, Marketplace is also a distributed operating system.
By recognising that programs communicate both internally (between subprograms) and externally (between peers), we recognise an inherently recursive layered architecture. We see at every level the same concerns of resource management, location of mutable state, failure detection and recovery, access control, I/O and user interface, debugging and profiling.
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—