Questions about aspect filtering & destinations #292
Replies: 2 comments 1 reply
-
I had similar questions and I can't really explain it myself. So I provide this: #260 From the response to my issue: My current understanding is that it's a name that acts as a filter. If you have Foo.Bar then you can use that as a destination and process announces, data, etc. in code. If you had Foo.Bar.Announce and Foo.Bar.Data, then you could expect the data coming in to be filtered to the proper destination. I don't know why you'd do this, but what I don't know I can just about squeeze into the Grand Canyon, and more options are usually better than fewer. |
Beta Was this translation helpful? Give feedback.
-
Most simple apps will only need one destination, yes. As complexity grows, you can easily add more. It is a very useful expandability to have. No permanent OUT destinations need to be made. All outgoing communication in Reticulum is source-less. They are as such an abstract construct, and are always ephemerally created and directly tied to a specific IN destination somewhere else in the network. So you just create one when you want to communicate with a destination somewhere on the network, and only when you want to be the initiator of the communication. If one piece of code only listens for incoming data or waits for a Link to be opened, it only needs an IN destination.
In most cases, it is probably better and more efficient to place sub-functions under various paths in a
This is up to you. In most cases, it will probably be sufficient to create a destination for each scope or type of communication. You could imagine having a destination for library-type object. You could create Later, you may want to add functionality to your application for libraries to synchronise with each other, and this would probably make sense to segment out into it's own destination, for example
Running the actual app communication and state syncronisation over Also, the network-maintaining announce-rate limiting will most likely quickly kick in and put your announced destinations on pause (plus invoke a delay penalty). This means that your application will stop working as intended. What the maximum announce rate you can run is, will vary from network segment to network segment, and is something that is in the control of each network segment owner themselves. Much better to use the announce mechanism to discover peers, and then periodically have them communicate with each other about the state of various media items. For a very efficient way to converge a state-database over a heterogenous network topology, feel free to scissor what you can use from LXMF. It is super efficient, and even very resilient to nodes dropping in and out of the network, while still getting everyone up to date when they become available. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to understand the intended purpose of destination aspects and how best to use them.
I understand using the app name as the first aspect, but it seems any additional levels tie the destination to only messages for those aspects the destination is constructed with.
If the design intention is to use multiple destinations for each type of message an app may require, defining aspects in the destination constructor makes sense.
I tend to think of destinations as being tied to the app, not specific functions of an app, so an app would only need one destination (or possibly 2, IN & OUT). If that was the intention, I would expect to see an aspect property and methods to get the aspects from incomming messages or from the RNS.Transport object so message handlers could process messages based on aspects (thinking of aspects as app sub-functions).
So I'm trying to decide if I need to setup separate destinations for:
I'm thinking my app needs 3 RNS destinations:
1 To announce availability of a new media item for publication (to anyone / the world)
An RNS annoounce is perfect for this, with the appData being an IPFS hash. Not sure
tho, as it looks like an announce is sent when the app is started automatically.
2 Receiving an acknowledgement from a publisher they have pinned the media in IPFS
3 Receiving a message that publishing to a specific platform has completed
3 RNS destinations would be required since they require different aspect filters, assuming the aspect filtering is static with destination definition.
Beta Was this translation helpful? Give feedback.
All reactions