QMachine (QM) is a web service for distributed computing. Its design relaxes the usual requirements of a distributed computer so far that it can be powered completely by web browsers – without installing anything. As a model for computation, QM has been detailed in a recent paper, QMachine: commodity supercomputing in web browsers. This manual details QM as a software platform, with particular focuses on how it works, how to use it, and how to contribute to the open-source project.
How it works¶
Most QM-related software falls into two categories. API clients are programs that consume QM’s API, and API servers are programs that provide the API. Web servers represent a third category, however, that is important only for hosting content such as the browser client library.
An API server, by way of contrast, is a program that provides QM’s API by listening for and responding to specific HTTP requests, as defined by QM’s HTTP API. There are two implementations to choose from: the original reference version written in Node.js and the “teaching version” written in Ruby. The Node.js version is recommended for production.
For convenience in hosting, basic web servers are packaged alongside the API servers. A web server listens for and responds to HTTP requests for files and other resources that are published online. A web server is not strictly necessary as part of QM, but it is useful for making the browser client available to web browsers. The web servers bundled with the API servers are present only for convenience, and it is trivial to use off-the-shelf web servers like Apache or Nginx instead. (In fact, QM’s own homepage uses Nginx.)