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

backfill experiments #3358

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hona
Copy link

@Hona Hona commented Aug 7, 2024

This would close #1435

To enable back-filling events into Marten, I'm having a play with some APIs to enable that, its very experimental, but open to feedback

example consumption:

session
    .Events.StartStream(player3, playerRegistered3)
    .WithBackfill(
        created: DateTimeOffset.FromUnixTimeSeconds(576329),
        timestamp: DateTimeOffset.FromUnixTimeSeconds(576329)
    );

I don't like the below syntax, it would be much nicer to also use .WithBackfill - however the StreamAction seems not 1->1 with events.

session.Events.Append(map1, DateTimeOffset.FromUnixTimeSeconds(646329), record4);
session.Events.Append(map1, DateTimeOffset.FromUnixTimeSeconds(656329), record5);

image
image

@jeremydmiller
Copy link
Member

@Hona Hey man, can you fix up the white space issues on this? I don't even know what it is you were trying to do here

@Hona
Copy link
Author

Hona commented Aug 12, 2024

Heya, sure @jeremydmiller I can clean up the PR for you.

The main thing I wanted to do a PoC for was setting custom date times (to convert standard data into an event stream historically)

e.g. of important code from the PR is https://github.com/JasperFx/marten/pull/3358/files#diff-28a99daf7298c7f4f19399310e0b9fbbb0ce7596493d50038109fc2cda5b845cR115-R385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mechanism to Import Events
2 participants