Totodore / socketioxide

A socket.io server implementation in Rust that integrates with the Tower ecosystem and the Tokio stack.
https://docs.rs/socketioxide
MIT License
1.2k stars 50 forks source link

Add MongoDB Adapter Support #361

Open ahmtydn opened 3 weeks ago

ahmtydn commented 3 weeks ago

Hi,

First of all, thank you for your great work on the Rust implementation of Socket.IO. It's been very helpful for the community.

I am currently migrating a project from Node.js to Rust and using your library as a replacement for the Socket.IO server. However, I noticed that there is no support for a MongoDB adapter in the Rust version, which is something I heavily rely on in the Node.js implementation.

The MongoDB adapter allows for horizontal scaling by using MongoDB to manage and synchronize events across multiple Socket.IO servers. This feature is essential for distributed systems where multiple instances of the Socket.IO server need to communicate reliably.

Would it be possible to consider adding MongoDB adapter support to this library? This would greatly help developers who are looking to leverage the benefits of Rust while still needing the scalability provided by MongoDB.

Thank you for considering this request. I'm more than happy to provide additional details if needed.

Best regards.

Totodore commented 3 weeks ago

Hi thanks for your issue,

Sadly socketioxide needs to support async adapters (#5) in order to add other remote adapters (redis, mongo, etc). It is on my to-do list but it requires a lot of changes on the codebase and I'm not sure yet what is the best way to implement it. Mongo will be my priority with redis once async adapters are supported though.