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

Mapstore refactoring #60

Merged
merged 8 commits into from
Jan 29, 2017
Merged

Mapstore refactoring #60

merged 8 commits into from
Jan 29, 2017

Conversation

sunye
Copy link
Contributor

@sunye sunye commented Jan 25, 2017

Now, MapDB and BerkeleyDB have a common code for Stores.

Gerson Sunyé added 5 commits January 17, 2017 21:48
Pulled up common methods from MapDB and BekerleyDB stores.
Now all contents are copied before being added to a persistent
resource, reducing drastically the execution time and avoiding a tricky
bug.

Changed default time unit to Milliseconds.
Now, MapDB and BerkeleyDB have a common code for Stores.
@gdaniel
Copy link
Contributor

gdaniel commented Jan 25, 2017

Can you pull the current version of master and integrate the changes I have made in DirectWrite[XX]Store? These changes are related to #54 #55, and #56 (mostly toArray and eObject methods).

@gdaniel
Copy link
Contributor

gdaniel commented Jan 28, 2017

@sunye nice work, I only have one concern on Store names: you simplified Store names in map-core module, which may be a good idea, but this naming convention is not followed in the sub-modules. For example DirectWriteMapDBStore extends MapStore, which may be confusing, especially because MapStore extends AbstractDirectWriteStore.

I would suggest to follow the existing convention and rename core-level stores DirectWriteMapStore, DirectWriteMapListsStore ...

@yvernageau what do you think?

Renaming all the existing DirectWrite stores (not only in Map) could be interesting, especially because all low-level stores use a direct write approach, but I think this can be done later on master.

@yvrng
Copy link
Contributor

yvrng commented Jan 28, 2017

Indeed, great work!

I'm pretty agree with the naming problem, and I'm agree with its solution too.
Because the DirectWrite stores are the real implementation of a PersistentStore, and that without them, there is no link between a resource and a backend, I think that the ideal would be to simplify the DirectWrite feature at the core level. But, the confusion would then be present there, because all stores don't extends the DirectWrite feature, they simply decorate them.
So I suggest adding the notion of DirectWrite in the class names, until we find a better idea.

However, I'm agree by the simplification of the name of PersistenceBackends.

@sunye
Copy link
Contributor Author

sunye commented Jan 28, 2017

MapDBDirectStore and BerkeleyDBDirectStore are now empty classes and should be deleted.

I didn't keep the prefix "DirectWrite" because as long as I understand, all stores directly write things. Moreover AbstractPersistentStore is an empty class and has only 1 concrete subclass, AbstractDirectWriteStore.

I propose to remove all the "DirectWrite" prefixes and only use it if we indeed have stores with a different behavior.

@gdaniel
Copy link
Contributor

gdaniel commented Jan 29, 2017

@sunye There is a Read-only store in the HBase module. For now it extends DirectWriteHBaseStore, which is an issue, but I am not sure removing the prefix of other stores is interesting.

Anyway for now we need to be consistent. I propose to keep the DirectWrite prefix, merge the pull request with the updated names, and then decide what we should do about store names for all the backends (the PR here only concerns Map-based implementations).

@gdaniel gdaniel merged commit 3d0644d into master Jan 29, 2017
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.

3 participants