Skip to content

Commit

Permalink
Merge branch 'README/demos' of github.com:multiparty/jiff into README…
Browse files Browse the repository at this point in the history
…/demos
  • Loading branch information
Snafkin547 committed May 7, 2024
2 parents ef3ff61 + 3cf56bf commit b212b21
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 52 deletions.
12 changes: 6 additions & 6 deletions demos/array-binary-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down
12 changes: 6 additions & 6 deletions demos/array-bubble-sort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">

Check notice on line 34 in demos/array-bubble-sort/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-bubble-sort/README.md#L34

Element: img
</div>

**3. Interpret the Result 🧐**
Expand Down
12 changes: 6 additions & 6 deletions demos/array-concat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down
12 changes: 6 additions & 6 deletions demos/array-merge-sort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ node demos/support/server.ts
**2. Open from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down
38 changes: 32 additions & 6 deletions demos/array-mpc-as-a-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ node demos/array-mpc-as-a-service/compute-party.js config.json

**3. Open the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down Expand Up @@ -73,6 +73,32 @@ The demo/test can be run from the command line without videos.
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/eeb84a82-d8ab-43b5-b66e-48966355a24e">
</div>


## There is something more... 📦
The demo can be run without Cypress

**1. Run the server & computation parties**

Check notice on line 80 in demos/array-mpc-as-a-service/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-mpc-as-a-service/README.md#L80

Emphasis used instead of a heading

```shell
node demos/array-mpc-as-a-service/server.js & echo $! > SERVER_PID
sleep 10
echo "Initiating three computational parties"
node demos/array-mpc-as-a-service/compute-party.js config.json &
node demos/array-mpc-as-a-service/compute-party.js config.json &
node demos/array-mpc-as-a-service/compute-party.js config.json
```

**2. Experiment on a Browser**

Visit http://localhost:8080/demos/array-mpc-as-a-service/client.html

Check notice on line 93 in demos/array-mpc-as-a-service/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-mpc-as-a-service/README.md#L93

Bare URL used

**3. Connect and Submit**

<div align="center">
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/946d64b0-0b51-445a-9104-d11fefa43a1c">
</div>


## Code Structure ⌨️

This Cypress-based demo adopts the web-worker system to emulate multiple threaded execution.
Expand Down
31 changes: 25 additions & 6 deletions demos/array-shell-sort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down Expand Up @@ -64,6 +64,25 @@ npx cypress run --config-file demos/cypress.config.ts --spec "demos/array-shell-
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/eeb84a82-d8ab-43b5-b66e-48966355a24e">
</div>

## There is something more... 📦
The demo can be run without Cypress

**1. Run the server in the same way**

```shell
node demos/support/server.ts
```

**2. Experiment on a Browser**

Visit http://localhost:8080/demos/array-shell-sort/client.html

**3. Connect and Submit**

<div align="center">
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/48caf1a9-b0ef-49d5-985c-111833f1413f">
</div>

## Code Structure ⌨️

This Cypress-based demo adopts the web-worker system to emulate multiple threaded execution.
Expand Down
31 changes: 25 additions & 6 deletions demos/array-shuffle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)

Check notice on line 22 in demos/array-shuffle/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-shuffle/README.md#L22

Lists should be surrounded by blank lines
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down Expand Up @@ -61,6 +61,25 @@ npx cypress run --config-file demos/cypress.config.ts --spec "demos/array-shuffl
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/eeb84a82-d8ab-43b5-b66e-48966355a24e">
</div>

## There is something more... 📦

Check notice on line 64 in demos/array-shuffle/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-shuffle/README.md#L64

Expected: 1; Actual: 0; Below
The demo can be run without Cypress

**1. Run the server in the same way**

```shell
node demos/support/server.ts
```

**2. Experiment on a Browser**

Visit http://localhost:8080/demos/array-shuffle/client.html

**3. Connect and Submit**

<div align="center">
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/60f2f581-dc83-445c-b985-ada509a03a62">
</div>

## Code Structure ⌨️

This Cypress-based demo adopts the web-worker system to emulate multiple threaded execution.
Expand Down
33 changes: 27 additions & 6 deletions demos/array-substring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ node demos/support/server.ts
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>
3) Click a demo protocol of your choice

3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">
</div>


Expand Down Expand Up @@ -69,6 +69,27 @@ npx cypress run --config-file demos/cypress.config.ts --spec "demos/array-substr
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/eeb84a82-d8ab-43b5-b66e-48966355a24e">

Check notice on line 69 in demos/array-substring/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-substring/README.md#L69

Element: img
</div>

## There is something more... 📦
The demo can be run without Cypress

**1. Run the server in the same way**

```shell
node demos/support/server.ts
```

**2. Experiment on a Browser**

Visit http://localhost:8080/demos/array-substring/client.html

Check notice on line 83 in demos/array-substring/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/array-substring/README.md#L83

Bare URL used

**3. Connect and Submit**

<div align="center">
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/0dee18f1-8bdc-4f06-90d0-0a9779bf5059">
</div>

> For this demo, participant 1 must submit a string, and participant 2 must submit a character to find in the P1's string.
## Code Structure ⌨️

This Cypress-based demo adopts the web-worker system to emulate multiple threaded execution.
Expand Down
27 changes: 23 additions & 4 deletions demos/the-valentine-question/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ The implementation of this protocol is located in <a href="https://github.com/mu
```shell
node demos/support/server.ts
```
> **⚠️Important:** You must run a fresh server every time. For example, if a test is paused at any point, it is required to terminate the server and restart it before running the rest of the demo.</I>
> **⚠️Important:** You must run a fresh server every time. For example, if a test is paused at any point, it is required to terminate the server and restart it before running the rest of the demo.
**2. Run from the Cypress Test Runner 🎥 (with video demos)**

1) Run `npm run cypress:open` in CML
1) Run `npm run cypress:open` in CML

2) Choose a browser (Chrome Recommended)
2) Choose a browser (Chrome Recommended)
<div align="center">
<img width="40%" height="40%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/894b3f2d-4a8b-4368-a81b-4b94ae87cd3a">
</div>

3) Click a demo protocol of your choice
3) Click a demo protocol of your choice
<div align="center">
<img width="30%" height="30%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/9137615f-9aec-41ab-8880-cf8c5e6b72ce">

Check notice on line 31 in demos/the-valentine-question/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/the-valentine-question/README.md#L31

Element: img
</div>
Expand Down Expand Up @@ -61,6 +61,25 @@ npx cypress run --config-file demos/cypress.config.ts --spec "demos/the-valentin
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/eeb84a82-d8ab-43b5-b66e-48966355a24e">
</div>

## There is something more... 📦
The demo can be run without Cypress

**1. Run the server in the same way**

```shell
node demos/support/server.ts
```

**2. Experiment on a Browser**

Check notice on line 73 in demos/the-valentine-question/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/the-valentine-question/README.md#L73

Emphasis used instead of a heading

Visit http://localhost:8080/demos/the-valentine-question/client.html

**3. Connect and Submit**

Check notice on line 77 in demos/the-valentine-question/README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demos/the-valentine-question/README.md#L77

Emphasis used instead of a heading

<div align="center">
<img width="50%" height="50%" alt="image" src="https://github.com/multiparty/jiff/assets/62607343/afc7be2f-2aa5-4997-87ef-0f40aa465964">
</div>

## Code Structure ⌨️

This Cypress-based demo adopts the web-worker system to emulate multiple threaded execution.
Expand Down

0 comments on commit b212b21

Please sign in to comment.