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

Enhancement: more performant MemoryStore #830

Open
rkingsbury opened this issue Jul 26, 2023 · 4 comments · May be fixed by #846
Open

Enhancement: more performant MemoryStore #830

rkingsbury opened this issue Jul 26, 2023 · 4 comments · May be fixed by #846
Assignees

Comments

@rkingsbury
Copy link
Collaborator

rkingsbury commented Jul 26, 2023

The performance of MemoryStore, which is currently powered by mongomock, is relatively slow. This can particularly cause noticeable delays when connecting to a FileStore, which uses MemoryStore internally. It would be great to find an alternative to mongomock that is more performant.

I have begun working on this and will keep this issue updated with my findings.

Possible Alternatives

Notes so far

montydb

See davidlatwe/montydb#14

mongita

mongita does not support many query operations including $regex or $exists. It also doesn't support bulk_write or estimated_document_count although those can be worked around.

pymongo-inmemory

Not tested yet, but looks quite promising because it actually uses mongo (as opposed to mocking it)
See #846

@rkingsbury rkingsbury self-assigned this Jul 26, 2023
@rkingsbury
Copy link
Collaborator Author

Flagging @arosen93 in case this intersects with thoughts in #828

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Jul 26, 2023

Thanks! Makes sense!!

I'm curious how one uses the file based stores in production though if multiple processes accessing the DB at the same time will cause issues (as is the case for MontyDB and Mongita). I guess these solutions really are just meant for the single-job, serial use case?

@rkingsbury
Copy link
Collaborator Author

Thanks! Makes sense!!

I'm curious how one uses the file based stores in production though if multiple processes accessing the DB at the same time will cause issues (as is the case for MontyDB and Mongita). I guess these solutions really are just meant for the single-job, serial use case?

TBH I don't think anyone has used the file-based Store enough to have encountered this problem yet!

@Andrew-S-Rosen
Copy link
Member

Also my assumption 😄 To uncharted territory we go!

@rkingsbury rkingsbury linked a pull request Aug 25, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants