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

Ember Client WebSocket support #5227

Open
RaasAhsan opened this issue Sep 19, 2021 · 9 comments · May be fixed by #7261
Open

Ember Client WebSocket support #5227

RaasAhsan opened this issue Sep 19, 2021 · 9 comments · May be fixed by #7261
Assignees
Labels
enhancement Feature requests and improvements module:ember-client

Comments

@RaasAhsan
Copy link

Now that we have ember-server WebSocket support, it shouldn't be much of a lift on the backend to build client support for it. I anticipate a bit of work around user API

@RaasAhsan RaasAhsan added enhancement Feature requests and improvements module:ember-client labels Sep 19, 2021
@armanbilge
Copy link
Member

armanbilge commented Sep 19, 2021

Besides ember-client I'd be thrilled to create e.g. a dom-websocket module implementing this as well, behind a common/shared abstraction.

https://developer.mozilla.org/en-US/docs/Web/API/WebSocket

@amesgen
Copy link
Member

amesgen commented Oct 1, 2021

http4s-jdk-http-client has a WebSocket client. See WSClient.scala for the traits. We have our own WSFrame ADT there, as well es a "low level" and a "high level" interface due to differences in whether pings are automatically responded to, but these were mainly ideas/explorations.

I would be very glad to see an interface in http4s, and will happily port http4s-jdk-http-client to it!

@armanbilge
Copy link
Member

Yes, I've taken a look at it on a couple occasions, I'd love to see that (or a similar) interface in http4s proper! I'm looking at the reference for browser web sockets and it looks like it can be used to implement your high level interface.

I'm no expert on these things, but maybe if the high-level interface is more straight forward we can start by porting that to http4s-client?

@RaasAhsan
Copy link
Author

Sounds like a plan ! @amesgen whenever you have some time, could you open a branch in the http4s repo with the relevant interfaces based off series/0.22 (or whatever makes sense) ? That gives us a place to talk feasibility and design, but also get started on the ember implementation to use as another reference.

Some items I anticipate discussion around:

  • Client/WsClient decoupling
  • Parity with existing WS server machinery

@amesgen
Copy link
Member

amesgen commented Oct 11, 2021

I think that a unified WebSocket interface in http4s would be huge, but it requires a lot of careful thought, and the traits from jdk-http-client should indeed only serve as a starting point. I will try to create an initial PR in the next weeks, but if anyone has more time to work on this, feel free to pick this up!

@pvgoran
Copy link

pvgoran commented Aug 6, 2022

As far as I see this is not completed. However, on the table in https://http4s.org/v0.23/docs/integrations.html "Ember" is said to have "Websocket Client". Is this an error in the documentation?

@armanbilge
Copy link
Member

@pvgoran woops, thanks for catching that, it is a mistake. A PR fixing would be much appreciated.

@armanbilge
Copy link
Member

This is proposed as a Google Summer of Code Project! https://typelevel.org/blog/2023/02/23/gsoc.html

@danghieutrung
Copy link
Contributor

Hi everyone! I will be working on this for my gsoc project this summer.

@armanbilge armanbilge linked a pull request Oct 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements module:ember-client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants