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
As new Transports are created, you may wish to reevaluate your needs and select the latest Transports that best suit your requirements. You may wish to remove the Transports you had before, or simply append the new Transports to `modules.transport` in order to establish connections with peers that support either.
62
62
63
+
<details><summary>Read More</summary>
64
+
If you want to know more about libp2p transports, you should read the following content:
Encryption is an important part of communicating on the libp2p network. Every connection must be encrypted to help ensure security for everyone. As such, Connection Encryption (Crypto) is a required component of libp2p.
More than connecting with other peers, you want to have them communicating in a meaningful way to your application. With libp2p you are able to create your own protocols so that you can integrate your business logic into the network. As an example, you can create a chat protocol on top of libp2p and use it to exchange chat messages.
@@ -168,6 +182,14 @@ Protocols design is similar to an http api, where each protocol has an handler,
168
182
169
183
Note that there are a lot of useful modules for working with async iterables, you can find them on [alanshaw/it-awesome](https://github.com/alanshaw/it-awesome). For example, we could use [alanshaw/paramap-it](https://github.com/alanshaw/paramap-it) to simplify the transform function above.
170
184
185
+
<details><summary>Read More</summary>
186
+
If you want to know more about libp2p stream multiplexing, you should read the following content:
Now that you have configured a [`Transport`][transport], [`Crypto`][crypto] and [**Stream Multiplexer**](streamMuxer) module, you can start your libp2p node. We can start and stop libp2p using the [`libp2p.start()`](./API.md#start) and [`libp2p.stop()`](./API.md#stop) methods.
You can find out more about peer routing on the example provided on [./CONFIGURATION.md#setup-with-content-and-peer-routing](./CONFIGURATION.md#setup-with-content-and-peer-routing).
320
348
349
+
<details><summary>Read More</summary>
350
+
If you want to know more about libp2p peer routing, you should read the following content:
351
+
352
+
-https://docs.libp2p.io/concepts/peer-routing
353
+
</details>
354
+
321
355
#### Content Routing
322
356
323
357
Content routing provides a way to find where content lives in the network. It works in two steps: 1) Peers provide (announce) to the network that they are holders of specific content and 2) Peers issue queries to find where that content lives. A Content Routing mechanism could be as complex as a DHT or as simple as a registry somewhere in the network.
@@ -374,6 +408,12 @@ for await (const provider of libp2p.contentRouting.findProviders(cid2)) {
374
408
375
409
If you are not familiar with `CIDs`, you should have a look at [multiformats/js-cid](https://github.com/multiformats/js-cid). Moreover, you can find out more about peer routing on the example provided on [./CONFIGURATION.md#setup-with-content-and-peer-routing](./CONFIGURATION.md#setup-with-content-and-peer-routing).
376
410
411
+
<details><summary>Read More</summary>
412
+
If you want to know more about libp2p content routing, you should read the following content:
413
+
414
+
-https://docs.libp2p.io/concepts/content-routing
415
+
</details>
416
+
377
417
### Pubsub
378
418
379
419
If you are looking for real time message exchange between peers, pubsub may be what you are looking for. Publish/Subscribe is a system where peers congregate around topics they are interested in. Peers interested in a topic are said to be subscribed to that topic and should receive the data published on it from other peers.
There are a lot of other concepts within `libp2p`, mostly regarding performance improvement through connection management configuration, metrics, create your own modules, among other.
0 commit comments