Request / Response example #312
Replies: 3 comments 6 replies
-
No, because you cannot expect to the remote destination to send an announce concurrently with your app running. Do not think of an announce as a real-time signalling or communication method. An announce is the primary way for Reticulum to establish paths in the network, and for distributing necessary cryptographic keys throughout the network. In addition, an announce can contain a small amount of application data. Again, this should not be used for real-time communication. It is much more efficient and correct to use actual packets to and from the destination.
Incorrect. The server must send an announce, otherwise nothing can reach it. When an announce is sent from a destination, a path converges to that destination in the entire network, and verifiable cryptographic keys are distributed to the entire network. If you are only trying these examples out locally (that is, via one shared Reticulum instance, running on the same system), that Reticulum instance will of course know about destinations local to itself, and can resolve them without sending an announce. This is not the case in many other cases. |
Beta Was this translation helpful? Give feedback.
-
There are no delays imposed by the architecture as such. In theory, Reticulum can be as fast or as slow as you want it to be. The current Python reference implementation was written with the goal of being easy to understand, and to serve as a blueprint for other implmentations. As such, speed was the last criteria it was created with in mind. Still, it will run with latencies of a few milliseconds, and happily push around 40mbps when used over fast enough mediums (like Ethernet and WiFi).
Reticulum itself does not currently include any store-and-forward functionality directly in its core protocol and API. But the functionality it does provide makes it very easy for higher-layer protocols to implement such functionality. An example of this is LXMF (the messaging protocol that NomadNet and Sideband uses). Since LXMF is built on top of Reticulum it was very easy to implement completely decentralised and distributed store and forward functionality in the system. You can use the LXMF source code as a good example of how to do this. To establish a link to a When LXMF tries to send a message to a recipient, and discovers that it isn't reachable, it uses the distributed encrypted storage to hold the message for the destination, until it becomes available on the network again. The original sender can disappear in the meantime, and does not need to be available at the time of delivery. |
Beta Was this translation helpful? Give feedback.
-
I thought I came up with a way to use the intended design pattern for destinations, but as I was debugging it I realized every destination requires a new link and / or new resources. That is way more overhead than is necessary when one link and a few message types will do. Any type of filtering or paths for routing messages require a new destination, which in turn requires a new link, if links & resources are to be used. I will instead use a single destination and link and simply use a few bytes of data to route the message to an appropriate handler as I previously described. The way I see it using more destinations, links & resources just increases the chances of failure and complicates the communications. But since I'm new to using RNS and biased given my history with TCP/IP, I'm open to alternative perspectives. |
Beta Was this translation helpful? Give feedback.
-
It's truly great that Mark provides these examples to help get developers up to speed using Reticulum. As developers we all know there's always room for improvement, given the time for it. Here's my constructive input on this example. I offer this from my own myopic perspective, but recognize my suggestion may not be as useful if it were being used with the other examples he provides.
It would be better if the client mode used the announce sent by the server mode to create the destination to send the request back to the server rather than asking for it on the command line.
Since the destination address provided on the command like is for the server (presumably taken from the RNS.log), I see no value in the server code to send an announce, as there is no announce handler to receive it on the client.
Also, since the "Understanding Reticulum" doc states that announces contain everything required to securely reply to the source of the announce, this is a perfect place to showcase that. Here is some suggested code you might consider using. It's not a complete example, it is meant to be used within a class definition:
`
# Create an RNS communications endpoint using the AppName and provided ID
def createRNSdestination(self, rnsID):
return RNS.Destination(rnsID, RNS.Destination.OUT,
RNS.Destination.SINGLE,
self.AppName)
`
Beta Was this translation helpful? Give feedback.
All reactions