Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Generic Storage Layer For Jobs? (MongoDB) #54

Open
LuisOsta opened this issue Sep 14, 2023 · 5 comments
Open

Support Generic Storage Layer For Jobs? (MongoDB) #54

LuisOsta opened this issue Sep 14, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@LuisOsta
Copy link

LuisOsta commented Sep 14, 2023

We currently use MongoDB as a primary database for one of our services that aim to use this library. And we were hoping to be able to use MongoDB as the storage for jobs (the way y'all currently support Postgres and NATs).

I had two requests/ideas:

  • What would be the work involved in getting native MongoDB support?
  • Would it be possible to support a generic storage trait that could be implemented by the end user so that they could use whatever storage layer they wanted?

If possible/needed I'd be happy to help contribute to getting either/both of those done

@mvniekerk
Copy link
Owner

Hi Luis
The async MongoDB seems quite fine to do this with.
https://docs.rs/mongodb/latest/mongodb/
There are generic traits - one for in-memory, Nats and Postgres. If you need any assistance let me know.

@LuisOsta
Copy link
Author

@mvniekerk My main question would be about how to integrate the mongodb client with the rest of the library the way we have for Nats, Postgres, etc. Any guidance on that?

@LuisOsta
Copy link
Author

LuisOsta commented Sep 15, 2023

@mvniekerk For instance I have tried to create a custom implementation of the Metadata and Notification Store but there's a lot of things (like DataStore) that aren't externally accessible and so a custom implementation outside of the crate can't be done. The postgres and nats implementation have special access due to being internal to the crate

@LuisOsta
Copy link
Author

Also does this library support having multiple services try to interact with the same job queue? (So that you don't have multiple services handling the same job)?

@mvniekerk
Copy link
Owner

Hi @LuisOsta
It has been a while for this report. Have you come right?

@mvniekerk mvniekerk added the enhancement New feature or request label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants