What is Dat -
Dat is protocol for sharing data between computers.

Until now, it was difficult to avoid centralized servers without major changes. Dat's distributed network allows users to store data where they want. By decentralizing storage, Dat also increases speed by downloading from many sources at the same time. It makes sure that data is transparent to users and everyone receives only the data they want.

We often try to share large files with each other using either USB or any cloud service e.g Google drive, Dropbox. But none of this store, track, and share our data over time. Also, we are stuck choosing between security, speed, or ease of use.

Dat protocol provides all three features and user friendly tools for fast and encrypted file sharing. Dat works on distributed network meaning we can share files peer to peer, skipping centralized servers. It allows users to share files over encrypted connection using state-of-the-art cryptography.

Dat is built to distribute storage and we can ensure that there is no single point of failure for data storage. Dat does not host any data. All the data is directly transferred between peers with little reliance on Dat maintaining servers. Public servers help discover peers with very little bandwidth.

How do Dat peers discover one another on the Internet?
It currently uses 3 methods -
1. Multicast udp
2. A distributed hash table
3. Centralized signaling servers
(We run a signaling server for users of our client applications.)

In Dat, peers only connect if they both have the same Dat link.

Core Modules

These modules form the backbone of Dat software:

  • hypercore - A secure, distributed append-only log.
  • hyperdrive - A secure, real time distributed file system (built on hypercore).
  • hyperdiscovery - Defaults for networking discovery and connection management.
  • dat-node - High-level module for building Dat applications on the file system.
  • dat-js - Using Dat in the browser.

Dat Terminology

  1. dat, dat archive - is a set of files and dat metadata.
    A dat folder contains files of any type, which we can sync with other users. We use a dat read key to share data with others. When we initialize or create a dat, we are creating a .dat folder to hold the metadata and the dat keys (a read and write key).
  2. Write key and Writer - Write key is a private part of dat keys. Writer is a user who can write data to dat using write keys.
  3. Collaborator - It is a user who can access a Dat archive if the owner or another collaborator sends the the Dat link.
  4. Swarm - A group of peers accessing similar Dat archive and are connected to each other over the Distributed Web.
  5. Read key - It is used as the Dat link. Messages are signed using the read key, allowing write access to feeds.
  6. The discovery key - It is a hashed read key. The discovery key is used to find peers on the read key without exposing the original read key to network.
  7. Feed - the lowest level component of Dat. For each Dat, there are two feeds - the metadata and the content.
  8. Metadata Feed - Like an HTTP header, the metadata contains a pointer to the contents of Dat and the file list. The first entry in the metadata feed is the key for the content feed.
  9. The content feed - It is a feed containing the file contents for a Dat archive.
  10. Hyperdrive - peer-to-peer directories. Hyperdrive handles the distribution of files while encrypting data transfer and ensuring content integrity.
  11. Hypercore - is a protocol and network for distributing and replicating feeds of binary data.

Privacy in dat

Files shared with Dat are encrypted (using the read key) so only users with  unique read key can access files. Anyone with the read key will have access to the files. The read key allows any user to download, and re-share files, whether it is intended them to have the read key or not.

Dat installation and Use

Dat can be used as a command line tool, a Node.js library, and a JS library:
Node.js - npm install dat
JavaScript - npm install dat-js
Command Line -
curl -o- https://raw.githubusercontent.com/datproject/dat/master/download.sh | bash