urnathan / libcody

Compiler/BuildSystem Interface Library
Apache License 2.0
24 stars 6 forks source link

Clarify whether interleaving requests/responses in a block is allowed #20

Closed boris-kolpackov closed 4 years ago

boris-kolpackov commented 4 years ago

Reading the protocol description, it's not clear whether the builder is allowed to start sending responses to requests in a block before reading the entire block. In other words, can a dumb builder process one request at a time (making sure to duplicate any ; in the response)?

This line from the description suggests that the answer is probably a "no", but I think stating this explicitly would be a good idea:

The compiler sends a block of one or more requests to the builder, then waits for a block of responses to all of those requests.

If the answer is indeed a "no", then that's unfortunate since that makes writing prototype mappers (e.g., as a shell script) a lot harder. Perhaps there could be a way to disable batching (e.g., as part of the handshake)?

urnathan commented 4 years ago

On 11/5/20 12:58 AM, Boris Kolpackov wrote:

Reading the protocol description, it's not clear whether the builder is allowed to start sending responses to requests in a block before reading the entire block. In other words, can a dumb builder process one request at a time (making sure to duplicate any |;| in the response)?

This line from the description suggests that the answer is probably a "no", but I think stating this explicitly would be a good idea:

The compiler sends a block of one or more requests to the builder,
then waits for a block of responses to all of those requests.

If the answer is indeed a "no", then that's unfortunate since that makes writing prototype mappers (e.g., as a shell script) a lot harder.

the answer is no.

Perhaps there could be a way to disable batching (e.g., as part of the handshake)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/urnathan/libcody/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADD67GKRPEL5FWSKZVGWHSLSOI5HFANCNFSM4TK5Q3DQ.

-- Nathan Sidwell