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

Facilitate the use of backup/restore for the business #20

Closed
pith opened this issue Apr 22, 2015 · 2 comments
Closed

Facilitate the use of backup/restore for the business #20

pith opened this issue Apr 22, 2015 · 2 comments

Comments

@pith
Copy link
Member

pith commented Apr 22, 2015

The backup/restore feature requires the implementation of an exporter and an importer. We should provide good defaults avoiding this overhead.

An idea could be to provide the following interface

public interface BackupableRepository<A extends Aggregate> {

    long count();

    // loadAll would not be a good idea for perf
    List<A> loadRange(Range range);

    void deleteAll();
}

Then by injecting the list of all the aggregate roots we could use the InternalRegistry to get all the BackupableRepository and iterate over them.

@pith pith added this to the 15.7 Ginkgo milestone Apr 22, 2015
@pith
Copy link
Member Author

pith commented Apr 22, 2015

Think to add Default implementation for this with qualifier based on the implementation.

By the way, this won't require the use of DTO as we don't want a representation of the domain, but the whole domain. Aggregates will be directly serialized in JSON or any format supported by the data-backup feature in Seed core.

@pith pith self-assigned this Jun 2, 2015
@pith pith removed this from the 2.0.0 Final milestone Jul 16, 2015
@adrienlauer adrienlauer removed the dx label Oct 22, 2015
@adrienlauer
Copy link
Member

This is now supported with new repositories (#96) and the default importers/exporters (#97). It still requires a DTO because it is desired to avoid coupling the domain to any external representation.

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

No branches or pull requests

2 participants