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

    aranchelk

    12/08/2022, 10:53 PM
    Awesome! Thank you for the info!
  • h

    HardAtWork

    12/09/2022, 3:48 PM
    Can DOs have JSON bodies on a GET request?
  • j

    jed

    12/09/2022, 4:05 PM
    this would violate the spec, fwiw.
  • b

    brett

    12/09/2022, 4:07 PM
    Yeah, you'll have to try, I feel like we allow it in a few places (since people depend on it even though it's against the spec), but maybe I've forgotten and it's blocked everywhere. Not sure about DOs off the top of my head.
  • k

    Kai

    12/09/2022, 8:11 PM
    is it well supported to use inheritance for DOs?
  • b

    brett

    12/09/2022, 9:45 PM
    I would think so, but I've never tried.
  • d

    Deleted User

    12/10/2022, 3:46 AM
    ~~Is there an example for setting a Durable Object Alarm, then having the set Alarm run a function in 7~ days?~~ got it
  • d

    Deleted User

    12/10/2022, 7:36 PM
    I don't really get the GB-S stuff. Is that number going to increase and end up in a huge bill if I have a do-alarm that gets ran in 1 hour vs 30 days vs 1 year?
  • u

    Unsmart | Tech debt

    12/10/2022, 7:37 PM
    GB-s are only added up while your DO is active. Alarms are a background thing they dont keep the DO active
  • d

    Deleted User

    12/10/2022, 7:39 PM
    So me getting/setting alarms & getting/putting keys will be generally safe. Good to know, thank you
  • n

    nickchomey

    12/10/2022, 8:03 PM
    The KV docs say the following, but I dont really know what it means/how it works. > If you need stronger consistency guarantees, consider using Durable Objects. One pattern is to send all of your writes for a given KV key through a corresponding instance of a Durable Object, and then read that value from KV in other Workers. This is useful if you need more control over writes, but are satisfied with KV’s read characteristics described above. Could someone clarify how something like this would work, in order to be able to get faster global consistency than the 60 seconds provided by KV?
  • u

    Unsmart | Tech debt

    12/10/2022, 8:07 PM
    If you do all writes from one region and one machine you have stronger write guarantees. Durable objects only exist once anywhere in the world. The region you write from will immediately know what the new value is if you do a get. Its not saying that other regions will get the value faster.
  • n

    nickchomey

    12/10/2022, 8:21 PM
    Ah, I understand. So you have some sort of public API endpoint (which might be accessed from anywhere on the Edge), and this passes the submitted data to a DO that's fixed in one place. Then that DO passes the data on to the closest KV edge, and it eventually replicates globally (still probably subject to the up to 60s delay)?
  • u

    Unsmart | Tech debt

    12/10/2022, 8:33 PM
    Theres 2 central stores: US & EU. Data that gets written is pretty much immediately replicated. The 60s delay is the pull-based cache. When you read an item it will first check the colo cache, if its not there it will pull from the central store, return to the user and store it in the colo cache for 60s. (Theres some sort of revalidation that can happen that makes it possible to read a specific value from the same region that was updated in less than 60s but not really sure how they do their revalidation)
  • u

    Unsmart | Tech debt

    12/10/2022, 8:34 PM
    (And whenever you write to kv it will also add to the read cache in the colo that you wrote from)
  • d

    Deleted User

    12/11/2022, 12:34 AM
    Does deleteAll() delete alarms or would I have to also run deleteAlarm()
  • d

    Deleted User

    12/11/2022, 12:35 AM
    or is that unnecessary and the alarm deletes itself once ran?
  • d

    Deleted User

    12/11/2022, 1:20 AM
    Also just wondering how storage works. Seems like although I am deleting data, the
    Durable Objects storage
    counter on the Workers tab keeps rising Is this number just counting the total of what you have stored throughout the month? or am I possibly not deleting data properly?
  • b

    brett

    12/12/2022, 3:47 PM
    You need to delete the alarm separately, that said the alarm will be removed once it successfully runs, so it depends if you're OK with it firing or not?
  • b

    brett

    12/12/2022, 3:48 PM
    The storage metric in the dashboard/API isn't updated live, how frequently were you checking it? I would expect it to go down after your delete, might take an hour or so.
  • t

    thermo

    12/12/2022, 4:11 PM
    https://discordapp.com/channels/595317990191398933/846453104382836766/1051893796666880061
  • d

    Deleted User

    12/12/2022, 4:12 PM
    has been 2 days and the metric is just increasing, even though listing the objects with
    https://api.cloudflare.com/client/v4/accounts/<accountId>/workers/durable_objects/namespaces/<namespaceId>/objects
    shows them with
    "hasStoredData": false
    I assume these will eventually disappear and the metric will go down?
  • b

    brett

    12/12/2022, 4:29 PM
    Hm, I'll have to check then
  • b

    brett

    12/12/2022, 4:29 PM
    Can you DM me your account ID
  • d

    Deleted User

    12/12/2022, 4:40 PM
    sent
  • b

    brett

    12/12/2022, 6:05 PM
    For other readers, turned to be a recently deleted namespace. We keep data on the edge for 72 hours in case you want to ask us to un-delete before it's gone-gone.
  • h

    HardAtWork

    12/12/2022, 7:44 PM
    Small cross-post warning Just released https://where.durableobjects.live/ Version 2, with more Datacenters, more Durable Objects, and more Fun! For more info, check out the post I made about it in #783765338692386886: https://canary.discord.com/channels/595317990191398933/783765338692386886/1051946267166646323
  • b

    brett

    12/12/2022, 7:45 PM
    nice
  • b

    brett

    12/12/2022, 7:45 PM
    for science indeed
  • m

    Murray

    12/13/2022, 10:45 AM
    Kool. v2 looks more correct :-). A nice feature would be to a toggle button that swaps the coloums around so we can see the storage locations (distinct list) and the worker locations that feed into them 👀
1...454455456...567Latest