GitBook: [2.0.0] 30 pages and 8 assets modified
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 355 KiB |
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 355 KiB |
Before Width: | Height: | Size: 595 KiB After Width: | Height: | Size: 595 KiB |
Before Width: | Height: | Size: 595 KiB After Width: | Height: | Size: 595 KiB |
@ -32,13 +32,13 @@ The main entry point `@fluencelabs/fluence` is `Fluence` facade. It provides eas
|
||||
4. A set of builtin functions required by Fluence protocol
|
||||
5. Support for the typescript code which is generated by Aqua compiler
|
||||
|
||||
Even though the js-based implementation closely resembles [node](https://github.com/fluencelabs/gitbook-docs/fluence-js/node.md) there are some considerable differences to the latter.
|
||||
Even though the js-based implementation closely resembles [node](https://doc.fluence.dev/docs/node) there are some considerable differences to the latter.
|
||||
|
||||
`FluencePeer` does not host services composed of wasm modules. Instead it allows to register service call handlers directly in javascript. The Aqua language compiler creates a typed helpers for that task.
|
||||
|
||||
Due to the limitations of browser-based environment `FluencePeer` cannot be discovered by it's Peer Id on it's own. To overcome this `FluencePeer` must use an existing node which will act as a `relay`. When a peer is connected through a relay it is considered to be `client`. The `FluencePeer` routes all it's particle through it's relay thus taking advantage of the peer discovery implemented on the node. A particle sent to the connected client must be routed through it's relay.
|
||||
|
||||
The js-based peer does not implement the full set of builtin functions due the limitations described previously. E.g there is no built-ins implementation for _kad_ or _srv_ services. However _op_ service is fully implemented. For the full descriptions of implemented built-ins refer to [Api reference](https://github.com/fluencelabs/gitbook-docs/fluence-js/fluence-js/6_reference/modules.md)
|
||||
The js-based peer does not implement the full set of builtin functions due the limitations described previously. E.g there is no built-ins implementation for _kad_ or _srv_ services. However _op_ service is fully implemented. For the full descriptions of implemented built-ins refer to [Api reference](https://doc.fluence.dev/docs/fluence-js/6-reference)
|
||||
|
||||
In contrast with the node implementation `FluencePeer` can initiate new particles execution. Aqua compiler generates executable functions from `func` definitions in aqua code.
|
||||
|
||||
|
@ -16,7 +16,7 @@ npm start
|
||||
|
||||
Which will open a new browser tab at `http://localhost:3000` . Following the instructions, we connect to any one of the displayed relay ids, open another browser tab also at `http://localhost:3000`, select a relay and copy and paste the client peer id and relay id into corresponding fields in the first tab and press the `say hello` button.
|
||||
|
||||

|
||||

|
||||
|
||||
The result looks familiar, so what's different? Let's have a look at the Aqua file. Navigate to the `aqua/getting_started.aqua` file in your IDE:
|
||||
|
||||
|
@ -39,7 +39,7 @@ With Docker and VSCode in place:
|
||||
* When asked for volume, press enter \(unique\)
|
||||
* Open Terminal in VSCode \(ctrl-\`\)
|
||||
|
||||

|
||||

|
||||
|
||||
Congratulations, you now have a fully functional Fluence development environment. For a variety of container management options, click on the `Dev Container: Fluence` button in the lower left of your tool bar:
|
||||
|
||||
|