Created a mongo persistence library

Hi
I’d like to start by thanking you for the awesome project! It works like a charm.

I’ve a project where I had to persist the editor updates in mongodb, to keep the changes on cloud and since there’s no module for mongo, I started a project by forking y-leveldb, it’s still under progress, however, it’d be great if the mdoule can be moved to yjs packages.

Thank you!

3 Likes

Hey @fadiquader, thanks for sharing!

Do you think it would be possible to listen to mongodb change events so that multiple server instances can access the same document?

This would be a great addition to the Yjs ecosystem. If you like you can transfer the repository to the yjs org. Would you like to maintain the mongodb module in the future? This would be a great help to me.

Not sure if it’s possible for multiple servers to listen to the same change events at the same time. What we could do is use a distributed event emitter like redis to achieve that. However I’ll do more research to figure out the simplest way to implement that.
I’d be happy to move it to yjs packages and maintain in the future!

Thanks!

I think this is what ShareDB is doing. They can have multiple servers listening to update events to distribute these changes. This is how ShareDB scales.

Awesome :+1:

Hello,I am using y-mongodb to develop a project,but I ran into a problem,the value field of my y-transitions collections is more than 16mb,so it can’t be written,I am using cloud provider mongodb,I can’t modify the maximum limit configuration,how can I handle it?

Hi @ChasLui, I think you should ask this question again in their repository.