Boundaries emitted for every commit?

I’m looking at Boundary events in dazl and am wondering if they are emitted after every commit?

The reason I am asking: when using dazl I want to build a secondary representation of the ledger (e.g., in memory) and want to know what set of events to apply transactionally so that it will have a consistent state.

Your understanding is correct; boundaries essentially correspond to transactional boundaries.

The long-term intent is for this API to more closely the TypeScript/HTTP JSON APIs, where periodic {offset:…} messages are emitted over the stream. In that context, there is no guarantee that you will receive an offset for every transaction, but you are guaranteed that every offset occurs at a transactional boundary.

I see, in the HTTP API (or the long-term intent for Dazl), will there be a way to still receive a boundary for every commit so that off-ledger representations can be both (a) consistent and (b) as real-time as possible?

It is not necessary to receive all boundaries to satisfy these properties. The JSON API delivers fewer boundaries, based both on the ledger API ACS and server throughput, so that transactions can be combined and you can catch up to the ACS faster; delivering all boundaries would, in practice, be a huge detriment to this desirable feature.