Welcome to the Disco🔮 developer guide.
If you want to get an in depth guide of how to run things (and why and how they work) you can have a look at our on boarding document
To quickly get up and running you can find some relevant information here as well as in the server document.
If you run into any sort of trouble then hopefully you can find an answer in our faq; otherwise please create a new issue. If you want to contribute to Disco🔮, then please have a look at our contributing guide; and if you are curious about our architecture you can find information here.
The following command lines will install the required dependencies, build Disco.js and start the Disco server (on localhost:8080) and the Disco web client (on localhost:8081). We recommend using (and assume you are) nvm (the Node Version Manager).
git clone [email protected]:epfml/disco.git
cd disco
nvm use
cd discojs && npm ci && npm run build
cd ..
cd server && npm ci && npm run dev
cd ..
cd web-client && npm ci && npm run dev
For full details, see the respective README files, that is discojs-core, discojs, discojs-node, server, web-client and cli.
The Disco GitHub repository is composed of four main directories:
- discojs contains Disco.js, the main library used by the other projects within this repo. It is also available as standalone libraries on NPM, for both the browser and Node.js.
- discojs-web contains the browser implementation of the Disco.js library. It is available on NPM as
@epmfl/discojs
. - discojs-node contains the Node.js implementatino of the Disco.js library. It is available on NPM as
@epfml/discojs-node
. - discojs-core contains code common to
discojs-web
anddiscojs-node
. Little source code changes between the two implementations, hence the need for a "core" directory.
- discojs-web contains the browser implementation of the Disco.js library. It is available on NPM as
- server contains the Node.js server for Disco, enabling the decentralized (with peer-to-peer coordination) and federated learning of Disco.js nodes. It uses
discojs-node
under the hood. - web-client contains a web client to interact with Disco.js and the Disco server via a user-friendly UI. This basically emulates a Disco.js node in the network. It uses
discojs-web
as backend. - cli contains the CLI tool for Disco.js. Just like
web-client
, it emulates a Disco.js node in the network. Furthermore, it can actually emulate multiple nodes and even manages its own Disco server instance. It usesdiscojs-node
under the hood.
A full -- self-contained -- examples of the Disco.js API running two federated users can be found here. This runs on Node.js outside of any browser, using the @epfml/discojs-node
NPM package and the server
module of this repo. A Disco server is run from the script itself and the data is already available in the repo.