Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 04 01:36
    AesaKamar starred Spinoco/fs2-http
  • Jul 28 13:21
    pmukhin commented #44
  • Jun 25 07:21
    bellatoris starred Spinoco/fs2-http
  • May 11 14:59
    mfirry commented #43
  • May 05 18:37
    FXHibon starred Spinoco/fs2-http
  • May 03 08:19
    AdamChlupacek synchronize #44
  • May 03 08:19

    AdamChlupacek on upgrade-to-fs2.3

    Address review comments, remove… (compare)

  • May 02 18:40
    AdamChlupacek synchronize #44
  • May 02 18:40

    AdamChlupacek on upgrade-to-fs2.3

    Fix travis dependencies. (compare)

  • May 02 18:35

    AdamChlupacek on 0.5

    Fix travis dependencies. (compare)

  • May 02 18:33
    AdamChlupacek review_requested #44
  • May 02 18:33
    AdamChlupacek review_requested #44
  • May 02 18:33
    AdamChlupacek opened #44
  • May 02 18:27

    AdamChlupacek on upgrade-to-fs2.3

    Setting version to 0.4.0-SNAPSH… Updated to fs2 1.0.0 final Fixes #29 and 16 more (compare)

  • May 02 18:14

    AdamChlupacek on 0.5

    Merge branch 'series/0.4' of gi… (compare)

  • May 02 18:09

    AdamChlupacek on upgrade-to-fs2.3

    Migrate fs2-http to fs2 2.3.0 +… (compare)

  • Apr 23 07:28
    nebtrx starred Spinoco/fs2-http
  • Apr 10 12:43
    mfirry opened #43
  • Apr 10 12:31
  • Feb 21 01:06
    vascorsd starred Spinoco/fs2-http
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.
Soren
@srnb_gitlab
@AdamChlupacek You're still on sbt 0.13 for protocols :grimacing:
Soren
@srnb_gitlab
Also, I got http to publishLocal for 2.13
Soren
@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?
Soren
@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?
Soren
@srnb_gitlab
@jamescosford No
Use scalajs-dom with fs2
James Cosford
@jamescosford
Thanks @srnb_gitlab !
Soren
@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
Vitaly Lavrov
@lavrov
Why master branch is behind services/0.x branches?
As I understand master is not used at all
Is there a reason for that?
marko asplund
@marko-asplund
Feedback on fs2 v2 upgrade PR #41 would be greatly appreciated.
What would be the best way to determine default blocking context thread pool sizes? Just a fixed number or base it on execution environment properties?
marko asplund
@marko-asplund
I noticed there are two PRs (#37 and #62) for introducing Scala 2.13 support.
Are there any plans for merging these?
Pavel Chlupacek
@pchlupacek
Hey sorry guys for being a bit off the track. We will review the code over weekend and will get back on the track. Also we looking for maintainers here to be more responsive. So if any want to help please pm me. Thanks!
corentin
@corenti13711539_twitter
The series/0.4 branch build seems to be failing on Travis - anyone working on that?
Pavel Chlupacek
@pchlupacek
I think this is due jdk and travis image change. There is a fix to revert to previous travis default. Pr appreciated :-)
marko asplund
@marko-asplund
@pchlupacek Have you guys had a chance to look at PRs #37, Spinoco/protocol#62 and #41 yet?
marko asplund
@marko-asplund
@pchlupacek PR #42 should fix travis build for series/0.4.
Pavel Chlupacek
@pchlupacek
hi @marko-asplund sorry for being bit off. I hope to get to these this week
Soren
@srnb_gitlab
@pchlupacek Any chance you can look at those this weekend?
khrupalyk
@khrupalyk

Hello team! I'm using WebSocket client, and have a question how I can check when WebSocket connection is closed? From documentation I have read:

    * If this is established successfully, then this consults `pipe` to receive/sent any frames
    * From/To server. Once the connection finishes, this will emit once None.

But I can't reproduce this behavior. I shut down the server, and never receive any messages.

khrupalyk
@khrupalyk
And one more question: how I can send Ping message with code OpCode.Ping ?
khrupalyk
@khrupalyk
And seems I haven't ability to set ping interval for WebSocket, because it's hardcoded value:
(body through impl.webSocketOf(pipe, Duration.Undefined, maxFrameSize, client2Server = true)
Soren
@srnb_gitlab
@pchlupacek Any news?
Is #37 not merged because its not finished?
I really want to get fs2 v2, scala 2.13, and scalajs support on this library because it's basically the best for real streaming clients
And my project depends on fs2 v2 and scala 2.13 and fs2-http is also the only thing holding it back from scalajs support as well
Soren
@srnb_gitlab
I at one point was working on a streaming HTTP library of my own (and honestly might go back to it) but I don't want to trudge through writing all the stuff in protocols, and I don't want to have the same issue as fs2-http does depending on it
Pavel Chlupacek
@pchlupacek
@srnb_gitlab sorry for delay, really running hard to keep up here. Sorry for not being as responsive
is what gives you features. It works now. @AdamChlupacek when you will address the review so we can merge and make release?
Soren
@srnb_gitlab
:+1: