Giter VIP home page Giter VIP logo

Comments (13)

AlbertoElias avatar AlbertoElias commented on June 1, 2024 1

the js-ipfs site has an enable service worker function, so they are definitely pushing it.

But apart from that, making IPFS and OrbitDB run on a Web Worker will be extremely helpful for performance. OrbitDB is the blocker on this, and just by moving from localStorage to IndexedDB on the keychain should be enough to support this. Service Worker is just one kind of Worker

from field-manual.

aphelionz avatar aphelionz commented on June 1, 2024 1

OrbitDB in a separate thread in a web worker is very compelling. You;d have to use messages heavily for computation but its certainly possible!

from field-manual.

willemneal avatar willemneal commented on June 1, 2024 1

I'm currently working with AssemblyScript to use WebAssembly and atomic memories to have faster web worker communication.

I'lve also been working on OrbitFS, which uses a mutable filesystem from IPFS and then commits root hashes to orbitdb. So in that system you'd only need to use orbitdb with bigger updates.

from field-manual.

AlbertoElias avatar AlbertoElias commented on June 1, 2024

+1 to this. Apart from service worker, it's great to run IPFS in workers, and it'd be great to run OrbitDB in a worker as well

from field-manual.

hazae41 avatar hazae41 commented on June 1, 2024

For now, Service Workers are not like this.
They always stop and start, you can't rely on them for doing long tasks.

I recommend you to read the following (about ServiceWorkers lifecycle)
https://developers.google.com/web/fundamentals/primers/service-workers/

I already tried putting an IPFS node on a service worker, it was very difficult and the result was a slowwwwww IPFS node always restarting, and rarely available to respond to requests or listen for PubSub messages.

Because they're not made for such kind of tasks.

You should rather open a popup window that runs an IPFS/OrbitDB node and tell the user to keep it open.

from field-manual.

AlbertoElias avatar AlbertoElias commented on June 1, 2024

Yup! And there are many use cases for batching DB calls

from field-manual.

aphelionz avatar aphelionz commented on June 1, 2024

@willemneal do you want to show this at the next community call on March 5?

from field-manual.

willemneal avatar willemneal commented on June 1, 2024

@aphelionz I would like to, but it's not quite ready for demoing. But perhaps the next one. When is it?

from field-manual.

aphelionz avatar aphelionz commented on June 1, 2024

They're every two weeks on Tuesday morning EST. Info is posted as issues in this repo. For example: orbitdb-archive/welcome#51

from field-manual.

willemneal avatar willemneal commented on June 1, 2024

Okay thanks! I'll aim for the next one!

from field-manual.

Schwartz10 avatar Schwartz10 commented on June 1, 2024

Hey, I'm using orbitDB inside an iframe with some strict sandbox security requirements aragon/client#702

If we ran orbit in a service worker, do people think this would solve the above issue as well? If not, do people see any alternatives to getting orbit to work in an iframe besides loosening sandbox restrictions? Thanks for any help!

from field-manual.

AlbertoElias avatar AlbertoElias commented on June 1, 2024

I'm running orbitDB in an iframe, but the storage is taken care of from the domain itself, not from the page that loads the iframe, so it stores it in the specific indexeddb instance for that domain.

Do you want all your aragon apps which are in different iframe to access the indexeddb storage of the domain that loads those iframes? Maybe you can set up some kind of post message communication for that, but using workers won't be an option as they're domain specific as well I believe

from field-manual.

aphelionz avatar aphelionz commented on June 1, 2024

Moving to the Field Manual so we can document Web Worker usage

from field-manual.

Related Issues (20)

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.