Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gavin Bisesi
    @Daenyth
    So that's tricky
    very tricky
    How about this:
    in the handler, instead of .dequeue, try using dequeueChunk1
    that gives you an F[Chunk[A]] rather than Stream[F, A]
    You could repeat that with some sleep maybe..
    does that render refresh happen predictably on the frontend?
    Would it be acceptable for that to be the only way you get more messages?
    because that would be easier
    if not as ideal
    ideally, it would be a long-lived websocket request, and you could cleanly connect the "close" logic
    but idk how play's support for such things is, and your frontend would have to do the other side similarly
    mn98
    @mn98
    yes, it happens somewhat predictably in that any time an action is performed on the front end I see the "got request" message
    after the first 'run' the browser appears to hang and I see lots of ERR_CONNECTION_RESET and ERR_CONNECTION_REFUSED related to the 'testResult' route
    Play has both SSE and websocket... I went with SSE because I thought it would safer/simpler/easier!
    mn98
    @mn98
    There's a nice example of a chat server with Play Scala using web sockets and that works great, perhaps I need to hijack that if I want to have this permanently open connection. Then presumably I'll be able to take my fs2 results and convert it to akka without too much trouble...
    I know nothing about web sockets but it should be fun at least
    thank you very much for your help!
    Gavin Bisesi
    @Daenyth
    :+1:
    yeah, this is less of a streamz problem than a play one
    mn98
    @mn98
    Well by golly I had one last desperate shot... and by moving the client side 'EventSource' out of the react component and into the main for {} yield {} it appears to work and I receive all elements
    Gavin Bisesi
    @Daenyth
    oh yeah, that makes total sense too
    that's basically what I was getting at with using a Stream[F, MyRoutes] construction
    main would run that stream
    mn98
    @mn98
    cool, so now main is running the SSE stream
    Now the only possibly undesirable thing I observe is a periodic (every few minutes) ERR_CONNECTION_RESET followed by "got request" in the log
    but it doesn't appear to affect the desired behaviour
    mn98
    @mn98

    fyi that was solved with:

        val heartbeat = Event("", None, None)
    ...
            source
              .via(EventSource.flow)
              .keepAlive(10.seconds, () => heartbeat))

    which apparently is how I keep the connection alive

    I'll leave it there now... thanks very much again for all the help and ideas!
    Gavin Bisesi
    @Daenyth

    Now the only possibly undesirable thing I observe is a periodic (every few minutes) ERR_CONNECTION_RESET followed by "got request" in the log

    I'd bet you can still lose messages, but you need a more rapid volume, maybe

    Glad to help :+1:
    Gavin Bisesi
    @Daenyth
    @krasserm Can I have some amount of setting-editing permission on the repo? I'd like to set up github actions or at least some level of CI
    Gavin Bisesi
    @Daenyth
    actually it might have just been enough for me to add the .github/ files... things seem to be moving
    (but it still might be helpful for me to have permissions, probably need that for setting up publishing secrets)
    Gavin Bisesi
    @Daenyth
    well if anyone's curious, WIP draft of CE3/fs2 3 support krasserm/streamz#80
    Martin Krasser
    @krasserm
    @Daenyth for a user account repo it is not possible to give you more permissions than those defined for a collaborator role (details here). If you think it's not too complicated to instruct me what needs to be added let's try this first, otherwise, let's think about alternatives. Open to suggestions ...
    Gavin Bisesi
    @Daenyth
    ah ok, I think you'd have to convert the repo to an organization
    which should be fairly seamless if you wanted - the old links will redirect
    Martin Krasser
    @krasserm

    the old links will redirect

    great, didn't know that. Then a conversion to an organization seems the way to go. I have other priorities this week but will try to do that next week.

    Gavin Bisesi
    @Daenyth
    I'm in no hurry; it's purely an ease of life thing
    getting sbt-bintray set up is already a game changer
    I can sbt +publish to stage and then sbt bintrayRelease to publish all the staged stuff once I'm happy
    no more manual zip crap
    because that was a huge barrier to me contributing effectively
    once I get releases from ci set up, I'll also look at scala-steward
    Martin Krasser
    @krasserm
    Sorry for my ignorance but do you think it is practicable that you setup the actions on you streamz fork and once they are working I "copy" them to this repo?
    Gavin Bisesi
    @Daenyth

    I'm not sure. The sbt-github-actions generated setup seems to work just fine. The main part I'm not sure of is the secrets management.

    But yeah, to test that I think I can make a fork (I'll just change the package name or something to not conflict as I test)

    Martin Krasser
    @krasserm
    I was mainly asking because that would avoid creating an organization and moving the repo. But if you prefer having more permission for this repo (via an organization) instead of working on a fork for setting up actions I'm happy to create one.
    Gavin Bisesi
    @Daenyth
    Whatever you prefer
    Martin Krasser
    @krasserm
    ok, then let's try with a fork first and if this doesn't work I'll create an org.