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

Implement WebSocket streaming APIs #1

Open
timpalpant opened this issue Jun 30, 2017 · 8 comments · May be fixed by #32
Open

Implement WebSocket streaming APIs #1

timpalpant opened this issue Jun 30, 2017 · 8 comments · May be fixed by #32

Comments

@timpalpant
Copy link
Owner

Many of the API calls have streaming WebSocket analogs. Test whether they are usable with a Go WebSocket client and if so add APIs for using them.

@AustinMCrane
Copy link
Contributor

@timpalpant is there anything in the works for this?

@AustinMCrane
Copy link
Contributor

If there were some acceptance criteria for this and a plan of attack i would like to help in the near future since my next project will rely on this feature either implemented in this library or external in my application.

@timpalpant
Copy link
Owner Author

I briefly explored this a while back, but ran into some issues trying to connect with gorilla/websocket. (Unfortunately I don't remember what they were, but improved websocket compatibility has been on IEX's roadmap for a while now.)

I don't believe anyone is currently working on this, and would be happy to integrate any work you do. If you have any questions or would like to propose the interface for the new functionality, I'm happy to take a look.

@AustinMCrane
Copy link
Contributor

I am going to make an attempt at this... that being said I did try to make a solution for this outside of this project and I kept getting malformed responses and things never seemed to work right. I will give it the good ole college try

Sent with GitHawk

@AustinMCrane
Copy link
Contributor

doing some initial research, the socket.io websocket protocol is pretty complicated to recreate a real "websocket" connection sense it does some initial handshaking that i do not quite understand. here is the actual spec: https://github.com/socketio/socket.io-protocol. i have been playing around with the socketio long polling methods and it seems to work well. I have also done some quick pro cons on long polling and it seems like long polling is used a lot in place of websockets when the data is one directional (server to clients). I was thinking i might build on the long polling methods and implement it that way, what are your thoughts on that @timpalpant ?

@timpalpant
Copy link
Owner Author

Sorry @AustinMCrane I missed this. I am unfortunately pretty ignorant about websockets. I have used long polling with other read-only data feeds, so that makes sense to me if it seems to work and you think it's the best way to go.

@AustinMCrane
Copy link
Contributor

@timpalpant I think it could be but I have to figure out how the handshake with socket.io works and then make it so it falls back to long polling correctly. It seems like socket.io does some magic on the handshake process to see if a client supports WebSockets vs long polling.

Sent with GitHawk

@AustinMCrane
Copy link
Contributor

@timpalpant I know that Iex is planning on releasing a new version with support for better web sockets. Do you have any “ins” with them to see if we could upgrade this client to work with the new version before it’s released?

@husafan husafan linked a pull request Nov 2, 2019 that will close this issue
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