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

    Greylock

    06/25/2021, 4:29 AM
    Because the library requires that manifest to fetch static content from the KV
  • g

    Greylock

    06/25/2021, 4:30 AM
    @User mentioned a possible solution in the GitHub issue I linked
  • g

    Greylock

    06/25/2021, 4:31 AM
    > The necessary work here is to add __STATIC_CONTENT_MANIFEST as a text module to the module manifest passed into ModuleAssets -- this is the equivalent of a text blob in the service worker format. It'll be exposed as a module that can be imported, not under env however.
  • g

    Greylock

    06/25/2021, 4:34 AM
    Once that is done my PR to kv-asset-handler can be adjusted
  • g

    Greylock

    06/25/2021, 4:34 AM
    I’ll need to write some new tests for these scenarios
  • w

    Wallacy

    06/25/2021, 3:21 PM
    Small arch question: If we have a shared document platform like "google docs" (not really, just a example); Is supposed each document be a own DO ? To serialize the requests to each document etc? Thats will not impose too much memory pressure? If i have 1000 concurrently documents being edited at one particular time.
  • w

    Wallacy

    06/25/2021, 3:23 PM
    Some warning in advance (without guaranties) can help to save few things on memory. Some objects are small enough.
  • g

    Greylock

    06/25/2021, 7:40 PM
    any ideas when the billing for DOs and websockets will be adjusted?
  • g

    Greylock

    06/25/2021, 7:41 PM
    the blog post which announced them mentioned a fix being in the works but its been nearly 3 months since than and I haven't heard anything in this regard
  • l

    lux

    06/25/2021, 9:30 PM
    Are there any examples of workers talking to each other via websockets? Or any gotchas related to that? Hoping to try something out around that soon
  • g

    Greylock

    06/25/2021, 9:34 PM
    I dont think you can do that because theres no way to establish a route between workrs
  • l

    lux

    06/25/2021, 10:01 PM
    I wonder if it could connect like an external client then via the public URL of the other object?
  • l

    lux

    06/25/2021, 10:01 PM
    Then the endpoint handles routing it like any other request
  • j

    john.spurlock

    06/26/2021, 11:59 PM
    Is there a limit on the number of
    keys
    to
    delete
    on durable object storage?
  • g

    Greylock

    06/27/2021, 2:31 AM
    if it doesnt say I would reckon not, but im not sure
  • g

    Greylock

    06/27/2021, 1:59 PM
    It might fail if you try it with a bunch of keys though idk
  • g

    Greylock

    06/27/2021, 1:59 PM
    I have a quick question regarding websockets. Is there a way to have a single websocket connection and multiple associated durable objects?
  • k

    KingQwon

    06/27/2021, 4:49 PM
    any way of doing this https://github.com/s-yadav/FlakeId without using a npm package in a worker?
  • j

    john.spurlock

    06/27/2021, 4:54 PM
    Ok, so answering my own question:
    delete(keys)
    currently seems to have a limit of 128 keys, same as
    get(keys)
    , just got
    RangeError: Maximum number of keys is 128.
    - maybe add to the docs?
  • j

    john.spurlock

    06/27/2021, 5:00 PM
    Just copy the code, it's extremely basic with no deps - you'll need to modify the while loop that tries to wait for one millisecond anyway to avoid an infinite loop, since Date.now() does not advance inside a worker execution (except for io)
  • m

    maxbittker

    06/27/2021, 11:01 PM
    that’s interesting, i didn’t know date.now() doesn’t advance (it basically returns the time the worker started?). What do you mean by except for io? @john.spurlock
  • j

    john.spurlock

    06/27/2021, 11:21 PM
    https://developers.cloudflare.com/workers/runtime-apis/web-standards#javascript-standards
  • j

    john.spurlock

    06/27/2021, 11:23 PM
    To mitigate spectre-style attacks. You can observe
    Date.now()
    changing after awaiting a fetch or a cache op, for example.
  • m

    maxbittker

    06/27/2021, 11:33 PM
    oh, interesting. i’ve seen browsers reducing precision before but this is slightly more extreme, seems like? thanks john!
  • g

    Greylock

    06/27/2021, 11:39 PM
    its more extreme because browser spectre attacks have less security implications than someone taking over a machine that has potentially thousands of tenants. Some of which may be using cloudflare for financial transactions or housing other sensitive data
  • g

    Greylock

    06/27/2021, 11:40 PM
    besides, browser sessions are typically short lived which would make a spectre attack quite difficult
  • g

    Greylock

    06/27/2021, 11:40 PM
    whereas workers could potentially be run for hours at a time if they have websocket connections
  • v

    vans163

    06/28/2021, 12:21 PM
    Is there a way to remove the execution limit? It seems as we add more connections to the DO we get request cuts at random times
  • v

    vans163

    06/28/2021, 1:52 PM
    Is there a sub for Stream Connect?
  • d

    Deebster

    06/28/2021, 5:01 PM
    thanks for this, hopefully it's fixed properly soon!
1...108109110...567Latest