Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removed references to experimental-fetch #215

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/01_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ After a node starts successfully it will register itself to the gateway with all
---

{:.next-chapter}
[Getting started](02_getting_started)
[Getting started](02_getting_started.html)
20 changes: 10 additions & 10 deletions documentation/02_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Setting up Jitar is easy. In this section we help you get up and running.
Jitar requires Node.js version 18.7 or higher to be installed.

{:.alert-warning}
Running Jitar currently requires the *network imports* and *fetch api* experimental features.
Running Jitar with Node.js currently requires the *network imports* experimental features.

{:.alert-info}
When working with TypeScript version 4.4.2 or higher is required.
Expand Down Expand Up @@ -73,7 +73,7 @@ export default async function sayHello(name = 'World'): Promise<string>
}
```

Parameters can be mandatory or optional. Optional parameters need to be defined with a default value. The parameters will be checked when calling the procedure using the [RPC API](05_advanced_features#apis).
Parameters can be mandatory or optional. Optional parameters need to be defined with a default value. The parameters will be checked when calling the procedure using the [RPC API](05_advanced_features.html#apis).

### Step 2 - Put the procedure in a segment

Expand All @@ -92,7 +92,7 @@ src/default.segment.json
}
```

More information regarding segment configuration is described in the [segments section](04_basic_features#segments) of the basic features.
More information regarding segment configuration is described in the [segments section](04_basic_features.html#segments) of the basic features.

### Step 3 - Create an application starting point

Expand All @@ -109,7 +109,7 @@ const moduleImporter = async(specifier: string) => import(specifier);
startServer(moduleImporter);
```

This setup can be used in most situations and is used in all our examples. More information about this hook can be found in the [hooks section](05_advanced_features#hooks) of the advanced features.
This setup can be used in most situations and is used in all our examples. More information about this hook can be found in the [hooks section](05_advanced_features.html#hooks) of the advanced features.

### Step 4 - Configure Jitar

Expand All @@ -127,7 +127,7 @@ jitar.json
}
```

In the [runtime services page](03_runtime_services) we will look at all the configuration options.
In the [runtime services page](03_runtime_services.html) we will look at all the configuration options.

### Step 5 - Build, Run and test

Expand All @@ -142,7 +142,7 @@ package.json
"type": "module",
"scripts": {
"build": "tsc",
"start": "node --experimental-network-imports --experimental-fetch dist/start.js --config=jitar.json"
"start": "node --experimental-network-imports dist/start.js --config=jitar.json"
}
}
```
Expand All @@ -151,13 +151,13 @@ Then we run `npm run build` to let the TypeScript compiler generate the JavaScri

Next we can fire up Jitar.

The start script will run the application starting point and pass the configuration file to Jitar. The ``--experimental-network-imports`` and ``--experimental-fetch`` flags are required for Jitar to work. More options can be found in the [server options section](03_runtime_services#server-options) of the runtime services.
The start script will run the application starting point and pass the configuration file to Jitar. The ``--experimental-network-imports`` flag is required for Jitar to work. More options can be found in the [server options section](03_runtime_services.html#server-options) of the runtime services.

```bash
npm run start
```

Once Jitar has started we can run our procedure using the [RPC API](05_advanced_features#apis).
Once Jitar has started we can run our procedure using the [RPC API](05_advanced_features.html#apis).

```http
GET http://localhost:3000/rpc/greetings/sayHello?name=John HTTP/1.1
Expand All @@ -166,7 +166,7 @@ GET http://localhost:3000/rpc/greetings/sayHello?name=John HTTP/1.1
---

{:.previous-chapter}
[Introduction](01_introduction)
[Introduction](01_introduction.html)

{:.next-chapter}
[Runtime services](03_runtime_services)
[Runtime services](03_runtime_services.html)
8 changes: 4 additions & 4 deletions documentation/03_runtime_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Runtime services

# Runtime services

The Jitar runtime consists of several services that are introduced in the [How it works](01_introduction#how-it-works) section on the introduction page. In this section we will take a detailed look at the individual services and how to use and configure them.
The Jitar runtime consists of several services that are introduced in the [How it works](01_introduction.html#how-it-works) section on the introduction page. In this section we will take a detailed look at the individual services and how to use and configure them.

---

Expand Down Expand Up @@ -184,13 +184,13 @@ Additionally there are some general options that can be used to configure the se
These options can be specified in the command line:

```bash
node --experimental-network-imports --experimental-fetch dist/start.js --loglevel=debug --config=jitar.json
node --experimental-network-imports dist/start.js --loglevel=debug --config=jitar.json
```

---

{:.previous-chapter}
[Getting started](02_getting_started)
[Getting started](02_getting_started.html)

{:.next-chapter}
[Basic features](04_basic_features)
[Basic features](04_basic_features.html)
12 changes: 6 additions & 6 deletions documentation/04_basic_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Basic features

# Basic features

In this section we will look at the basic features of Jitar. Each feature will be explained with an example based on the ``Hello World`` example from the [getting started](02_getting_started) page. All examples are available on [GitHub](https://github.com/MaskingTechnology/jitar){:target="_blank"} as separate projects.
In this section we will look at the basic features of Jitar. Each feature will be explained with an example based on the ``Hello World`` example from the [getting started](02_getting_started.html) page. All examples are available on [GitHub](https://github.com/MaskingTechnology/jitar){:target="_blank"} as separate projects.

---

Expand Down Expand Up @@ -116,7 +116,7 @@ GET http://app.example.com:3000/rpc/greetings/sayBoth?firstName=Jim&lastName=Doe

## Orchestration

Orchestration is the process of finding and running segmented procedures that are spread over multiple nodes. The [gateway](03_runtime_services#gateway) is responsible for this task and keeps track of all nodes and the procedures they contain.
Orchestration is the process of finding and running segmented procedures that are spread over multiple nodes. The [gateway](03_runtime_services.html#gateway) is responsible for this task and keeps track of all nodes and the procedures they contain.

Besides configuring the segmentation, no extra configuration is needed. When a node is started, it will register itself at the gateway. When a procedure is called, the gateway will find the node that contains the procedure and forward the request to that node.

Expand Down Expand Up @@ -157,9 +157,9 @@ If a procedure is placed in multiple segments, the procedure will be load balanc

## Access protection

Procedures are not accessible by default. This means that they cannot be called from the outside world using the [RPC API](05_advanced_features#apis). To enable the access of a procedure, it has to be made public. We have done this throughout the examples by setting the **access** to **public** in the segment files.
Procedures are not accessible by default. This means that they cannot be called from the outside world using the [RPC API](05_advanced_features.html#apis). To enable the access of a procedure, it has to be made public. We have done this throughout the examples by setting the **access** to **public** in the segment files.

We've used the *Hello World* application from the [getting started page](02_getting_started) for the example. You can also use the example from the [GitHub repository](https://github.com/MaskingTechnology/jitar){:target="_blank"}.
We've used the *Hello World* application from the [getting started page](02_getting_started.html) for the example. You can also use the example from the [GitHub repository](https://github.com/MaskingTechnology/jitar){:target="_blank"}.

We will need to add a new procedure that will call a private procedure.

Expand Down Expand Up @@ -500,7 +500,7 @@ export default class BrainNotFound extends NotFound
---

{:.previous-chapter}
[Runtime services](03_runtime_services)
[Runtime services](03_runtime_services.html)

{:.next-chapter}
[Advanced features](05_advanced_features)
[Advanced features](05_advanced_features.html)
16 changes: 8 additions & 8 deletions documentation/05_advanced_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Advanced features

# Advanced features

In this section we will look at the advanced features of Jitar. Each feature will be explained with an example based on the ``Hello World`` example from the [getting started](02_getting_started) page. All examples are available on [GitHub](https://github.com/MaskingTechnology/jitar){:target="_blank"} as separate projects.
In this section we will look at the advanced features of Jitar. Each feature will be explained with an example based on the ``Hello World`` example from the [getting started](02_getting_started.html) page. All examples are available on [GitHub](https://github.com/MaskingTechnology/jitar){:target="_blank"} as separate projects.

---

Expand Down Expand Up @@ -49,7 +49,7 @@ GET http://repository.example.com:3000/images/logo.png HTTP/1.1
This request will return the logo.png file from the application images directory. Files can also be requested from the root directory. If no filename is provided the index file will be returned that is configured for the repository.

{:.alert-info}
All assets are private by default. They can be made public using [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)), i.e. ``assets/**/*`` to make all files public in the *assets* folder and it child folders. See the [repository](03_runtime_services#repository) description for the configuration.
All assets are private by default. They can be made public using [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)), i.e. ``assets/**/*`` to make all files public in the *assets* folder and it child folders. See the [repository](03_runtime_services.html#repository) description for the configuration.

### Jitar

Expand Down Expand Up @@ -148,7 +148,7 @@ export default async function sayBoth(firstName: string, lastName: string): Prom
}
```

We need to pass the ``module/name`` of the procedure, the version and the arguments. The arguments must be a JavaScript object containing the argument values by name. The value can be any [transferable type](04_basic_features#data-transportation).
We need to pass the ``module/name`` of the procedure, the version and the arguments. The arguments must be a JavaScript object containing the argument values by name. The value can be any [transferable type](04_basic_features.html#data-transportation).

Optionally you can pass the ``this`` value containing the runtime context of the procedure. This context contains the headers - like the authorization header - that need to be used in a remote call in case the procedure is not locally available.
Therefore it is highly recommended to pass this value.
Expand All @@ -165,7 +165,7 @@ Using this hook breaks the IntelliSense support and will make your application d

## Health checks

Health checks are used to determine if a [node](03_runtime_services#node) is healthy or not. They are used by the [gateway](03_runtime_services#gateway) to determine if a node still can be used. If for example a node can not reach the database anymore, it will be removed from the gateway. For checking the database connection a health check has to be created.
Health checks are used to determine if a [node](03_runtime_services.html#node) is healthy or not. They are used by the [gateway](03_runtime_services.html#gateway) to determine if a node still can be used. If for example a node can not reach the database anymore, it will be removed from the gateway. For checking the database connection a health check has to be created.

A health check is a class that implements the HealthCheck interface. The interface has a single function called isHealthy() that returns a boolean.

Expand Down Expand Up @@ -266,8 +266,8 @@ startServer(moduleImporter).then(server =>
});
```

Middleware can be added to the [node](03_runtime_services#node), [gateway](03_runtime_services#gateway),
[proxy](03_runtime_services#proxy) and [standalone](03_runtime_services#standalone) services support middleware.
Middleware can be added to the [node](03_runtime_services.html#node), [gateway](03_runtime_services.html#gateway),
[proxy](03_runtime_services.html#proxy) and [standalone](03_runtime_services.html#standalone) services support middleware.

{:.alert-warning}
The execution order of the middleware is reversed. This means that the middleware that is added last is called first.
Expand Down Expand Up @@ -307,7 +307,7 @@ The [Access-Control-Allow-Methods](https://developer.mozilla.org/en-US/docs/Web/
---

{:.previous-chapter}
[Basic features](04_basic_features)
[Basic features](04_basic_features.html)

{:.next-chapter}
[Building applications](06_building_applications)
[Building applications](06_building_applications.html)
6 changes: 3 additions & 3 deletions documentation/06_building_applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Jitar has two types of components as primary building blocks for applications:

This means that applications that run on Jitar are [procedural](https://en.wikipedia.org/wiki/Procedural_programming){:target="_blank"} by nature. They are composed of procedures that can be called by other procedures or clients. The use of classes and objects is supported, but only as data types or utilities. Their functions can not be called remotely.

An example of this is the ``sayBoth`` procedure from the [data transportation example](04_basic_features#data-transportation) on the basic features page. This example uses a ``Person`` class to pass the name to the ``sayHi`` and ``sayHello`` procedures.
An example of this is the ``sayBoth`` procedure from the [data transportation example](04_basic_features.html#data-transportation) on the basic features page. This example uses a ``Person`` class to pass the name to the ``sayHi`` and ``sayHello`` procedures.

{:.filename}
src/greetings/sayBoth.ts
Expand Down Expand Up @@ -303,7 +303,7 @@ The full example has more segments and provides all the configurations and has m
---

{:.previous-chapter}
[Advanced features](05_advanced_features)
[Advanced features](05_advanced_features.html)

{:.next-chapter}
[Deployment](07_deployment)
[Deployment](07_deployment.html)
10 changes: 5 additions & 5 deletions documentation/07_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ Creating a cluster means spreading multiple services over multiple servers to ru

Important to know is that any cluster:

1. Requires at least one [repository](03_runtime_services#repository).
1. Requires at least one [node](03_runtime_services#node) and can scale up to a large amount of nodes.
1. Only requires a [gateway](03_runtime_services#gateway) when working with multiple nodes that need orchestration or load balancing.
1. Does not require a [proxy](03_runtime_services#proxy).
1. Requires at least one [repository](03_runtime_services.html#repository).
1. Requires at least one [node](03_runtime_services.html#node) and can scale up to a large amount of nodes.
1. Only requires a [gateway](03_runtime_services.html#gateway) when working with multiple nodes that need orchestration or load balancing.
1. Does not require a [proxy](03_runtime_services.html#proxy).

The following are some examples of clusters:

Expand All @@ -90,4 +90,4 @@ In the future we will provide a Docker image for Jitar.
---

{:.previous-chapter}
[Building applications](06_building_applications)
[Building applications](06_building_applications.html)
2 changes: 1 addition & 1 deletion examples/1-basic/1-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"build": "tsc",
"start": "node --experimental-network-imports --experimental-fetch dist/start.js --config=jitar.json"
"start": "node --experimental-network-imports dist/start.js --config=jitar.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
8 changes: 4 additions & 4 deletions examples/1-basic/2-segmentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"scripts": {
"build": "tsc",
"repo": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node2.json"
"repo": "node --experimental-network-imports dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports dist/start.js --config=conf/node2.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
8 changes: 4 additions & 4 deletions examples/1-basic/3-load-balancing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"scripts": {
"build": "tsc",
"repo": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node2.json"
"repo": "node --experimental-network-imports dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports dist/start.js --config=conf/node2.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/1-basic/4-access-protection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "tsc",
"start": "node --experimental-network-imports --experimental-fetch dist/start.js --config=jitar.json"
"start": "node --experimental-network-imports dist/start.js --config=jitar.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/1-basic/5-multi-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "tsc",
"start": "node --experimental-network-imports --experimental-fetch dist/start.js --config=jitar.json"
"start": "node --experimental-network-imports dist/start.js --config=jitar.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
8 changes: 4 additions & 4 deletions examples/1-basic/6-data-transportation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"private": true,
"scripts": {
"build": "tsc",
"repo": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports --experimental-fetch dist/start.js --config=conf/node2.json"
"repo": "node --experimental-network-imports dist/start.js --config=conf/repo.json",
"gateway": "node --experimental-network-imports dist/start.js --config=conf/gateway.json",
"node1": "node --experimental-network-imports dist/start.js --config=conf/node1.json",
"node2": "node --experimental-network-imports dist/start.js --config=conf/node2.json"
},
"dependencies": {
"jitar-nodejs-server": "^0.3.4"
Expand Down
Loading