https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • t

    Taral

    03/28/2021, 9:55 PM
    It's not as nice since when people join the server they have to issue a command or something to get their member role
  • w

    Walshy | Pages

    03/28/2021, 9:55 PM
    IIRC role management is through the REST API
  • w

    Walshy | Pages

    03/28/2021, 9:55 PM
    so webhook -> POST/PUT
  • t

    Taral

    03/28/2021, 9:56 PM
    vs a gateway bot that gets the notification of a new member via websocket
  • a

    antal1b

    03/28/2021, 11:59 PM
    I had the same idea recently, but would this work? The DO would have to be just running indefinitely, without any external events. Would the websocket connection keep it alive for an unlimited time, once (I presume) it's triggered by a http or cron call, to start it up?
  • t

    Taral

    03/28/2021, 11:59 PM
    cron would kick it occasionally
  • a

    antal1b

    03/28/2021, 11:59 PM
    yeah, that's what I was going to write now 😛
  • a

    antal1b

    03/29/2021, 12:00 AM
    if maybe that's a solution
  • a

    antal1b

    03/29/2021, 12:01 AM
    but that's pretty cool if things like this are possible
  • a

    antal1b

    03/29/2021, 12:03 AM
    basically abusing workers meant to be in a server role, to act as clients 😄
  • t

    Taral

    03/29/2021, 12:10 AM
    I dunno what the cost is for a DO to stay alive, but it seems small
  • t

    tp

    03/29/2021, 2:38 PM
    do websockets using durable objects have any throttling?
  • v

    vans163

    03/29/2021, 7:27 PM
    Probably you cant stream video/audio
  • v

    vans163

    03/29/2021, 7:27 PM
    Since webworkers have that limitation
  • v

    vans163

    03/29/2021, 7:28 PM
    But durable object multicast would rival twitches network
  • v

    vans163

    03/29/2021, 7:28 PM
    And reduce their 10second delay
  • v

    vans163

    03/29/2021, 7:28 PM
    To 1 or 2 if the user is across the world otherwise under 1
  • g

    Greg-McKeon

    03/29/2021, 11:15 PM
    Hey Eidam - what's your use case here?
  • t

    tp

    03/30/2021, 12:03 AM
    i feel like the only behaviour that can describe the issues im having is some kind of throttling with durable objects/websockets
  • t

    tp

    03/30/2021, 12:03 AM
    is there a way to view whether youre hitting any limits?
  • t

    tp

    03/30/2021, 12:04 AM
    @User in trying to reproduce that bug from a couple of weeks ago it always takes some time to have it recur so im of the mind it is hitting some kind of throttling limit
  • e

    eidam | SuperSaaS

    03/30/2021, 7:43 AM
    What are the issues you are having?
  • t

    tp

    03/30/2021, 7:44 AM
    we send data through the websocket every second (maybe about 15kb of data)
  • t

    tp

    03/30/2021, 7:45 AM
    it works fine for a while, maybe a couple of hours
  • t

    tp

    03/30/2021, 7:45 AM
    then all of a sudden it will disconnect any websocket client connected
  • t

    tp

    03/30/2021, 7:45 AM
    and reconnecting them it works for a while and it disconnects them
  • t

    tp

    03/30/2021, 7:46 AM
    ive gone through the code and there are no errors (100% sure as nothing will throw) so it is something that is beyond the sight of what i have
  • t

    tp

    03/30/2021, 7:46 AM
    and the behaviour is consistent with some kind of throttling
  • t

    tp

    03/30/2021, 7:46 AM
    i tried to make a self contained worker for kenton to look at
  • t

    tp

    03/30/2021, 7:46 AM
    but it wont recur it only recurs after a long time on a new worker
1...313233...567Latest