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

Consider building a fork of bassoon based on web sockets #5

Open
paulsmithkc opened this issue Mar 31, 2022 · 0 comments
Open

Consider building a fork of bassoon based on web sockets #5

paulsmithkc opened this issue Mar 31, 2022 · 0 comments

Comments

@paulsmithkc
Copy link
Owner

paulsmithkc commented Mar 31, 2022

Currently, the library is wrapping the aging XHR API, as the Fetch API hadn't fully supported streaming at the time.

One downside of using the XHR API, is that xhr.responseText grows continuously over the lifetime of the request. This was fine for my original use case, which involved streaming search results from a long running database query, as it was limited to a maximum number of results.

However, for cases where you want to keep the stream open long-term, web sockets would be more appropriate and simpler. So there it least some value in implementing a version based on web sockets. And perhaps this would also work for my original use too?

This implementation would be different enough, that it would likely be better as a distinct library. And it would also require code on the server to setup the web sockets.

Related
jimhigson/oboe.js#241
grpc-ecosystem/grpc-gateway#1783
https://stackoverflow.com/questions/21951175/comet-xmlhttprequest-responsetext-grows-endlessly

@paulsmithkc paulsmithkc changed the title Consider building a fork based on web sockets Consider building a fork of bassoon based on web sockets Mar 31, 2022
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

1 participant