Tagging


The routing variables _tag and _tag_relay are used to implement a special behaviour called Tagging in PSYC.

It is mostly used to map a response back to its request and gives the sender a way to easily figure out which replies were triggered by packets it sent and thus handle responses asynchronously.

When an entity receives a packet and intends to send a response to it, it MUST copy the contents of the _tag variable to the _tag_relay variable of the response.

The contents of _tag is opaque and can be an arbitrary value. It is strongly recommended to generate globally unique ids for tags.

Should the routing layer of any involved router encounter an error while delivering a tagged message and intend to generate an error message, it SHOULD copy the tag to a _tag_relay variable in the error report.


You can attach a _tag variable to any packet and any entity acting upon reception of such a packet MUST copy the contents of _tag into a variable called _tag_relay.

Alright, currently it is often called _tag_reply but that is subject to change.

Tags are placed into the routing layer of PSYC so that errors on routing level can easily carry that _tag_relay back to the sender and it can figure out what went wrong (or who to blame). The mailer-daemon style complete copy of the original message is not necessary then. This also explains why it might be more appropriate to call it _tag_relay rather than _tag_reply as the reply may come from any relay on the route, not just the final receiving entity.

Tags are being used in