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

mongodriver follow up: analyze the need and usage of a BSON streaming API #3774

Open
fgalan opened this issue Feb 16, 2021 · 1 comment
Open

Comments

@fgalan
Copy link
Member

fgalan commented Feb 16, 2021

During the work on issue #3132 (PR #3622) the new mongoDriver/ internal API removed the BSON streaming mode and all the existing usages were moved to classical append style.

This issue is about analyzing if re-introducing a BSON streaming API in mongoDriver/ would be a good idea, taking into account the following factors:

  1. Feasibility. Would it be possible? How to "link" with the streaming API in the underlying driver (mongo C driver)?
  2. Performance. When streaming API should be used and when append style should be used? This post can be a starting point for the analysis https://stackoverflow.com/questions/55385691/mongoc-driver-bson-construction-stream-based-vs-string-parsing-based-which, but more tests have to be done (note the analysis done in the post is based on a driver, the C++ one, that at the end is not the one used by Orion)
  3. Legilibility improvements. Would we get legibility in code compared with the append style (in mongoQueryTypes.cpp for instance probably there would be a good gain)
  4. Cost. How costly would be to change the parts now using append style to use the streaming mode?
@fgalan
Copy link
Member Author

fgalan commented Feb 16, 2021

Look in the code base for FIXME #3774 to find places that potentially would benefit from the usage of BSON streaming mode. It is not an exhaustive analysis, but a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant