Skip to content

Commit a8da00f

Browse files
authored
Restructuring (#39)
* Restyle light-mode WIP * Redesign and condensation of content * Adjust padding of sidebars * Remove styling * Revert to previous layout
1 parent a75413b commit a8da00f

File tree

14 files changed

+85
-63
lines changed

14 files changed

+85
-63
lines changed

docs/computing/persistent.md renamed to docs/VMs/index.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
1-
# Persistent Execution
1+
# Computing on Aleph.im
22

3-
## Introduction
3+
Aleph.im offers a decentralized computing framework that allows users to run
4+
programs on the network. This is done by creating a virtual machine (VM) that
5+
executes the program.
46

5-
The aleph.im network can run programs in two different manners:
7+
## Overview of VMs
68

7-
* [on-demand execution](on_demand.md) runs programs only when needed, saving on resources. This is great to run programs
8-
that are responding to user requests or API calls and can shutdown after processing the event.
9-
* __persistent execution__ runs programs continuously. These are always running and great to run programs that cannot
10-
afford to stop or need to handle incoming connections such as polling data from a websocket or AMQP API.
9+
There are several types of VMs available on the network:
10+
11+
- [On-demand VM](#on-demand-execution)
12+
- [Persistent VM](#persistent-execution)
13+
- [Instance VM](#instance-vms)
14+
15+
An [On-demand VM](#on-demand-execution) is created on a [Compute Resource Node](../nodes/Compute_(CRN)/index.md)
16+
(CRN) and is destroyed once the program has finished executing. This is great
17+
for programs that are responding to user requests or API calls (using ASGI) and can shutdown
18+
after processing the event. They are also cheaper to run as they only require
19+
one tenth of the $ALEPH tokens to hold, compared to a [Persistent VM](#persistent-execution).
20+
21+
A [Persistent VM](#persistent-execution) can be used to run programs that cannot afford to stop or need
22+
to handle incoming connections such as polling data from a websocket or AMQP API.
23+
24+
Instances are similar to Persistent VMs, but are specifically designed to run with
25+
a SSH key supplied by the user. This allows the user to connect to the VM and
26+
interact with it directly. They do not rely on code execution, but rather on
27+
the user's ability to connect to the VM and run commands on it.
28+
They cost as much as Persistent VMs.
29+
30+
## On-demand Execution
31+
32+
On how to deploy a simple Python microVM, see our [Python microVM guide](../guides/python/getting_started.md)
33+
34+
## Persistent Execution
1135

1236
When a program is created with persistent execution enabled, the aleph.im scheduler will find a Compute Resource Node
1337
(CRN) with enough resources to run the program and schedule the program to start on that node.
@@ -17,7 +41,7 @@ CRN would the current one go offline.
1741

1842
> ⚠️ Automatic data migration across hosts in case such events happen is not available yet.
1943
20-
## Message Specification
44+
### Message Specification
2145

2246
The execution model of a program is defined in the field `message.content.on` of messages of type `PROGRAM` and is
2347
non exclusive. The same program can therefore be available as both persistent instance and on demand at the same time.
@@ -39,7 +63,7 @@ message = {
3963
}
4064
```
4165

42-
## Prerequisites
66+
### Prerequisites
4367

4468
Before you begin this tutorial, ensure that you have the following:
4569

@@ -73,7 +97,7 @@ cd ./src/
7397
uvicorn main:app --reload
7498
```
7599

76-
## Step 2: Run a program in a persistent manner
100+
### Step 2: Run a program in a persistent manner
77101

78102
To run the program in a persistent manner on the aleph.im network, use:
79103

@@ -87,10 +111,10 @@ You can stop the execution of the program using:
87111
aleph unpersist $MESSAGE_ID
88112
```
89113

90-
## Find your program
114+
### Find your program
91115

92116
TODO: Locate the CRN where your program is running.
93117

94-
## Conclusion
118+
## Instance VMs
95119

96-
In this tutorial, you learned how to create and deploy persistent Virtual Machines on the aleph.im network. You should now have a better understanding of how to use aleph.im for distributed computing.
120+
TODO: Document Instance VMs
File renamed without changes.

docs/computing/runtimes/existing.md renamed to docs/VMs/runtimes/existing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This runtime is built with software available in the distribution, including Pyt
99

1010
To optimize performance, this runtime uses a custom [Linux init](https://en.wikipedia.org/wiki/Init) process. This
1111
process is specially designed to quickly launch the right endpoint in response to events such as HTTP requests. This is
12-
especially useful when using [on-demand execution](../on_demand.md).
12+
especially useful when using [on-demand execution](../index.md#on-demand-execution).
1313

1414
[//]: # (Not available yet)
1515

docs/computing/runtimes/index.md renamed to docs/VMs/runtimes/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ custom runtimes, and use any available runtime on the network for your program.
1414

1515
## Init process
1616

17-
[On-demand Execution](../on_demand.md) relies on a custom [Linux init](https://en.wikipedia.org/wiki/Init) process,
17+
[On-demand Execution](../index.md#on-demand-execution) relies on a custom [Linux init](https://en.wikipedia.org/wiki/Init) process,
1818
optimized to launch the right endpoint in response to events such as HTTP requests. This custom init consists in two
1919
simple programs,
2020
[init0.sh](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes/aleph-alpine-3.13-python/init0.sh)
@@ -23,6 +23,6 @@ and [init1.py](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes
2323
Use these in your custom runtime by copying them to `/rootfs/sbin/init` and
2424
`/mnt/rootfs/root/init1.py` respectively.
2525

26-
[Persistent Execution](../persistent.md) may use the same init process, but this is not required. If you do not make use
26+
[Persistent Execution](../index.md#persistent-execution) may use the same init process, but this is not required. If you do not make use
2727
of the capabilities provided by the aleph.im ecosystem, using the default of your distribution
2828
(ex: [systemd](https://systemd.io/), [OpenRC](https://github.com/OpenRC/openrc), ...) should work as well.

docs/computing/volumes/immutable.md renamed to docs/VMs/volumes/immutable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
An immutable volume is a file containing
44
a [Squashfs filesystem](https://www.kernel.org/doc/html/latest/filesystems/squashfs.html) that can be mounted read-only
5-
inside the virtual machine running programs in [on-demand](../on_demand.md) or [persistent](../persistent.md) execution
5+
inside the virtual machine running programs in [on-demand](../index.md#on-demand-execution) or [persistent](../index.md#persistent-execution) execution
66
modes. This type of volume is typically used to provide additional libraries or data to the program.
77

88
Immutable volumes have the following properties:

docs/computing/volumes/persistent.md renamed to docs/VMs/volumes/persistent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Persistent Volumes
22

33
Persistent volumes are logical block disks that are attached to virtual machines running programs
4-
in [on-demand](../on_demand.md) or [persistent](../persistent.md) execution modes. They are typically used to store
4+
in [on-demand](../index.md#on-demand-execution) or [persistent](../index.md#persistent-execution) execution modes. They are typically used to store
55
mutable data such as databases and persist data. Currently, persistent volumes are only stored on
66
the [Compute Resource Node](../../nodes/Compute_(CRN)/index.md) (CRN) that is executing the program. Automatic backups and restoration
77
in case of failure of the CRN is a feature that is planned to be added in the future, and is currently left to the user.
11.5 KB
Loading

docs/computing/on_demand.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,50 @@
1-
# Aleph.im Documentation
1+
# Overview
22

33
Welcome to the Aleph.im documentation. This site will provide you with all the necessary
44
information, resources, and tools to get started with the Aleph.im project.
55

6+
## What is Aleph.im?
7+
8+
Aleph.im is an open-source off-chain P2P (peer-to-peer) network. It offers decentralized volumes and blockchain indexing, function execution and VM provisioning, as well as a DID (decentralized identity) framework.
9+
Aleph.im also includes bridges to many major blockchain networks, such as Ethereum (or any EVM-compatible blockchain), Tezos and Solana, to enable smart contracts access to the resources and hosted on the Aleph.im network.
10+
11+
### The Aleph.im project has the following components:
12+
13+
* The Aleph peer-to-peer network, comprised of [Compute Resource Nodes or CRNs](nodes/Compute_(CRN)/index.md) and [Core Channel Nodes, or CCNs](nodes/Core_(CCN)/index.md)
14+
* [Python](./libraries/python.md) and [Typescript](./libraries/typescript.md) SDKs to integrate Aleph.im's decentralized compute and storage solutions into your project
15+
* A [Python CLI tool](https://aleph-client.readthedocs.io/en/latest/) to interact with the Aleph.im network directly from a terminal
16+
* A [web GUI dashboard](https://console.aleph.im/)
17+
* An [Explorer](https://explorer.aleph.im/)
18+
19+
## The Aleph.im network
20+
21+
![The Aleph.im network](./network-overview.svg)
22+
23+
The Aleph.im network is composed of 2 sets of nodes:
24+
25+
* [CCNs](nodes/Core_(CCN)/index.md), the backbone of the P2P network. They serve as an entry point into the network through an API (similar to a blockchain node's RPC).
26+
* [CRNs](nodes/Compute_(CRN)/index.md), responsible for the actual compute and storage available on Aleph.im. CRNs must be tied manually to a single CCN, and each CCN is incentivized to tie up to 3 CRNs.
27+
28+
### Messages
29+
In Aleph.im terminology, a "message" is similar to a "transaction" for a blockchain: it is a set of data sent by an end user, propagated through the entire peer-to-peer network.
30+
A message can be generated using either the [python](./libraries/python.md) or [typescript](./libraries/typescript.md) SDKs, or through the [aleph-client](https://aleph-client.readthedocs.io/en/latest/) or the [web dashboard](https://console.aleph.im/).
31+
These messages can contain several different instructions, such as reading or writing [posts](https://aleph-client.readthedocs.io/en/latest/content/posts.html#), [programs/functions](VMs/index.md), or [indexing data](tools/indexer.md) created on external blockchains.
32+
33+
### Payment
34+
While Aleph is not a blockchain. It uses the ALEPH token hosted on Ethereum to manage users' payments and offer network integrity and workload execution rewards to node operators. Because of this, you must have an EVM-compatible wallet (such as Metamask) provisioned with some ALEPH tokens to write to the network.
35+
36+
### Example
37+
Let's take the example of a user who wants to run a program on the Aleph.im network:
38+
39+
1. The user makes sure to have an Ethereum wallet with at least 2000 ALEPH tokens
40+
2. The user writes and sends a message using either the aleph python client, one of the SDKs, or the web dashboard
41+
3. The message arrives at a CCN, which then broadcasts that message to all CCNs in the network
42+
4. The "program" workload scheduled by the user's message gets assigned to one of the CCNs
43+
5. The assigned CCN now assigns that workload onto one of its CRNs
44+
6. The assigned CRN creates a micro-vm executing the user's requested workload.
45+
646
## Where to start?
747

8-
- Read the [Overview](./overview.md) to understand what Aleph.im is and how it works.
948
- Use our [Python](./libraries/python.md) and [Typescript](./libraries/typescript.md) SDKs.
1049
- Follow a [Tutorial to run Python code on aleph.im](guides/python/getting_started.md).
1150
- Become part of the network by managing a [Core Channel Node](nodes/Core_(CCN)/index.md) or a [Compute Resource Node](nodes/Compute_(CRN)/index.md).

docs/overview.md

Lines changed: 0 additions & 41 deletions
This file was deleted.
File renamed without changes.

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
site_name: Aleph.im Documentation
22
theme:
33
name: material
4+
logo: assets/images/square-logo-color.png
45
palette:
56

67
# Palette toggle for light mode
@@ -38,7 +39,7 @@ extra_javascript:
3839
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
3940

4041
extra_css:
41-
- stylesheets/aleph-branding.css
42+
- assets/stylesheets/aleph-branding.css
4243

4344
repo_url: https://github.com/aleph-im/aleph-docs
4445
edit_uri: edit/main/docs/

0 commit comments

Comments
 (0)