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: README.md
+28-31
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@
37
37
*[Prepare environment](#21-prepare-environment)
38
38
*[Install STH](#22-install-sth)
39
39
3.[Run your first Sequence](#3-run-your-first-sequence)
40
-
*[Review the package](#31-review-the-package)
40
+
*[Review the Sequence package](#31-review-the-sequence-package)
41
41
*[Run the Sequence](#32-run-the-sequence)
42
42
4.[Where to go next](#4-where-to-go-next)
43
43
5.[User's dictionary](#5-users-dictionary)
@@ -61,22 +61,22 @@ We named our apps "Sequences" and that term describes well its nature, as they p
61
61
</details>
62
62
<br>
63
63
64
-
The core part of our STH engine is called the "host".
64
+
The core part of our STH engine is called the "Hub".
65
65
66
66
<details>
67
67
<summary>
68
-
<strong>Host</strong>
68
+
<strong>Hub</strong>
69
69
</summary>
70
70
71
-
**Host** is responsible for maintaining and deploying Sequences, keeping them running and managing its lifecycle.
71
+
**Hub** is responsible for maintaining and deploying Sequences, keeping them running and managing its lifecycle.
72
72
73
-
Host exposes also its own REST API to provide and receive data and manage Sequences and host itself.
73
+
Hub exposes also its own REST API to provide and receive data and manage Sequences and Hub itself.
74
74
75
-
What we also do on the host level is that we apply a set of algorithms to optimize and speed up data processing execution in Sequences.
75
+
What we also do on the Hub level is that we apply a set of algorithms to optimize and speed up data processing execution in Sequences.
76
76
77
77
> We call our processing optimization algorithms **"IFCA"** meaning "Intelligent Function Composition Algorithms".
78
78
79
-
You can interact with host using our dedicated STH CLI that will help you with Sequences deployment, running and monitoring.
79
+
You can interact with Hub using our dedicated STH CLI that will help you with Sequences deployment, running and monitoring.
80
80
</details>
81
81
<br>
82
82
Our vanilla STH engine is based on Node.js and thus allows developers to benefit from its rich ecosystem, numerous packages and solutions provided by this vibrant community.
@@ -103,16 +103,17 @@ Our vanilla STH engine is based on Node.js and thus allows developers to benefit
103
103
104
104
<details>
105
105
<summary>
106
-
<strong>Host</strong>
106
+
<strong>Hub</strong>
107
107
</summary>
108
108
109
109
This is a solution for the central processing and management unit with the following major components:
110
110
111
-
1.**Sequences** - these are the actual "STH" apps. It is a package containing at least two files:
112
-
***package.json** - JSON manifest file describing the app and its configuration; such as main file to run
113
-
***main file** - file such as `index.js` or `index.ts` that contains a lightweight application business logic.
114
-
2.**Instance** - once a Sequence is run, the host will create a separate runtime environment for it and will execute Sequence code inside this runtime entity. This is an Instance.
115
-
3.**API & CLI** - our Application Programming Interface and CLI connecting to it allows both for **Data operations** (sending input data and receiving output data) and **Management operations** (manage host itself and its entities: Sequences or Instances)
111
+
1.**Sequence** - a user's program to be executed on the Hub, that contains a developer's code that consists of one or more functions with a lightweight application business logic. It needs to be packed into a package together with its dependencies (compressed into `tar.gz` format) before sending it to STH.
112
+
2.**Instance** - once a Sequence is run, the Hub will create a separate runtime environment for it and will execute Sequence code inside this runtime entity. This is an Instance.
113
+
3.**API & CLI** - our Application Programming Interface and Command Line Interface that allow for:
114
+
115
+
***Data operations** - sending input data and receiving output data
116
+
***Management operations** - manage Hub itself and its entities: Sequences or Instances
116
117
117
118
</details>
118
119
@@ -158,21 +159,17 @@ npm i -g @scramjet/sth @scramjet/cli
158
159
scramjet-transform-hub
159
160
```
160
161
161
-
> 💡 **HINT:** There is also an alias for running STH:
162
-
>
163
-
>```bash
164
-
>sth
165
-
>```
162
+
> 💡 **HINT:** There is also an alias for running STH: `sth`
166
163
167
164
More detailed installation instructions can be found in our [STH GitHub repository](https://github.com/scramjetorg/transform-hub//HEAD/#installation-clamp).
168
165
169
166
## **3. Run your first Sequence**
170
167
171
-
### **3.1 Review the package**
168
+
### **3.1 Review the Sequence package**
172
169
173
-
Before running your first Sequence let's have a quick look what's inside the Sequence package.
170
+
Before running the Sequence let's have a quick look what's inside the Sequence package.
174
171
175
-
We have prepared foryou a simple JavaScript sample Sequence "hello-snowman". This Sequence is availablein the directory `samples/hello-snowman`in this repository. In this directory you will find two files:
172
+
We have prepared for you a simple JavaScript sample Sequence "hello-snowman". This Sequence is available in the directory [samples/hello-snowman](./samples/hello-snowman/) in this repository. In this directory you will find two files:
176
173
177
174
*`package.json` - manifest file that describes this particular Sequence
178
175
*`index.js` - file containing main application logic.
@@ -185,16 +182,16 @@ There is no need to change anything in our `hello-snowman` Sequence for a first
185
182
186
183
### **3.2 Run the Sequence**
187
184
188
-
There are 4 steps to follow in order to run the example Sequence:
185
+
There are 5 steps to follow in order to run the example Sequence:
189
186
190
187
<details>
191
188
<summary>
192
-
<strong>1. Pack your Sequence into a package</strong>
189
+
<strong>1. Pack your Sequence into a <code>*.tar.gz</code> package</strong>
193
190
</summary>
194
191
195
-
Every "Sequence" app needs to be packaged (compressed) before sending to the Transform Hub. Package is a simple TAR archive and our STH CLI has a special command to pack an app directory into a Sequence tarball.
192
+
Every Sequence app needs to be packaged (compressed) before sending to the Transform Hub. Package is a simple TAR archive and our STH CLI has a special command to pack an app directory into a Sequence tarball.
196
193
197
-
> 💡 **Note:** any time, you can display STH CLI help by issuing terminal command `si help` (for general help) or `si <command> help` for specific command (ie. `si sequence help`)
194
+
> 💡 **Note:** any time, you can display STH CLI help by issuing terminal command `si help` (for general help). For more information on a specific command, type help + command-name (ie. `si sequence help`)
198
195
199
196
Please open new terminal window (and keep the first one open with STH running). Then issue following commands in the root directory of this repository:
200
197
@@ -213,15 +210,15 @@ There is no output shown in the terminal but you can verify with `ls` that tarba
213
210
<strong>2. Send the Sequence package</strong>
214
211
</summary>
215
212
216
-
Send `hello-snowman.tar.gz` to the running host (default localhost API endpoint will be used by the CLI send command) by issuing following command:
213
+
Send `hello-snowman.tar.gz` to the running Hub (default localhost API endpoint will be used by the CLI send command) by issuing following command:
217
214
218
215
```bash
219
216
si sequence send ./samples/hello-snowman.tar.gz
220
217
```
221
218
222
219
> 💡 **Note:** if you receive reply: **Request ok: <http://127.0.0.1:8000/api/v1/sequence> status: 422 Unprocessable Entity**, it means that STH Docker images are not yet pulled from DockerHub. Please wait 2-3 minutes and try to issue `si sequence send` command again. We are working on fixing this issue in the next STH release. Also, if you keep receiving docker errors you can start STH without docker: `scramjet-transform-hub --no-docker`
223
220
224
-
> If you encounter any problems or issues while using our platform, please visit our **[Troubleshooting](https://github.com/scramjetorg/transform-hub#troubleshooting-collision)** section, where some of the problems are already known and described. You can also log an issue/bug there.
221
+
> If you encounter any problems or issues while using our platform, please visit our **[Troubleshooting](https://github.com/scramjetorg/transform-hub#troubleshooting-collision)** section, where some of the problems are already known and described. You are also very welcome to [log an issue/bug](https://github.com/scramjetorg/transform-hub/issues/new/choose) on GitHub any time.
225
222
226
223
The output will look similar to this one:
227
224
@@ -240,11 +237,11 @@ SequenceClient {
240
237
}
241
238
```
242
239
243
-
Now we have uploaded Sequence to the host and host assigned to it a random ID (GUID), in this case our Sequence ID is:
240
+
Now we have uploaded Sequence to the Hub. Each time a Sequence is loaded into the Hub, a random ID (GUID) number is assigned to it, in this case our Sequence ID is:
244
241
245
242
`_id: 'cf775cc1-105b-473d-b929-6885a0c2182c'`
246
243
247
-
Host also exposes REST API endpoint for each Sequence and this is also described in this response.
244
+
Hub also exposes REST API endpoint for each Sequence and this is also described in this response.
248
245
249
246
Exposed Sequence ID allows us to move to the next step where we will start the Sequence.
250
247
@@ -288,7 +285,7 @@ InstanceClient {
288
285
}
289
286
```
290
287
291
-
Sequence is an app template. Once it is up and running, it will become a new Instance. The Instance also receives its own ID (GUID). In this case the Instance ID is:
288
+
Once Sequence is up and running, it becomes an Instance. The Instance also receives its own unique ID (GUID). In this case the Instance ID is:
292
289
293
290
`_id: 'e70222d1-acfc-4e00-b046-4a3a9481c53b'`
294
291
@@ -344,7 +341,7 @@ OUTPUT| Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄
344
341
Our Sequence generator app does two things here:
345
342
346
343
* Sends stream of messages; each one containing number with temperature value
347
-
* Reads output from Host API that is generated by our `hello-snowman` Sequence
344
+
* Reads output from the Hub API that is generated by our `hello-snowman` Sequence
348
345
349
346
Separately, you can also open a new terminal window and see log of this particular Instance with command `si instance log <instance_id>` or by using alias `si instance log -`. In our case this would be:
@@ -158,12 +196,6 @@ A set of instances installed on the single operating system (host) together with
158
196
159
197
- host program - software/program that runs in a computer that provides the source of information or signals.
160
198
161
-
### Hub
162
-
163
-
<!-- TODO - what is the difference between Hub and Host, we still use both terms.
164
-
Maybe "Host" should be described in general context and "Hub" as a host in scramjet cloud platform's context?
165
-
-->
166
-
167
199
## I
168
200
169
201
### ILifeCycle (ILC)
@@ -240,16 +272,7 @@ One of the [supervisor's](#supervisor) components, which is responsible for coll
240
272
241
273
## M
242
274
243
-
### Manager
244
-
245
-
<!-- TODO - do we want the user to know that? It will reveal the structure of our platform -->
246
-
in the context of the Scramjet platform, Cloud Platform Manager is a host management software that provides service-discovery, controls the scaling of individual instances in accordance with the programmed logic and client configuration, providing [API](#api)
247
-
248
-
### MultiHost
249
-
<!-- TODO - do we want the user to know that? It will reveal the structure of our platform -->
250
-
251
-
### MultiManager
252
-
<!--TODO DO WE WANT OUR USER TO KNOW THAT????-->
275
+
<!--### Manager- in the context of the Scramjet platform, Cloud Platform Manager is a host management software that provides service-discovery, controls the scaling of individual instances in accordance with the programmed logic and client configuration, providing [API](#api)-->
253
276
254
277
## N
255
278
@@ -299,10 +322,8 @@ An executable written in one of the supported programming languages that starts
299
322
300
323
## S
301
324
302
-
### Scalability
303
-
<!-- TODO -->
304
-
305
325
### Scope
326
+
306
327
A scope is a handy organization unit that lets a user switch between the currently used spaces and hubs. It is a named pair consisting of one space and one hub. This named pair is saved in the session config, which lets user work with different spaces and hubs sessions simultaneously. There can be multiple scopes, but only one can be used at once in a given session.
307
328
308
329
### Scramjet
@@ -334,8 +355,7 @@ standard input/standard output/standard error. Application communication channel
334
355
335
356
### STH
336
357
337
-
<!--TODO-->
338
-
shortcut for Scramjet Transform Hub
358
+
shortcut for Scramjet Transform Hub. It is a data processing engine for our Scramjet Cloud Platform
0 commit comments