C++ Logo

SG15

Advanced search

Subject: Extending p1184 for direct transfer of BMIs
From: Lyberta (lyberta_at_[hidden])
Date: 2019-08-11 10:36:00


Another extension I would like to propose is to use module mapper to
transfer BMIs directly without needing file system.

In p1184 4.2 change the syntax to something like this:

Query from compiler to build system:

IMPORT $module

Reply from build system:

OK PATH $bmipath

Then compiler uses file system as usual.

Or:

OK BLOB $bmicontents

Then build system transfers raw bytes of BMI straight into compiler. The
format of $bmicontents could be something simple like unsigned 64 bit
integer holding the size (assuming BMIs larger than 4 GiB) followed by
raw bytes.

Or:

ERROR $msg

Next, query from compiler to build system:

EXPORT $module

Reply from build system:

OK DEFAULT

Then compiler does its default behavior which can be set via command
line flags.

Or:

OK PATH $bmipath

Then compiler writes the BMI to the given file system path. The response
can be bikeshedded.

Or:

OK BLOB

Then compiler transfers BMI directly to the build system. The response
can be bikeshedded.

I think this design avoids file system races and can make distributed
builds faster because file system is usually slower than sockets and
keeping data in RAM.

Later we can expand this to a general purpose communication channel and
avoid file system altogether by transferring source files and object
files via sockets.




SG15 list run by sg15-owner@lists.isocpp.org

Older archives