Git Product home page Git Product logo

Comments (4)

haadcode avatar haadcode commented on July 18, 2024

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.

haadcode avatar haadcode commented on July 18, 2024

Did some clean up today, line numbers may not match anymore.

from orbit-db-store.

haadcode avatar haadcode commented on July 18, 2024

This was implemented in 9029c0f and merged to master. Will appear in the next release.

from orbit-db-store.

fazo96 avatar fazo96 commented on July 18, 2024

Wow thanks, looking forward to it! 👍

from orbit-db-store.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.