Skip to content

Create an ISyncable implementation which writes to json files #45

@hahn-kev

Description

@hahn-kev

Current interface:

public interface ISyncable
{
Task AddRangeFromSync(IEnumerable<Commit> commits);
Task<SyncState> GetSyncState();
Task<ChangesResult<Commit>> GetChanges(SyncState otherHeads);
Task<SyncResults> SyncWith(ISyncable remoteModel);
Task SyncMany(ISyncable[] remotes);
ValueTask<bool> ShouldSync();
}

The idea here is that we want to be able to write changes out to json files, one file per ClientId, these files could then be synced using traditional sync systems, like Dropbox, Git, Hg, etc. This works without conflict because each client only authors changes to it's own file, no one else changes that file so there's no conflicts. This will act as a bridge for existing systems. It will also serve as a way to sync to a flashdrive.

Because there will be many files I suggest reading/writing each file in parallel when possible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions