# Boundaries emitted for every commit?

**URL:** <https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197>\
**Category:** App Development\
**Tags:** daml, dazl\
**Created:** [September 7, 2022, 10:33pm UTC](https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197 "2022-09-07T22:33:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ryan/32/4753_2.png) [@ryan](https://forum.canton.network/u/ryan)\
**Post date:** [September 7, 2022, 10:33pm UTC](https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197/1 "2022-09-07T22:33:54Z")

</div>

I’m looking at [Boundary events](https://digital-asset.github.io/dazl-client/dazl.ledger.html#dazl.ledger.Boundary) 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.

---

<div class="post-metadata">

**Author:** ![dtanabe](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/dtanabe/32/91_2.png) [@dtanabe](https://forum.canton.network/u/dtanabe)\
**Post date:** [September 8, 2022, 12:11am UTC](https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197/2 "2022-09-08T00:11:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ryan](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ryan/32/4753_2.png) [@ryan](https://forum.canton.network/u/ryan)\
**Post date:** [September 8, 2022, 9:10pm UTC](https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197/3 "2022-09-08T21:10:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [September 9, 2022, 7:17pm UTC](https://forum.canton.network/t/boundaries-emitted-for-every-commit/5197/4 "2022-09-09T19:17:35Z")

</div>

> [@ryan](#):
>
> 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.
