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

Batch processing #444

Open
woodpk opened this issue Jul 3, 2021 · 4 comments
Open

Batch processing #444

woodpk opened this issue Jul 3, 2021 · 4 comments

Comments

@woodpk
Copy link

woodpk commented Jul 3, 2021

Does Akkatecture provide for the ability to do batch data import processing? For example, if my application was importing a bulk export from another platform, instead of processing these as 'one command at a time' does Akkatecture allow for creating the domain event journal events in a faster batch process ?

@malclear
Copy link
Contributor

malclear commented Jul 3, 2021

I think the question you're asking is "is it possible to mutate multiple entities with a single command?". Yes, you can do that. There is nothing preventing you from raising several events based on the handling of a single command.
Akkatecture has an 'EmitAll' function that ties together a collection of events into a single publish/transaction.

@woodpk
Copy link
Author

woodpk commented Jul 3, 2021 via email

@malclear
Copy link
Contributor

malclear commented Jul 4, 2021

At the end of the day, you'll have to loop through your report handling each record one at a time. This can happen either outside the domain where each iteration creates one command sent into the domain, or inside the domain where the iterating occurs in a single command handler. Given the latter approach, your command would need to contain the entirety of your data. This may be impractical, given its size.
I would suggest a read and iteration through the records from client code, with each record producing its own command. I do something similar myself and it is extremely fast.

I am only an occasional contributor to this project. The author, Lutando, can be reached at times by way of the Discord channel: https://akkatecture.net/community.

@MarkusGeigerDev
Copy link

😞
#446

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

No branches or pull requests

3 participants