Nixers project: Bittorrent library - Community & Forums Related Discussions

Users browsing this thread: 1 Guest(s)
josuah
Long time nixers
(06-08-2017, 06:40 PM)z3bra Wrote: The main disadvantage is that you will have a lot of I/O upon concatenation, and that would be a single threaded process.
This would also use a shitons on inodes, but that's not the biggest issue.

Thanks, I did not think about this.

(06-08-2017, 06:40 PM)z3bra Wrote: Writing directly to the file [...] this is not atomic, and require a "cache file"

I mostly thought about concurrent seeding and leeching. I asked "is it possible to read and write a file at the same time" ? If not, one big torrent file open for writing one piece could not be used for reading another piece. But z3bra said on irc: "you can do that by mmap'ing the file".

So no real advantage to save the parts on different files, a big buffer file can provide everything needed.

The cache file will contain a list of completed pieces, this will bring atomicity back: a not fully written piece will not be in this cache file, and will be downloaded again if something went wrong.

(06-08-2017, 06:40 PM)z3bra Wrote: I think there is no urge to settle this now.

Let's begin with the beginning. I can get started with UTF-8, as discussed with z3bra:
http://bittorrent.org/beps/bep_0003.html tells us that:

Quote:All strings in a .torrent file that contains text must be UTF-8 encoded.

And the clients using the library may have broken locale, or simply use a different encoding. The wchar.h (C90) standard library can convert the currently running operating system encoding whatever it is to a encoding independent number (character position in Unicode).

(06-08-2017, 06:40 PM)z3bra Wrote: I chose to implement all the points in the RFC one by one, in the order they appear. It might not be the best way to handle this project, but at least I can easily know where I'm at, and what needs to be done.

We will need to notify each other our progress and self-assignments.


Messages In This Thread
Nixers project: Bittorrent library - by z3bra - 30-07-2017, 04:40 AM
RE: New project: Bittorrent library - by r4ndom - 30-07-2017, 05:33 AM
RE: New project: Bittorrent library - by Tmplt - 30-07-2017, 07:20 AM
RE: New project: Bittorrent library - by z3bra - 30-07-2017, 07:22 AM
RE: New project: Bittorrent library - by Tmplt - 30-07-2017, 07:31 AM
RE: New project: Bittorrent library - by z3bra - 30-07-2017, 09:15 AM
RE: New project: Bittorrent library - by Tmplt - 30-07-2017, 09:45 AM
RE: New project: Bittorrent library - by z3bra - 30-07-2017, 10:42 AM
RE: New project: Bittorrent library - by z3bra - 30-07-2017, 08:45 PM
RE: New project: Bittorrent library - by venam - 31-07-2017, 12:22 AM
RE: New project: Bittorrent library - by z3bra - 31-07-2017, 03:36 AM
RE: New project: Bittorrent library - by jkl - 31-07-2017, 04:13 AM
RE: New project: Bittorrent library - by z3bra - 31-07-2017, 07:18 AM
RE: New project: Bittorrent library - by sff - 31-07-2017, 01:28 PM
RE: New project: Bittorrent library - by z3bra - 01-08-2017, 04:19 AM
RE: New project: Bittorrent library - by r4ndom - 01-08-2017, 05:31 PM
RE: New project: Bittorrent library - by z3bra - 01-08-2017, 06:19 PM
RE: New project: Bittorrent library - by z3bra - 02-08-2017, 03:53 AM
RE: New project: Bittorrent library - by r4ndom - 02-08-2017, 06:24 AM
RE: New project: Bittorrent library - by z3bra - 02-08-2017, 08:27 AM
RE: New project: Bittorrent library - by xero - 02-08-2017, 07:27 PM
RE: New project: Bittorrent library - by z3bra - 03-08-2017, 03:31 AM
RE: New project: Bittorrent library - by r4ndom - 03-08-2017, 04:57 AM
RE: New project: Bittorrent library - by z3bra - 03-08-2017, 07:59 AM
RE: New project: Bittorrent library - by josuah - 05-08-2017, 04:06 PM
RE: New project: Bittorrent library - by z3bra - 05-08-2017, 06:18 PM
RE: New project: Bittorrent library - by josuah - 05-08-2017, 07:21 PM
RE: New project: Bittorrent library - by z3bra - 06-08-2017, 07:10 AM
RE: New project: Bittorrent library - by josuah - 06-08-2017, 01:10 PM
RE: New project: Bittorrent library - by josuah - 06-08-2017, 05:00 PM
RE: New project: Bittorrent library - by z3bra - 06-08-2017, 06:40 PM
RE: New project: Bittorrent library - by josuah - 07-08-2017, 09:38 AM
RE: New project: Bittorrent library - by z3bra - 08-08-2017, 05:49 PM
RE: New project: Bittorrent library - by josuah - 11-08-2017, 05:23 PM
RE: New project: Bittorrent library - by z3bra - 12-08-2017, 03:37 AM
RE: New project: Bittorrent library - by josuah - 12-08-2017, 07:24 AM
RE: New project: Bittorrent library - by z3bra - 12-08-2017, 08:42 AM
RE: New project: Bittorrent library - by josuah - 12-08-2017, 07:06 PM
RE: New project: Bittorrent library - by nas - 24-08-2017, 11:53 AM
RE: New project: Bittorrent library - by josuah - 24-08-2017, 01:36 PM
RE: New project: Bittorrent library - by josuah - 24-08-2017, 01:42 PM
RE: New project: Bittorrent library - by nas - 25-08-2017, 02:44 AM
RE: New project: Bittorrent library - by z3bra - 25-08-2017, 10:18 AM
RE: New project: Bittorrent library - by z3bra - 26-08-2017, 03:26 AM
RE: New project: Bittorrent library - by josuah - 29-08-2017, 02:51 AM
RE: New project: Bittorrent library - by z3bra - 29-08-2017, 03:17 AM
RE: New project: Bittorrent library - by josuah - 29-08-2017, 08:16 AM
RE: New project: Bittorrent library - by z3bra - 28-09-2017, 11:53 AM
RE: New project: Bittorrent library - by z3bra - 09-10-2017, 02:36 PM
RE: New project: Bittorrent library - by josuah - 10-10-2017, 05:24 PM
RE: New project: Bittorrent library - by z3bra - 10-10-2017, 07:36 PM
RE: New project: Bittorrent library - by josuah - 28-03-2018, 05:40 PM
RE: New project: Bittorrent library - by z3bra - 03-07-2018, 11:24 AM