issue-#138 Support for files larger than 2Gb

Merged to the master branch

Re: issue-#138 Support for files larger than 2Gb

Postby Josef Templ » Wed May 03, 2017 2:08 pm

After finding the trick how to read/write normal Stores.Store objects from/to a Files64 file
I have added Stores64 now.
Note: It does not only support reading/writing of base types but also of Stores
and it does not introduce any incompatibilities.
However, due to the file format of Stores a single Store cannot exceed 2GB.
Nevertheless it is possible to create for example a database of texts with more than 2GB total size.

See diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=affb3c0379ac274047973126b3f93d023db01e18&rev_to=2f33ea39d8e19c769cfb01f26f3067cb362970b2.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#138 Support for files larger than 2Gb

Postby DGDanforth » Thu May 04, 2017 12:50 am

Josef Templ wrote:After finding the trick how to read/write normal Stores.Store objects from/to a Files64 file
I have added Stores64 now.
Note: It does not only support reading/writing of base types but also of Stores
and it does not introduce any incompatibilities.
However, due to the file format of Stores a single Store cannot exceed 2GB.
Nevertheless it is possible to create for example a database of texts with more than 2GB total size.

See diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=affb3c0379ac274047973126b3f93d023db01e18&rev_to=2f33ea39d8e19c769cfb01f26f3067cb362970b2.

- Josef

Good job.
More and more work is being done on large data sets (specifically Artificial Intelligence) and so
64bit processing is becoming more important.
User avatar
DGDanforth
 
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA

Re: issue-#138 Support for files larger than 2Gb

Postby Josef Templ » Tue Jun 06, 2017 5:00 pm

This issue is ready for voting.

Summary: this issue adds module Files64 for large files and it adds
module Stores64 for reading and writing large files in the binary Stores format.
Stores64 also allows one to read and write a Stores.Store from/to a large file.
If I remember correctly, there was a consensus that Files64 is required.
There was an open discussion about adding Stores Reader/Writer operations to Files64.
The present solution provides the Stores Reader/Writer operations but not inside Files64 but
in a separate module Stores64.
Since module Files deals only with bytes and byte blocks Stores Reader/Writer operations do not belong
into Files64. Since reading and writing a Stores.Store is now also supported it is quite natural to
put them into a module named Stores64. Having the operations separated gives also sense if one considers
typical use cases such as serving large files in an http server or copying large files in a file backup program.
These deal with bytes and byte blocks only and Files64 provides everything required.
If Stores Reader/Writer operations are to be used one must be aware of the fact that they use a specific file
format for things like integers, strings, etc and this is expressed by importing Stores/Stores64.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#138 Support for files larger than 2Gb

Postby Robert » Tue Jun 06, 2017 7:34 pm

Josef Templ wrote:This issue is ready for voting.

A couple of minor comments:
1 - There seem to be two relevant diffs: Stores64 posted 3-May-2017 & Files64 posted 1-Nov-2016? The latter diff is confusing; the Mod is Host but the Docu is System.
Can we have a simpler diff like the Stores64 one?

2 - The Files64 Docu says "refer to Files", or words to that effect. Ok for the detailed descriptions, but I think it would be helpful to include the interface at the beginning as in most Docu files. Often the interface is adequate "reminder" documentation, and this would avoid a two-stage lookup.
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#138 Support for files larger than 2Gb

Postby Josef Templ » Wed Jun 07, 2017 3:19 am

As with Files there is an additional module HostFiles64 that provides the low-level implementation of Files64.
That's why there is a module Files64 in System and in Host.
Stores64 does not need such a split (same as for Stores).

The module interface has been added to the Files64 docu.

The complete diff is here: https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=0d207327580e08d9cc188bba78f15ecc6ba8781e&rev_to=ffb1db5dbfb4c119713f576b0dc5a8729f9239c9.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Previous

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 1 guest

cron