Skip to content

Commit a2889ce

Browse files
committed
Review and move js-java-async-helidon demo to archive; Don't run CI workflow monthly
1 parent e004eb8 commit a2889ce

File tree

8 files changed

+20
-21
lines changed

8 files changed

+20
-21
lines changed

.github/workflows/js-java-async-helidon.yml renamed to .github/workflows/archive-js-java-async-helidon.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
name: js-java-async-helidon
1+
name: archive/js-java-async-helidon
22
on:
33
push:
44
paths:
5-
- 'js-java-async-helidon/**'
6-
- '.github/workflows/js-java-async-helidon.yml'
5+
- 'archive/js-java-async-helidon/**'
6+
- '.github/workflows/archive-js-java-async-helidon.yml'
77
pull_request:
88
paths:
9-
- 'js-java-async-helidon/**'
10-
- '.github/workflows/js-java-async-helidon.yml'
11-
schedule:
12-
- cron: "0 0 1 * *" # run every month
9+
- 'archive/js-java-async-helidon/**'
10+
- '.github/workflows/archive-js-java-async-helidon.yml'
1311
workflow_dispatch:
1412
permissions:
1513
contents: read
1614
jobs:
1715
run:
18-
name: Run 'js-java-async-helidon'
16+
name: Run 'archive/js-java-async-helidon'
1917
runs-on: ubuntu-latest
2018
timeout-minutes: 15
2119
steps:
@@ -26,9 +24,9 @@ jobs:
2624
distribution: 'graalvm'
2725
github-token: ${{ secrets.GITHUB_TOKEN }}
2826
cache: 'maven'
29-
- name: Run 'js-java-async-helidon'
27+
- name: Run 'archive/js-java-async-helidon'
3028
run: |
31-
cd js-java-async-helidon
29+
cd archive/js-java-async-helidon
3230
mvn --no-transfer-progress clean package
3331
mvn exec:exec &
3432
sleep 10

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ cd graalvm-demos
170170
</tbody>
171171
</table>
172172

173-
### Helidon
173+
### Scala
174174

175175
<table>
176176
<thead>
@@ -181,8 +181,8 @@ cd graalvm-demos
181181
</thead>
182182
<tbody>
183183
<tr>
184-
<td align="left" width="30%"><a href="/js-java-async-helidon/">js-java-async-helidon</a><br><a href="https://github.com/graalvm/graalvm-demos/actions/workflows/js-java-async-helidon.yml"><img alt="js-java-async-helidon" src="https://github.com/graalvm/graalvm-demos/actions/workflows/js-java-async-helidon.yml/badge.svg" /></a></td>
185-
<td align="left" width="70%">An HTTP web service that demonstrates how multiple JavaScript contexts can be executed in parallel to handle asynchronous operations with Helidon in Java <br><strong>Technologies: </strong>Native Image, Helidon, Native Build Tools Maven plugin <br><strong>Reference: </strong><a href="https://medium.com/graalvm/asynchronous-polyglot-programming-in-graalvm-javascript-and-java-2c62eb02acf0">Asynchronous Polyglot Programming in GraalVM Using Helidon and JavaScript</a></td>
184+
<td align="left" width="30%"><a href="/scalac-native/">scalac-native</a></td>
185+
<td align="left" width="70%">Demonstrates how to build a native executable of the Scala compiler. The resulting binary has no dependencies on the JDK. <br><strong>Technologies: </strong>Scala 2.12.x, Native Image <br><strong>Reference: </strong><a href="https://medium.com/graalvm/compiling-scala-faster-with-graalvm-86c5c0857fa3">Compiling Scala Faster with GraalVM</a></td>
186186
</tr>
187187
</tbody>
188188
</table>
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,44 @@
22

33
This is a polyglot Helidon HTTP web service that demonstrates how multiple JavaScript `Context`s can be executed in parallel to handle asynchronous operations with [Helidon](https://helidon.io/), mixing JavaScript `Promise` and Java `CompletableFuture` objects.
44

5-
## Prerequisites
6-
* [GraalVM](http://graalvm.org)
7-
85
## Preparation
96

107
1. Download and install the latest GraalVM JDK using [SDKMAN!](https://sdkman.io/).
118
```bash
12-
sdk install java 21.0.1-graal
9+
sdk install java 21.0.5-graal
1310
```
1411

1512
2. Download or clone the repository and navigate into the `js-java-async-helidon` directory:
1613
```bash
1714
git clone https://github.com/graalvm/graalvm-demos
1815
```
1916
```bash
20-
cd graalvm-demos/js-java-async-helidon
17+
cd graalvm-demos/archive/js-java-async-helidon
2118
```
2219

2320
3. Build the application using Maven:
2421
```bash
2522
mvn clean package
2623
```
2724

28-
Now you are all set to run the polyglot Helidon Web service.
25+
Now you are all set to run the polyglot Helidon web service.
2926

3027
## Running the Application
3128

32-
You can run this Helidon HTTP web service with the following command:
29+
You can run this Helidon application with the following command:
3330
```bash
3431
mvn exec:exec
3532
```
3633

37-
The application will create a new HTTP web service accepting requests on port `8080`.
34+
The application accepts requests on port `8080`.
3835
Open [http://localhost:8080/greet?request=42](http://localhost:8080/greet?request=42) in the browser to send a request.
3936

4037
To demonstrate error handling, the application will not accept requests with `request` smaller than `42`.
4138
For example, the following requests will return an error message:
4239
```bash
4340
curl http://localhost:8080/greet?request=41
41+
```
42+
```bash
4443
curl http://localhost:8080/greet?request=foo
4544
```
4645

@@ -56,3 +55,5 @@ wrk -c 100 -t 10 -d 100 http://localhost:8080/greet?request=42
5655

5756
This is a sample application that, for brevity, contains reasonably large snippets of code inside the strings.
5857
This is not the best approach for structuring polyglot apps, but the easiest to show in a compact way.
58+
59+
Read more about asynchronous programming across multiple languages in this post [Asynchronous polyglot programming with Java and JavaScript on GraalVM](https://medium.com/graalvm/asynchronous-polyglot-programming-in-graalvm-javascript-and-java-2c62eb02acf0).

js-java-async-helidon/src/main/java/module-info.java renamed to archive/js-java-async-helidon/src/main/java/module-info.java

File renamed without changes.

js-java-async-helidon/src/main/java/org/graalvm/demo/ConcurrentJsExecutor.java renamed to archive/js-java-async-helidon/src/main/java/org/graalvm/demo/ConcurrentJsExecutor.java

File renamed without changes.

js-java-async-helidon/src/main/java/org/graalvm/demo/HelidonService.java renamed to archive/js-java-async-helidon/src/main/java/org/graalvm/demo/HelidonService.java

File renamed without changes.

js-java-async-helidon/src/main/java/org/graalvm/demo/JsJavaAsyncHelidonService.java renamed to archive/js-java-async-helidon/src/main/java/org/graalvm/demo/JsJavaAsyncHelidonService.java

File renamed without changes.

0 commit comments

Comments
 (0)