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
File renamed without changes.

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
File renamed without changes.

docs/computing/on_demand.md

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

0 commit comments

Comments
 (0)