You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/VMs/index.md
+37-13Lines changed: 37 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,37 @@
1
-
# Persistent Execution
1
+
# Computing on Aleph.im
2
2
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.
4
6
5
-
The aleph.im network can run programs in two different manners:
7
+
## Overview of VMs
6
8
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
11
35
12
36
When a program is created with persistent execution enabled, the aleph.im scheduler will find a Compute Resource Node
13
37
(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.
17
41
18
42
> ⚠️ Automatic data migration across hosts in case such events happen is not available yet.
19
43
20
-
## Message Specification
44
+
###Message Specification
21
45
22
46
The execution model of a program is defined in the field `message.content.on` of messages of type `PROGRAM` and is
23
47
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 = {
39
63
}
40
64
```
41
65
42
-
## Prerequisites
66
+
###Prerequisites
43
67
44
68
Before you begin this tutorial, ensure that you have the following:
45
69
@@ -73,7 +97,7 @@ cd ./src/
73
97
uvicorn main:app --reload
74
98
```
75
99
76
-
## Step 2: Run a program in a persistent manner
100
+
###Step 2: Run a program in a persistent manner
77
101
78
102
To run the program in a persistent manner on the aleph.im network, use:
79
103
@@ -87,10 +111,10 @@ You can stop the execution of the program using:
87
111
aleph unpersist $MESSAGE_ID
88
112
```
89
113
90
-
## Find your program
114
+
###Find your program
91
115
92
116
TODO: Locate the CRN where your program is running.
93
117
94
-
## Conclusion
118
+
## Instance VMs
95
119
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.
Copy file name to clipboardExpand all lines: docs/VMs/volumes/immutable.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
An immutable volume is a file containing
4
4
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
6
6
modes. This type of volume is typically used to provide additional libraries or data to the program.
0 commit comments