Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relayminer] Add ReplayObservable#SubscribeFromBufferEndOffset() method #553

Closed
2 of 6 tasks
bryanchriswhite opened this issue May 27, 2024 · 0 comments · Fixed by #647 or #648
Closed
2 of 6 tasks

[Relayminer] Add ReplayObservable#SubscribeFromBufferEndOffset() method #553

bryanchriswhite opened this issue May 27, 2024 · 0 comments · Fixed by #647 or #648
Assignees
Labels
off-chain Off-chain business logic relayminer Changes related to the Relayminer

Comments

@bryanchriswhite
Copy link
Contributor

bryanchriswhite commented May 27, 2024

Objective

Explicitly support choosing how much of the replay buffer should be emitted when subscribing to the replay observable.

Origin Document

While working on #517:

image

See: #546 (comment).

	// SubscribeFromBufferEndOffset returns an observer which is initially notified of
	// values in the replay buffer, starting from the replay buffer index which is
	// equal to replayBufferSize - offset. After this range of the replay buffer is
	// notified, the observer continues to be notified, in real-time, when the publishCh
	// channel receives a value. It also returns the current replayBufferSize.
	// If offset is greater than replayBufferSize or the number of elements it
	// currently contains, the observer is notified of all elements in the replayBuffer,
	// starting from the beginning. Passing 0 for offset is equivalent to calling
	// Subscribe() on a non-replay observable.
	SubscribeFromBufferEndOffset(ctx context.Context, offset int) (_ Observer[V], replayBufferSize int)

Goals

  • Support more explicit behavior when consuming replay observables.

Deliverables

Non-goals / Non-deliverables

  • ...

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @bryanchriswhite
Co-Owners: @red-0ne

@bryanchriswhite bryanchriswhite added relayminer Changes related to the Relayminer off-chain Off-chain business logic labels May 27, 2024
@bryanchriswhite bryanchriswhite added this to the Shannon MainNet milestone May 27, 2024
@bryanchriswhite bryanchriswhite self-assigned this May 27, 2024
@bryanchriswhite bryanchriswhite moved this to 📋 Backlog in Shannon May 27, 2024
@bryanchriswhite bryanchriswhite changed the title [Relayminer] Add ReplayObservable#SubscribeWithBufferLimit() method [Relayminer] Add ReplayObservable#SubscribeFromBufferEndOffset() method May 27, 2024
@Olshansk Olshansk moved this from 📋 Backlog to 🔖 Ready in Shannon Jun 7, 2024
@bryanchriswhite bryanchriswhite moved this from 🔖 Ready to 🏗 In progress in Shannon Jul 2, 2024
@bryanchriswhite bryanchriswhite linked a pull request Jul 2, 2024 that will close this issue
14 tasks
@bryanchriswhite bryanchriswhite moved this from 🏗 In progress to 👀 In review in Shannon Jul 2, 2024
@bryanchriswhite bryanchriswhite moved this from 👀 In review to 🏗 In progress in Shannon Jul 2, 2024
@bryanchriswhite bryanchriswhite moved this from 🏗 In progress to 👀 In review in Shannon Jul 2, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Shannon Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
off-chain Off-chain business logic relayminer Changes related to the Relayminer
Projects
Status: ✅ Done
1 participant