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

AEP: Abstract and improve the node file repository #7

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Oct 18, 2019

  • Used AEP template from AEP 0
  • Status is submitted
  • Added type & status labels to PR
  • Added AEP to README.md
  • Provided github handles for authors

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @sphuber !
Below a few comments and suggestions.

001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
001_file_repository_improvement/readme.md Outdated Show resolved Hide resolved
@sphuber
Copy link
Contributor Author

sphuber commented Oct 19, 2019

Below a few comments and suggestions.

@ltalirz what is the typical procedure for an AEP PR? If I want to apply the changes I just make a new commit and push? Do we want to keep the commit history here? What is the typical approach?

@ltalirz
Copy link
Member

ltalirz commented Oct 19, 2019

@ltalirz what is the typical procedure for an AEP PR? If I want to apply the changes I just make a new commit and push?

Yes, that's the idea.

Do we want to keep the commit history here? What is the typical approach?

I'd say let's keep the commit history at least in the PR.
When merging, we can decide to squash it depending on the (e.g. have a look a the commit history over at the jupyter folks).

Feel free to add me as a "champion" - then we should ask for reviews from all relevant parties, if you think you can even mention the @aiidateam/plugin-developers

For reference, here is how jupyter propose to handle this review period

@greschd
Copy link
Member

greschd commented Oct 23, 2019

I think this would be a good opportunity to also get rid of empty repository folders: The NodeRepositoryManager could be lazy in that it only creates a {folder, remote resource} when something is actually put in there.

The motivation for this is that FS performance (things like ls, du, find etc.) is impacted greatly by the number of folders in the repository, even if only ~1% of nodes actually contain data.

@chrisjsewell
Copy link
Member

@sphuber, as discussed, perhaps this should be marked as rejected (at least for the exact spec you outlined here) and then merged/closed (?), and maybe you could add a note of why this was the case

@sphuber sphuber added the type/standard Standard Track AEP label Dec 16, 2021
@sphuber sphuber changed the title Abstract and improve the node repository AEP: Abstract and improve the node file repository Dec 16, 2021
@sphuber
Copy link
Contributor Author

sphuber commented Dec 16, 2021

@ltalirz @chrisjsewell @giovannipizzi I have updated the AEP to reflect the current implementation in aiida-core. I essentially rewrote the whole text, so all old comments no longer apply.

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for taking the time to wrap this up @sphuber !

I haven't had the time to read through everything but since the implementation is already done I think it's great to have the thought process documented here.

Good to go from my side!

@chrisjsewell
Copy link
Member

just having a read...

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nitpicks


## Proposed Enhancement
The scaling problem of the original file repository implementation has already been described in great detail in [AEP 006: Efficient object store for the AiiDA repository](https://github.com/aiidateam/AEP/tree/master/006_efficient_object_store_for_repository#readme).
It also describes an effecient key-value store that is implemented in the [`disk-objectstore`](https://github.com/aiidateam/disk-objectstore) library.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It also describes an effecient key-value store that is implemented in the [`disk-objectstore`](https://github.com/aiidateam/disk-objectstore) library.
It also describes an efficient key-value store that is implemented in the [`disk-objectstore`](https://github.com/aiidateam/disk-objectstore) library.

:raise OSError: if the file could not be deleted.
"""
```
Since it is envisioned that solutions will be implemented that are not necessarily file system based, it is important that the interface does not implicitcly bake-in file-system-only concepts.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Since it is envisioned that solutions will be implemented that are not necessarily file system based, it is important that the interface does not implicitcly bake-in file-system-only concepts.
Since it is envisioned that solutions will be implemented that are not necessarily file system based, it is important that the interface does not implicitly bake-in file-system-only concepts.


## Detailed Explanation

### Abstracting the file repository interface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be great here to have a basic before & after UML of this, similar (but not necessarily as detailed) to what I have done in aiidateam/aiida-core#5172 (comment),
so people not already intimately knowledgable with AiiDA can get a quick idea of whats going on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this image I made for the documentation fulfill that need?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep perfect 👍 Perhaps if you also had a "before" one as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have a before, and there is not much to describe really. The code was more or less directly hard coded in the Node class.

@sphuber sphuber force-pushed the aep_repository branch 4 times, most recently from 570c899 to fe4801c Compare December 16, 2021 18:29
README.md Outdated
| 004 | implemented | [Infrastructure for importing completed `CalcJob`s](004_calcjob_importer/readme.md) |
| 005 | draft | [New Export Format](005_exportformat/readme.md) |
| 006 | implemented | [Efficient object store for the AiiDA repository](006_efficient_object_store_for_repository/readme.md) |
| 007 | implemented | [Abstract and improve the file repository](007_improved_file_repository/) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 007 | implemented | [Abstract and improve the file repository](007_improved_file_repository/) |
| 007 | implemented | [Abstract and improve the file repository](007_improved_file_repository/readme.md) |

you reverted my fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically not a revert, since it is a new row. But I see the problem, just accidentally forgot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, guvnor

@sphuber sphuber merged commit f178459 into aiidateam:master Dec 16, 2021
@sphuber sphuber deleted the aep_repository branch December 16, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants