Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 03 21:20
    marko-asplund commented #41
  • Nov 03 21:13
    marko-asplund opened #42
  • Nov 03 21:07
    marko-asplund synchronize #41
  • Nov 03 16:54
    pomadchin starred Spinoco/fs2-http
  • Nov 03 16:33
    olegkovalenko starred Spinoco/fs2-http
  • Nov 01 21:42
    brandonmott starred Spinoco/fs2-http
  • Oct 24 16:44
    marko-asplund commented #40
  • Oct 24 16:40
    sorenbug commented #40
  • Oct 22 17:52
    marko-asplund opened #41
  • Oct 18 08:45

    pchlupacek on v0.4.0-M4

    (compare)

  • Oct 18 08:45

    pchlupacek on 0.4-spinoco-compat

    Setting version to 0.4.0-M4 Setting version to 0.4.0-SNAPSH… (compare)

  • Oct 18 08:43

    pchlupacek on 0.4-spinoco-compat

    fixed the setUseClientMode posi… (compare)

  • Oct 18 07:12

    pchlupacek on v0.4.0-M3

    (compare)

  • Oct 18 07:12

    pchlupacek on 0.4-spinoco-compat

    Setting version to 0.4.0-M3 Setting version to 0.4.0-SNAPSH… (compare)

  • Oct 18 06:03

    pchlupacek on 0.4-spinoco-compat

    Removed pgp dep from build file (compare)

  • Oct 18 05:43

    pchlupacek on 0.4-spinoco-compat

    Updated sbt 1.3.3 + plugins (compare)

  • Oct 18 05:33

    pchlupacek on 0.4-spinoco-compat

    fix scala 12 spec compilation (compare)

  • Oct 18 05:27

    pchlupacek on 0.4-spinoco-compat

    dist-trusty to travis (compare)

  • Oct 17 19:00

    AdamChlupacek on 0.4-spinoco-compat

    AAdded SNI servers to client SS… (compare)

Anthony Cerruti
@srnb_gitlab
@AdamChlupacek Any chance you can hack a 2.13 build of protocols-http out? (Add a crossScalaVersions += "2.13.0" to it and publish?)
Adam Chlupacek
@AdamChlupacek
@srnb_gitlab I can try have a look at it over the weekend, but i guess snapshot will be the best we can hope for at the moment
Anthony Cerruti
@srnb_gitlab
:ok_hand:
I'll ask in scala/scala because I might be able to publishLocal it for 2.13
I'll send you what I've done if it works
Anthony Cerruti
@srnb_gitlab
@AdamChlupacek You should be able to add crossScalaVersions += "2.13.0" to the http module's .settings( and then sbt ++2.13.0 http/publish?
Adam Chlupacek
@AdamChlupacek
@srnb_gitlab I will try to get this together tomorrow, thank you for the how to
Anthony Cerruti
@srnb_gitlab
:+1:
Luciano
@lJoublanc
Hey guys fs2-http doesn't have support for HTTP/2, does it?
Adam Chlupacek
@AdamChlupacek
Yeah it currently does not
Adam Chlupacek
@AdamChlupacek
@srnb_gitlab I have tried it, and sadly it seems its not currently that straight forward, we are using some flags which seem not to be supported in 2.13 anymore. We already have a contributor in protocols trying to get it working for 2.13, I will ask him to make sure that everything other than kafka is working and at that point I will make a snapshot from the branch.
Anthony Cerruti
@srnb_gitlab
Alright
@lJoublanc I've been learning about HTTP/2 and QUIC and I kinda want to make a contribution to fs2-http with them
Adam Chlupacek
@AdamChlupacek
With http/2 there could be major issue with java8 i have been looking into it in the past, and basically the sslEngine provided by java does not support application protocol extension, which is one of the main ways how connection gets into http/2 :/
Luciano
@lJoublanc
My personal interest is from google protocolbuffers/gRPC . Just messing around with that and it uses HTTP/2 for transport.
@AdamChlupacek I see htt4s has support - I wonder how they manage it without the JVM version restriction.
Anthony Cerruti
@srnb_gitlab
http4s runs through fs2-io sockets to do HTTP as far as I know @lJoublanc
Adam Chlupacek
@AdamChlupacek
As far as I know there is a path that basically overrides the default classes so that it supports this feature
Do not take me 100% on this here, but basically, if you have your own SSL stack then you can do what ever, we however are using the fs2-crypto, which for the ease of things is using the java SSLEngine to provide SSL/TLS, which in java 8 sadly does not support the extension. To which, as I mentioned, I saw somewhere some patches to get the extension support there, but to me it is a bit weird to override the default classes, it makes a mess of the dependencies.
Adam Chlupacek
@AdamChlupacek
Quick look at http4s they are using this jetty thing as well
And here you go, https://github.com/http4s/blaze/blob/master/examples/src/main/scala/org/http4s/blaze/examples/http2/H2ClientExample.scala from http4s which says that the user has to modify their boot path so that the jetty overried is included
Luciano
@lJoublanc
How would you feel about a dependency on the JDK 9 incubator httpclient? Do you think that would work?
Adam Chlupacek
@AdamChlupacek
Well depends what will it bring us and what it will mean in terms of dependencies for us?
Luciano
@lJoublanc
I suppose as it provides http 1.1 as well it would replace the legacy java.net interface. I'm going to have a look to see how difficult it would be to patch it in, and maybe spend a day to see if it's possible.
My understanding is that it's currently an external dependency, not distributed with Java SE, but eventually would become part of the SE in a future JVM release.
Adam Chlupacek
@AdamChlupacek
I would be kinda against to use this client as an replacement for our implementation, it will be harder to reason about resources like that, fs2-http is meant to implement the whole stack. Also, I am quite sure that this dependency requires java 9, and at that point it can be implemented easy in our current stack
Luciano
@lJoublanc

I am quite sure that this dependency requires java 9

correct

it will be harder to reason about resources like that, fs2-http is meant to implement the whole stack.

I am not sure I understand. Don't yo ucurrently use java.net for connectivity, with fs2 just providing concurrency?

Or is the whole http implementation written from scratch?
Luciano
@lJoublanc
Ah, I think I understand now; you've built the http transport from scratch, but you use TLS from JDK, and that's the blocker?
Adam Chlupacek
@AdamChlupacek
Yes exactly, http transport if from scratch build upon the fs2 sockets. And yeah http2 requires TLS to support the ALPN, which is only supported from java 9.
Luciano
@lJoublanc
:confounded: ugh just reading over the HTTP/2 spec, and it's not straight forward ... needs new codecs for the compressed HPACK headers, as well as implementing flow control, multiplexing, and a state machine. May have to stick to http4s for time being :frowning:
Adam Chlupacek
@AdamChlupacek
Yeah, it is quite complex.
Anthony Cerruti
@srnb_gitlab
@AdamChlupacek You're still on sbt 0.13 for protocols :grimacing:
Anthony Cerruti
@srnb_gitlab
Also, I got http to publishLocal for 2.13
Anthony Cerruti
@srnb_gitlab
Please, do not commit this
For the love of all 8 billion humans on this earth
corentin
@corenti13711539_twitter
Is there a way to reliably know when a websocket client connection has been successfully established? Can that be inferred from the pipe function getting invoked?
Anthony Cerruti
@srnb_gitlab
@corenti13711539_twitter if you're able to read and write from the websocket
corentin
@corenti13711539_twitter
As a fs2 newbie, I'm having some trouble implementing an integration test that involves WebSocket, fs2 and fs2-http. I've implemented a service that receives events (submitToQueueViaWebSocket below) and publishes those events to subscribers via WebSocket. I'm trying to create an integration test for this.
The code looks something like this:
def createWebSocketStream: Stream[F, Unit] = ???
def submitToQueueViaWebSocket: F[Unit] = ???
def createShareAndQueue: F[String] = ???
def wscon(h: String, id: String) = for {
  q <- Stream.eval(Queue.unbounded[F, String])
  r <- Stream(q.dequeue.concurrently(createWebSocketStream))
} yield r

(for {
  id <- Stream.eval(createShareAndQueue)
  res0 <- wscon("localhost", id)
  _ <- Stream.eval(submitToQueueViaWebSocket)
} yield res0).take(1).compile.toList
submitToQueueViaWebSocket submits data that will end up in the queue which results in the q.dequeue stream emitting an item, which in turn results in submitToQueueViaWebSocket getting invoked turning it into an endless recursion. This seems to be ok as long as I only take a fixed amount of items from the stream. I've also tried changing wscon to return a Stream[F, Stream[F, String]], but in that case the program doesn't terminate. Another approach I've tried is change wscon to return a Stream[F, Stream[F, String] instead of a Stream[F, String]. This would help with the recursion, but for some reason I the initial item from the queue doesn't seems to get published via WS. The latter somehow feels like the better approach, but I can't figure out why the initial item doesn't get published.
Any thoughts from the more experienced fs2-http practitioners?
James Cosford
@jamescosford
Can I use fs2-http websockets with scalajs?
Anthony Cerruti
@srnb_gitlab
@jamescosford No
Use scalajs-dom with fs2
James Cosford
@jamescosford
Thanks @srnb_gitlab !
Anthony Cerruti
@srnb_gitlab
If #37 gets merged I'll close #38 and work on #39.
But as of now there's no fs2-based HTTP library that covers 2.13 and ScalaJS
As of now the Travis build is broken too