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
+80-16Lines changed: 80 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ STH allows you to deploy and run multiple data processing apps called Sequences.
55
55
<strong>Sequences</strong>
56
56
</summary>
57
57
58
-
**Sequences** are specific apps, not just any apps. They specialize in efficient data processing.
58
+
[**Sequences**](dictionary.md#sequence) are specific apps, not just any apps. They specialize in efficient data processing.
59
59
60
60
We named our apps "Sequences" and that term describes well its nature, as they process data through a Sequence of chained functions. Therefore, usually our Sequences are concise, easy to write and powerful at the same time.
61
61
</details>
@@ -76,10 +76,10 @@ What we also do on the host level is that we apply a set of algorithms to optimi
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 it and monitoring.
79
+
You can interact with host using our dedicated STH CLI that will help you with Sequences deployment, running and monitoring.
80
80
</details>
81
81
<br>
82
-
Our vanilla STH engine is based on Node.js and thus allows developers to benefit from rich ecosystem, numerous packages and solutions provided by this vibrant community.
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.
83
83
84
84
### **1.2 Solution concept diagram**
85
85
@@ -108,7 +108,7 @@ Our vanilla STH engine is based on Node.js and thus allows developers to benefit
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 gzipped package (`*.tar.gz`) containing at least two files:
111
+
1.**Sequences** - these are the actual "STH" apps. It is a package containing at least two files:
112
112
***package.json** - JSON manifest file describing the app and its configuration; such as main file to run
113
113
***main file** - file such as `index.js` or `index.ts` that contains a lightweight application business logic.
114
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.
@@ -125,8 +125,8 @@ Our engine outputs can be managed in several ways:
125
125
126
126
***File** - you can save your output to a local or a remote file
127
127
***STDOUT** - output can be directed to system STDOUT (STDERR is supported as well)
128
-
***API** - output can be consumed from our STH REST API
129
-
***URL Request** - you can write your app in a way to request URL, webhook etc
128
+
***API** - output can be consumed from our STH REST API
129
+
***URL Request** - you can write your app in a way to request URL, webhook, etc.
130
130
***Stream** - output can be streamed to a particular destination
131
131
* you can mix multiple actions together: you can both send data to remote system/URL and save it locally.
132
132
@@ -159,6 +159,7 @@ scramjet-transform-hub
159
159
```
160
160
161
161
> 💡 **HINT:** There is also an alias for running STH:
162
+
>
162
163
>```bash
163
164
>sth
164
165
>```
@@ -169,7 +170,7 @@ More detailed installation instructions can be found in our [STH GitHub reposito
169
170
170
171
### **3.1 Review the package**
171
172
172
-
Before running our first Sequence let's have a quick look what's inside the Sequence package.
173
+
Before running your first Sequence let's have a quick look what's inside the Sequence package.
173
174
174
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:
175
176
@@ -254,13 +255,22 @@ Now we have uploaded Sequence to the host and host assigned to it a random ID (G
254
255
<strong>3. Run the Sequence</strong>
255
256
</summary>
256
257
257
-
We can now use Sequence ID to start uploaded Sequence. The command is `si seq start <sequence_id>`. You can also pass arbitrary number of parameters by providing them after `<sequence_id>`, in case of our `hello-snowman` no parameters are used.
258
+
We can now use Sequence ID to start uploaded Sequence. The command is `si seq start <sequence_id>`. To make our users life easier we provided an alias for Sequence ID: `si seq start -`. This CLI functionality replaces `-` argument with the last item the user interacted with or `select`ed.
259
+
260
+
Also, an arbitrary number of parameters can be passed to a Sequence while `start`ing by providing them after `<sequence_id>` or `-` alias. In case of our `hello-snowman` no parameters are used.
261
+
258
262
Use the following command to start the Sequence:
259
263
260
264
```bash
261
265
si sequence start cf775cc1-105b-473d-b929-6885a0c2182c
262
266
```
263
267
268
+
or
269
+
270
+
```bash
271
+
si sequence start -
272
+
```
273
+
264
274
The output will look similar to this one:
265
275
266
276
```bash
@@ -336,7 +346,7 @@ Our Sequence generator app does two things here:
336
346
* Sends stream of messages; each one containing number with temperature value
337
347
* Reads output from Host API that is generated by our `hello-snowman` Sequence
338
348
339
-
Separately, you can also open a new terminal window and see log of this particular Instance with command `si instance log <instance_id>`. In our case this would be:
349
+
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:
340
350
341
351
```bash
342
352
si instance log e70222d1-acfc-4e00-b046-4a3a9481c53b
@@ -345,18 +355,72 @@ si instance log e70222d1-acfc-4e00-b046-4a3a9481c53b
345
355
The sample output will be similar to this one:
346
356
347
357
```bash
358
+
Request ok: http://127.0.0.1:8000/api/v1/instance/e70222d1-acfc-4e00-b046-4a3a9481c53b/log status: 200 OK
{"level":"DEBUG","msg":"Processing function on index","ts":1647447631116,"from":"Runner","Runner":{"id":"e70222d1-acfc-4e00-b046-4a3a9481c53b"},"data":[0]}
Once `hello-snowman` Sequence is up and running, we have also sent some input data to the Instance to consume. To see what the program does to this data use the command below, it will show you the Instance output after data transformation. Open one more terminal and paste:
382
+
383
+
```bash
384
+
si inst output e70222d1-acfc-4e00-b046-4a3a9481c53b
385
+
```
386
+
387
+
or by using alias
388
+
389
+
```bash
390
+
si inst output -
391
+
```
392
+
393
+
This is an example output that you should get:
394
+
395
+
```bash
396
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
397
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
398
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
399
+
Snowman ⛄ is melting! 🥵
400
+
Snowman ⛄ is melting! 🥵
401
+
Snowman ⛄ is melting! 🥵
402
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
403
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
404
+
Snowman ⛄ is melting! 🥵
405
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
406
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
407
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
408
+
Snowman ⛄ is melting! 🥵
409
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
410
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
411
+
Snowman ⛄ is melting! 🥵
412
+
Snowman ⛄ is freezing 🥶 Winter is coming ❄️ ❄️ ❄️ ❄️ ❄️
355
413
```
356
414
357
415
</details><br>
358
416
359
-
> 🎉 Congratulations! 🥳 You have run your first Scramjet Transform Hub Sequence!
417
+
🎉 Congratulations! 🥳 You have run your first Scramjet Transform Hub Sequence!
418
+
419
+
> To see more Sequence or Instance CLI commands use `si help` accordingly:
Copy file name to clipboardExpand all lines: dictionary.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,7 +261,7 @@ Software Development Kit. A collection of tools and libraries to create a softwa
261
261
262
262
### Sequence
263
263
264
-
It is a compressed package (`*.tar.gz`) containing file with a manifest(eg. `package.json`), describing the app and its configuration (such as main file to run); and a **main file** (eg. `index.js`, `app.ts`) that contains a developer's code that consists of chained functions with a lightweight application business logic. Minimal sequence consists of 1 [function](#function).
264
+
It is a package (application) containing a set of files. A file with a manifest(eg. `package.json`), describing the app and its configuration (such as main file to run); and a __main file__ (eg. `index.js`, `app.ts`) that contains a developer's code that consists of chained functions with a lightweight application business logic. Minimal Sequence consists of 1 [function](#function).
265
265
266
266
### Socket
267
267
@@ -277,9 +277,7 @@ standard input/standard output. Application communication channels with the outs
277
277
278
278
### STH <!--TODO-->
279
279
280
-
### Supervisor
281
-
282
-
An application supervising work of a single [instance](#instance). Communicates with [host](#host), returns health status of the sequence, runner, etc
Copy file name to clipboardExpand all lines: samples/README.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
@@ -1,6 +1,6 @@
1
1
# Samples
2
2
3
-
We have prepared some samples for you. We differentiated them according to the language in which they were written.
3
+
Try out our samples prepared some samples for you. We differentiated them according to the language in which they were written.
4
4
5
5
> 💡 **Please note that samples below require some previous installations before you start running them. Instructions are [here](../README.md#3-install-scramjet-transform-hub).**
0 commit comments