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

Proposal: streaming API for big UASTs #218

Open
4 tasks
bzz opened this issue Nov 23, 2018 · 1 comment
Open
4 tasks

Proposal: streaming API for big UASTs #218

bzz opened this issue Nov 23, 2018 · 1 comment

Comments

@bzz
Copy link
Contributor

bzz commented Nov 23, 2018

Right now, after #216 both bbfshd and driver gRCP servers have a hard-coded limit of 100MiB for the UAST.

This works, but is not a generic solution - UAST size is O(1) O(n log n) of the file size n but the constant can be big.

A generic solution proposed though initial discussion and enabled by v2 wire serialization format is: add a new API call that would chunk and stream the response to the client.

TODOs:

  • verify initial idea with clients (gitbase, ML, Lookout)
  • propose API draft/signature
  • implement in bblfshd<=>driver
  • expose in bblfshd/clinet-*
@creachadair
Copy link
Contributor

As a side note, it's worse than O(1) in the file size—it's more like O(n log n) in the file size n, where the log base constant falls out of the grammar size (upper bounded by the branching factor, but probably not that bad on average). The bound isn't tight, since some files have flat parses, but it's definitely not in O(1).

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

No branches or pull requests

2 participants