# Data origins
Most of the metadata schemes discussed in the documentation need to point to external data that may be available through various channels.
To overcome delays or data unavailability, a prioritized list of URIs and fallbacks is used. Depending on the type of resource, Content URIs or Messaging URIs are used.
# Content URI
Transfering data files may be done through IPFS and http/s (Swarm and Swarm Feeds may be supported in the future). In order to use an ordered list of origins and fallbacks, Vocdoni defines data origins in a single field by using a comma separated list of URIs like the examples below:
- First, try to fetch the given <content-hash> from IPFS
- In case of error, attempt to fetch <your-ipfs-hash-here> from the IPFS gateway provided by CloudFlare
- First, try to fetch the given content hash from IPFS
- If both fail, attempt to fetch from a centralized fallback server
URI order matters:
- Clients are expected to try using URI's from left to right
- In the event of a mismatch, the data from the leftmost functional service is used
# Content Hashed URI
In essence, it features a Content URI with the hash of the underlying data appended at the end.
- Content URI items are delimited by the
- The hash of a Content Hashed URI is delimited by the
- The hash is a SHA3-256 of the underlying content
This type of link is intended for contents that don't change frequently and that require integrity checks where underlying HTTP endpoints cannot enforce it.
# Messaging URI
Intended for two-way communications between nodes, Messaging URI's look similar to a Content URI:
- Attempt to use the WebSocket from host1 endpoint in the first place
- In case of error, attempt to connect using host2
Currently, only WebSocket and HTTP protocols are supported for messaging. PSS, IPFS PubSub and Whisper may be supported as well in the future.
Same as before, URI order matters here too:
- Clients are also expected to try using URI's from left to right
- In the event of a mismatch, the data from the leftmost functional service is also used
# Privacy centric messaging
Where protocols like PSS or Whisper allow for pseudo anonymous communication, high stake elections may need additional transport guarantees for anonymity.
In this case, Vocdoni proposes the use of Nym (opens new window) as a mixing infrastructure for anonymous voting submission that cannot be correlated to an IP address.