orbitdb-archive / orbit-db-store

Base class for orbit-db data stores
MIT License
40 stars 22 forks source link

Raise db scope events to orbitdb instance scope event emitter #92

Closed phillmac closed 4 years ago

phillmac commented 4 years ago

Adds a custom event emitter class to raise any events emitted by the db to the instance scope. This enables listening to all db event types before the specific store has been opened / created. Backwards compatibility is maintained by emitting db scope events as per before. Requires orbitdb/orbit-db/pull/713

aphelionz commented 4 years ago

I like this idea. What do you think about moving the event relay from here to the createStore function in orbit-db proper, and making it a configuration option there?

phillmac commented 4 years ago

@aphelionz e.g. https://github.com/orbitdb/orbit-db/blob/94a312e180030b215af52028cf4aa8844d76e077/src/OrbitDB.js#L208 ?

phillmac commented 4 years ago

Or do you mean the relay class itself, to make the class a configurable option?

aphelionz commented 4 years ago

Not quite sure yet and probably need to sleep on it... we had discussed a while back about utilizing more event passing in general, not just outward but internally between all the different components of the system.

aphelionz commented 4 years ago

Closing this based on conversation in Gitter, will be moving this functionality to orbit-db