Comments (4)
Hi @fazo96! So happy to hear that OrbitDB is working for you!
Your idea to make updateIndex
calls async sounds good! I don't see why we couldn't implement it as you propose.
Perhaps in addition to changing it internally in Store, we should also add async
to the base class in https://github.com/orbitdb/orbit-db-store/blob/master/src/Index.js#L50 to make the intention of the public API clear.
Note also that updateIndex()
gets called in multiple places inside Store: https://github.com/orbitdb/orbit-db-store/blob/master/src/Store.js#L416, https://github.com/orbitdb/orbit-db-store/blob/master/src/Store.js#L399, https://github.com/orbitdb/orbit-db-store/blob/master/src/Store.js#L202. It might make sense to create an internal async _updateIndex()
function that calls the index as it does now and then on those ^ lines call this._updateIndex()
function. This would make it a tad cleaner and easier to find what does what. What do you think?
Would be happy to review the PR and merge it in! If you do, make sure to run the tests in OrbitDB with the PR (npm link orbit-db-store && npm test
) to make sure nothing breaks.
from orbit-db-store.
Did some clean up today, line numbers may not match anymore.
from orbit-db-store.
This was implemented in 9029c0f and merged to master. Will appear in the next release.
from orbit-db-store.
Wow thanks, looking forward to it!
from orbit-db-store.
Related Issues (18)
- Filter heads by invocation of "access.canAppend" during a loading HOT 3
- Remove TODOs
- Best Practices for Restoring a Store + Pinning Store Data HOT 1
- .npmignore HOT 6
- Idiomatic Way to Get Log Entry from Hash HOT 1
- Application throws error if it's closed during heavy replication HOT 5
- 'replicate.progress' event is not always sent HOT 3
- This function doesn't match the API HOT 1
- Refactoring HOT 3
- Left-over from ipfs-log refactoring HOT 1
- source.js:17 Uncaught Error: already resolved HOT 1
- Describe indices and how they work HOT 1
- Add setIdentity method
- Handling of non-existent ipfs entries when loading a store
- Can't resolve p-map HOT 2
- Improperly comparing CIDs
- Timeout not passed to Log.fromEntryHash casues stuck replication on missing heads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbit-db-store.