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

    kenton

    06/04/2021, 8:32 PM
    hmm I don't recognize the timeout error, is that our error or yours?
  • k

    kenton

    06/04/2021, 8:32 PM
    oh I found it
  • v

    Vanessa🦩

    06/04/2021, 8:32 PM
    I can only have 10000 timeouts, after that setTimeout gives me that error.
  • k

    kenton

    06/04/2021, 8:32 PM
    I see, the limit on setTimeout()s
  • k

    kenton

    06/04/2021, 8:33 PM
    which was designed long before Durable Objects. We figured a single HTTP request couldn't possibly need more than 10,000 setTimeout() calls, heh.
  • v

    Vanessa🦩

    06/04/2021, 8:33 PM
    lol
  • k

    kenton

    06/04/2021, 8:33 PM
    I believe we're planning to fix that, too.
  • v

    Vanessa🦩

    06/04/2021, 8:33 PM
    Oh I hope so. that would be a deal breaker, unless you can suggest a work-around
  • v

    Vanessa🦩

    06/04/2021, 8:37 PM
    Are you planning to fix
    Cannot clear a timeout created in a different request context
    too?
  • k

    kenton

    06/04/2021, 9:32 PM
    Yes.
  • w

    Wallacy

    06/08/2021, 2:16 PM
    Is wrangler tail working okay using DO? My did show nothing on the worker side (modules of course) and nothing on DO side...
  • m

    matt

    06/08/2021, 2:35 PM
    @User Wrangler tail doesn't work with DOs yet.
  • w

    Wallacy

    06/08/2021, 3:05 PM
    But should listen regular worker that is binded to the DO right?
  • m

    matt

    06/08/2021, 6:17 PM
    Yeah, Tail should work on the calling worker. What are you making your test requests from?
  • w

    Wallacy

    06/08/2021, 7:48 PM
    @User well I just type ā€œwrangler tailā€ the they connect to to calling worker but never prints anything. When I used the KV over a regular worker without modules worker. After I changed to modules+DO a month ago stopped to work.
  • m

    matt

    06/08/2021, 7:56 PM
    * do you have other non-modules workers that
    wrangler tail
    works fine with? * for the modules + DO worker, what is sending requests to the worker? Is it you that's sending test requests, or is it a worker serving traffic? * is the modules + DO worker on
    workers.dev
    , or a route on a zone?
  • w

    Wallacy

    06/08/2021, 8:00 PM
    On that project i only have module worker, but i can setup a new one here just to test that; The main site is hosted at cloudflare pages and call api.domain.tld request that is routed to a worker;
  • v

    Vanessa🦩

    06/08/2021, 9:21 PM
    Under what circumstances would a DO not be created in the same colo as the first worker connecting to it? I have a colleague in Toronto, and her worker is in YYZ, but the DO was created in Chicago (ORD). What can I do to prevent this from happening? (The script is on workers.dev but there is an enterprise trial plan covering it) Also, workers in India and New Zealand create DOs in Hong Kong, Argentina goes to Miami etc..
  • c

    ckoeninger

    06/08/2021, 9:46 PM
    https://developers.cloudflare.com/workers/learning/using-durable-objects#object-location
  • v

    Vanessa🦩

    06/08/2021, 11:31 PM
    > Not all Cloudflare locations support Durable Objects yet, so objects may not be created in exactly the same point-of-presence where they are first requested. Ah. Thank you šŸ™‚
  • m

    moomoo

    06/09/2021, 8:24 AM
    Is there a way to get a fast feedback cycle with Durable Objects / web sockets i.e. develop locally with live reload and then only deploy only when working locally. I'm currently deploying to test every change is there a better way? For example the Chatroom is there a way to get that running locally: https://github.com/cloudflare/workers-chat-demo
  • s

    Schmeisser

    06/09/2021, 2:12 PM
    hi there. Any pointers to a sane solution for simulating something akin to a game loop on a durable object? I don't think using SetInterval feels right, and i need a headless solution so something like RequestAnimationFrame is also not a good idea
  • w

    Wallacy

    06/09/2021, 4:19 PM
    @User I tested on a new project (non module) and did work as expected.
  • w

    Wallacy

    06/09/2021, 4:23 PM
    Also, about the Durable Objects itself, any plan to support more jurisdictions ? Analog to GDPR, here in Brazil we need to keep the data in our county because of our LGPD (our version of GDPR)
  • k

    kenton

    06/09/2021, 5:48 PM
    We definitely plan to add more jurisdictions eventually. But, right now we're focused on more basic product needs. I'm not sure exactly when we'll start being able to add more jurisdictions.
  • k

    kenton

    06/09/2021, 5:51 PM
    Right now the only option is to deploy. We know this is not a very good experience. We're actively working on a way to preview DO code without actually deploying it, but it's a surprisingly hard problem due to the nature of Durable Objects. I think we'll have something in 2-3 months, but I'm not completely sure.
  • j

    jed

    06/09/2021, 10:25 PM
    Forgot to post this here, but I made a small dashboard that keeps track of where durable objects are created. https://where.durableobjects.live/
  • v

    Vanessa🦩

    06/09/2021, 10:29 PM
    My work-around for no local development is to have a watch in my
    package.json
    , which will build and deploy to
    dev
    as soon as I save. Then I just switch to the browser and reload.
    Copy code
    {
      ...
      "scripts": {
        "start": "npm-watch deploy-dev",
        "deploy-dev": "wrangler publish --env dev",
        ...
      },
      "watch": {
        "deploy-dev": "*.js"
      },
      "devDependencies": {
        "npm-watch": "^0.9.0",
        ...
      }
    }
  • v

    Vanessa🦩

    06/09/2021, 10:45 PM
    Neat. Not sure why it connected me via Dallas (DFW) - my own workers / DOs always are in LAX? I was curious too, added a map for my tests:
  • j

    jed

    06/09/2021, 11:35 PM
    is it possible it’s because it’s under a free account? that or there’s some sort of other path condition about the DO itself…
1...979899...567Latest