Refactoring
thiagodelgado111 opened this issue · 3 comments
TODO
- Move Cache to the store
- Throw errors if a required argument isn't passed to the store
- Remove
.id
property since it's the same as the address - Make the Store extend EventEmitter
- Clean up replication event handling
- Move snapshot related code to its own space
- Remove Index from Store
- Should we rename Index to IndexingStrategy?
- Should Cache be named like that since it feels it does more than just caching data?
Thank you for opening the issue @thiagodelgado111! 👍 For context, we've discussed this with @thiagodelgado111 in private as to what the plan is.
Add "store builder"
Can you elaborate on this? If I remember correctly, we discussed not adding this, but it may not be what you mean here.
Should Cache be named like that since it feels it does more than just caching data?
Let's keep Cache for now. While you're correct that it does "more" than just "caching" (that is, it persists a state on disk), from the database's perspective it's a cache (as in, we don't use it as a database per se).
All others LGTM and as discussed 👍
Thanks for checking it out! About the store builder, that must have sneaked into my notes somehow, removed it! (BTW, to be clear, this is the StoreBuilder https://gist.github.com/thiagodelgado111/9103a5d024d3c06b37be4b6f03baf8bc)
Hi @thiagodelgado111! With regards to the last two unchecked items - how are those going/ Might I be able to assist in any way?
- Remove Index from Store
- Should we rename Index to IndexingStrategy?