Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ultimate Guide: Torrents Intro #4

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Conversation

KyleTryon
Copy link
Contributor

  • Add guides section
  • Add to nav
  • Create "Ultimate" guides section
    • This area serves as a knowledge base for all things that are not directly related to the UHS codebase but are important to building the ultimate home server.
  • Write "The Ultimate Intro to Torrents"

Very much open to input and suggestions. Currently a work in progress.

@vercel
Copy link

vercel bot commented Jun 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ultimatehomeserver-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2023 4:01pm

"position": 2,
"link": {
"type": "generated-index",
"description": "Torrents are a popular way to share content online. This section will tell you absolutely everything about torrents"
Copy link

@CBID2 CBID2 Jun 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] Hmm 🤔...saying torrents at the end seems redundant. Also, it could be more engaging. What makes Torrent the best content-sharing method in comparison to other techniques?

Suggested change
"description": "Torrents are a popular way to share content online. This section will tell you absolutely everything about torrents"
"description": "Torrents are a popular way to share content online. This section will tell you absolutely everything about torrents"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the description.

Looked this up on google:

The standard Google description length is 150-160 characters. The maximum SEO meta description length can be up to 300 characters.

This new description I am uploading is 293 characters. Still open to change, I do say torrents again in the second sentence.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great but I think it'd be best to hear your opinion on it and not so much Google's.

# What is a Torrent?

More than likely, you are at least somewhat familiar with torrents. They are a way to download files from the internet.
But how do they work? What are the benefits of using torrents? How do you use them? Are they safe? Consider the following your guide to _torrents_.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] This part could be improved a bit more. What makes this guide the best place to learn about Torrent?

Suggested change
But how do they work? What are the benefits of using torrents? How do you use them? Are they safe? Consider the following your guide to _torrents_.
But how do they work? What are the benefits of using torrents? How do you use them? Are they safe? Well, you've come to the right place! 😄 Read on below to learn why Torrents will make your content-sharing experience easier:


## The Background of BitTorrent

In the late 90s [Bram Cohen](https://en.wikipedia.org/wiki/Bram_Cohen) ([twitter](https://twitter.com/bramcohen)), a software developer, was working for a company called [MojoNation](<https://en.wikipedia.org/wiki/Mnet_(peer-to-peer_network)#MojoNation>) that was trying to create an encrypted decentralized file storage system for commercial-use.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] I highly recommending not using Wikipedia as a source of reference since it is known to have inaccurate information. I think using Cohen's profile on Chia's website would be a better alternative if you want.

Suggested change
In the late 90s [Bram Cohen](https://en.wikipedia.org/wiki/Bram_Cohen) ([twitter](https://twitter.com/bramcohen)), a software developer, was working for a company called [MojoNation](<https://en.wikipedia.org/wiki/Mnet_(peer-to-peer_network)#MojoNation>) that was trying to create an encrypted decentralized file storage system for commercial-use.
In the late 90s, [Bram Cohen](https://en.wikipedia.org/wiki/Bram_Cohen) ([twitter](https://twitter.com/bramcohen)), a software developer, was working for a company called [MojoNation](<https://en.wikipedia.org/wiki/Mnet_(peer-to-peer_network)#MojoNation>) that was trying to create an encrypted decentralized file storage system for commercial-use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im a little worried because Chia is his current business venture that the page may not last forever. Unfortunately his personal website is basically empty. He has a GitHub profile, but it too is a little bare. Maybe we should just use the twitter link and remove the separate ([twitter])

Comment on lines +16 to +17
Unfortunately, the company was faced with severe financial difficulties and would close in 2002.
Just before then, Cohen would realize that the technology he had been working on, while not a commercial success, could be used to create a new file sharing protocol that could dramatically speed up the process of sharing large files, such as [porn collections](https://www.wired.com/2005/01/bittorrent-2/).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] Structure-wise, I think it would be helpful to place the second paragraph first. It'll exemplify Cohen's rise and fall a bit clearly.

Suggested change
Unfortunately, the company was faced with severe financial difficulties and would close in 2002.
Just before then, Cohen would realize that the technology he had been working on, while not a commercial success, could be used to create a new file sharing protocol that could dramatically speed up the process of sharing large files, such as [porn collections](https://www.wired.com/2005/01/bittorrent-2/).
Unfortunately, the company was faced with severe financial difficulties and would close in 2002.
Just before then, Cohen would realize that the technology he had been working on, while not a commercial success, could be used to create a new file sharing protocol that could dramatically speed up the process of sharing large files, such as [porn collections](https://www.wired.com/2005/01/bittorrent-2/).

Comment on lines +77 to +78
The data inside a torrent file is so small, that it can, in fact be can be represented as a URL rather than a file.
A ['Magnet link'](https://en.wikipedia.org/wiki/Magnet_URI_scheme) is a URL scheme that allows you to share information about a torrent as a link, rather than a file.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] Explaining the data and defining Magnet Pick can make it difficult for users to understand at first glance. I suggest defining the term first and then describing its connection to the display of a torrent's data.

Suggested change
The data inside a torrent file is so small, that it can, in fact be can be represented as a URL rather than a file.
A ['Magnet link'](https://en.wikipedia.org/wiki/Magnet_URI_scheme) is a URL scheme that allows you to share information about a torrent as a link, rather than a file.
The data inside a torrent file is so small, that it can, in fact be can be represented as a URL rather than a file.
A ['Magnet link'](https://en.wikipedia.org/wiki/Magnet_URI_scheme) is a URL scheme that allows you to share information about a torrent as a link, rather than a file.

Comment on lines +99 to +100
This link, when clicked, will launch your system default torrent client and begin downloading the file.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
This link, when clicked, will launch your system default torrent client and begin downloading the file.
When clicked on, the above link will launch your system's default torrent client and begin downloading the file.

Comment on lines +103 to +107
If you were downloading a typical file from the internet, you would likely use a web browser to grab the file, save it to your computer and then end communication with the server.
BitTorrent is different, as it is a peer-to-peer protocol, you are not just downloading a file from a server, you are also uploading the file to other users.
To do so, you'll need a BitTorrent client, some software that can communicate with other users and share the file.

There are many BitTorrent clients available, but the most popular these days are:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
If you were downloading a typical file from the internet, you would likely use a web browser to grab the file, save it to your computer and then end communication with the server.
BitTorrent is different, as it is a peer-to-peer protocol, you are not just downloading a file from a server, you are also uploading the file to other users.
To do so, you'll need a BitTorrent client, some software that can communicate with other users and share the file.
There are many BitTorrent clients available, but the most popular these days are:
If you were downloading a typical file from the internet, you would likely use a web browser to grab the file, save it to your computer, and then end communication with the server.
BitTorrent is different. It is a peer-to-peer protocol, meaning that you are not just downloading a file from a server, you are also uploading the file to other users.
To do this, you'll need a BitTorrent client and some software that can communicate with other users and share the file.
There are many BitTorrent clients available, but the most popular these days are:

Comment on lines +117 to +118
When a torrent client initiates a download from a torrent file, it will first connect to the tracker and announce that it is joining the swarm and what pieces of the file it has available, if any.
The tracker will respond with a list of peers that the client can connect to and begin downloading the file from. Once the client and a peer have connected, they no longer require the tracker to communicate with each other. However, the client will continue to communicate with the tracker to update it on the pieces it has available and to receive a list of new peers to connect with.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
When a torrent client initiates a download from a torrent file, it will first connect to the tracker and announce that it is joining the swarm and what pieces of the file it has available, if any.
The tracker will respond with a list of peers that the client can connect to and begin downloading the file from. Once the client and a peer have connected, they no longer require the tracker to communicate with each other. However, the client will continue to communicate with the tracker to update it on the pieces it has available and to receive a list of new peers to connect with.
When a torrent client initiates a download from a torrent file, it will first connect to the tracker. Next, the torrent cilent announces that it is joining the swarm and what pieces of the file it has available.
The tracker will then respond with a list of peers that the client can connect to and begin downloading the file from. Once the client and a peer have connected, they no longer require the tracker to communicate with each other.
**Note:** The client will continue to communicate with the tracker to update it on the pieces it has available and to receive a list of new peers to connect with.


### DHT (Distributed Hash Table)

A [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is a decentralized system for storing and retrieving simple key-value data, where any member of the network can retrieve data from any other member of the network. In BitTorrent, the [Mainline DHT](https://en.wikipedia.org/wiki/Mainline_DHT) protocol is used to store information about torrents and their peers locally. The DHT works as an alternative to a tracker and can aid in connecting to a swarm if the tracker is offline.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
A [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is a decentralized system for storing and retrieving simple key-value data, where any member of the network can retrieve data from any other member of the network. In BitTorrent, the [Mainline DHT](https://en.wikipedia.org/wiki/Mainline_DHT) protocol is used to store information about torrents and their peers locally. The DHT works as an alternative to a tracker and can aid in connecting to a swarm if the tracker is offline.
A [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is a decentralized system for storing and retrieving simple key-value data, where any member of the network can retrieve data from any other member of the network. In BitTorrent, the [Mainline DHT](https://en.wikipedia.org/wiki/Mainline_DHT) protocol is used to store information about torrents and their peers locally. From there, the DHT works as an alternative to a tracker and can aid in connecting to a swarm if the tracker is offline.


A [DHT](https://en.wikipedia.org/wiki/Distributed_hash_table) is a decentralized system for storing and retrieving simple key-value data, where any member of the network can retrieve data from any other member of the network. In BitTorrent, the [Mainline DHT](https://en.wikipedia.org/wiki/Mainline_DHT) protocol is used to store information about torrents and their peers locally. The DHT works as an alternative to a tracker and can aid in connecting to a swarm if the tracker is offline.

To find peers for a particular swarm over DHT, a `get_peers` query is made with the SHA-1 hash of the torrent (the "infohash") as the key to the "nearest" node in the DHT. The node will then respond with a list of peers in the swarm. If the node does not have any peers, it will respond with a list of other nodes in the DHT that are closer to the infohash. The client will then query those nodes for peers and continue until it has found peers to connect with. An algorithmic virtual game of telephone. It is important to note that "nearest" in the context of the DHT is not related to physical geographical distance, but instead a mathematical distance that creates efficient and balanced routing.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
To find peers for a particular swarm over DHT, a `get_peers` query is made with the SHA-1 hash of the torrent (the "infohash") as the key to the "nearest" node in the DHT. The node will then respond with a list of peers in the swarm. If the node does not have any peers, it will respond with a list of other nodes in the DHT that are closer to the infohash. The client will then query those nodes for peers and continue until it has found peers to connect with. An algorithmic virtual game of telephone. It is important to note that "nearest" in the context of the DHT is not related to physical geographical distance, but instead a mathematical distance that creates efficient and balanced routing.
To find peers for a particular swarm over DHT, a `get_peers` query is made with the SHA-1 hash of the torrent (the "infohash") as the key to the "nearest" node in the DHT. The node will then respond with a list of peers in the swarm. If the node does not have any peers, it will respond with a list of other nodes in the DHT that are closer to the infohash. The client will then query those nodes for peers and continue until it has found peers to connect with. Basically, this process is an algorithmic virtual version of the game, telephone.
**Note:** "nearest" in the context of the DHT is not related to physical geographical distance, but instead a mathematical distance that creates efficient and balanced routing.


If you are still actively downloading a file and simultaneously uploading to other peers, you are commonly referred to as a "peer". A peer generically refers to any user in a swarm, but is often used to refer to users who are still downloading the file.

Finally, a "seeder" is a user who has completed downloading a file and continues to share the file with other users. Because of the decentralized nature of BitTorrent and the concept of "pieces", it is extremely beneficial to have seeders in the swam who have full copies of the file. Without enough seeders in a swarm, it is common for all active members in a swarm to exchange pieces with each other, but if no user has the complete file, it is possible that no user will ever complete the download.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
Finally, a "seeder" is a user who has completed downloading a file and continues to share the file with other users. Because of the decentralized nature of BitTorrent and the concept of "pieces", it is extremely beneficial to have seeders in the swam who have full copies of the file. Without enough seeders in a swarm, it is common for all active members in a swarm to exchange pieces with each other, but if no user has the complete file, it is possible that no user will ever complete the download.
Finally, a "seeder" is a user who has completed downloading a file and continues to share the file with other users. Because of the decentralized nature of BitTorrent and the concept of "pieces", it is extremely beneficial to have seeders in the swam who have full copies of the file. Without enough seeders in a swarm, it is common for all active members to exchange pieces with each other. However, if no user has the complete file, it is possible that no user will ever complete the download.


## Torrenting Safely

Torrenting is a great way to download files, but it is important to be aware of the risks involved. While torrenting itself is not illegal, it is often used to download pirated content, which is illegal in many countries. Additionally, because of the decentralized nature of BitTorrent, it is possible for malicious users to join a swarm and spy on the activity of other users. This is especially concerning when downloading pirated content, as it is possible for a malicious user to join the swarm and record the IP addresses of other users in the swarm. This is why it is important to use a VPN when torrenting or some other method of obscuring your IP address.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Proofreading]

Suggested change
Torrenting is a great way to download files, but it is important to be aware of the risks involved. While torrenting itself is not illegal, it is often used to download pirated content, which is illegal in many countries. Additionally, because of the decentralized nature of BitTorrent, it is possible for malicious users to join a swarm and spy on the activity of other users. This is especially concerning when downloading pirated content, as it is possible for a malicious user to join the swarm and record the IP addresses of other users in the swarm. This is why it is important to use a VPN when torrenting or some other method of obscuring your IP address.
Now before you start torrenting like crazy, here's something you need to know. While torrenting itself is not illegal, it is often used to download pirated content, which is illegal in many countries. Additionally, because of the decentralized nature of BitTorrent, it is possible for malicious users to join a swarm and spy on the activity of other users. This is especially concerning when downloading pirated content because it is possible for a malicious user to join the swarm and record the IP addresses of other users in the swarm. This is why it is important to use a VPN when torrenting or some other method of obscuring your IP address.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to re-work like crazy

Copy link

@CBID2 CBID2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @KyleTryon! :) It was nice meeting you in your Twitter space, and thanks for inviting me to review your docs PR. I pointed out a few typos, proofreading errors, and questions to consider when revising this guide in my inline comments. When it comes to typos and proofreading errors, I highly recommend running your descriptions through a digital grammar checker tool Grammarly to ensure that things are correct. Other than that, you're off to a great start! :)

@KyleTryon
Copy link
Contributor Author

Hi @KyleTryon! :) It was nice meeting you in your Twitter space, and thanks for inviting me to review your docs PR. I pointed out a few typos, proofreading errors, and questions to consider when revising this guide in my inline comments. When it comes to typos and proofreading errors, I highly recommend running your descriptions through a digital grammar checker tool Grammarly to ensure that things are correct. Other than that, you're off to a great start! :)

Thank you @CBID2 Nice seeing you again! I think we may add https://github.com/errata-ai/vale and/or LanguageTool to the GitHub actions to try and help automate the grammar checking and such to get at least a good first pass. Thank you so much with your review 🙇

@CBID2
Copy link

CBID2 commented Jun 26, 2023

You're welcome @KyleTryon! 😊 I'm about to implement this Github action. Maybe you can try it too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants