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

    raRaRa

    08/24/2021, 10:31 AM
    Kinda like the chat room demo
  • s

    Subh

    08/24/2021, 10:32 AM
    oh ya, I didnt think about that ๐Ÿ˜› I need to mix it up. Sweet!
  • r

    raRaRa

    08/24/2021, 10:37 AM
    Yeah it took me a while to figure that out as well! E.g. when user joins a GameRoom, the GameRoom can open the Lobby DO and increment the user count in the room! ๐Ÿ™‚
  • r

    raRaRa

    08/24/2021, 10:37 AM
    Pretty powerful stuff!
  • r

    raRaRa

    08/24/2021, 10:38 AM
    *increment hte user count for the room that is displayed in the lobby (for clarification)!
  • s

    Subh

    08/24/2021, 11:03 AM
    Gotcha! Also how are you storing the images? KV?
  • r

    raRaRa

    08/24/2021, 11:31 AM
    I've pretty muched never touched KV or any CF products other than the CDN and Pages. I usually host media on a CDN like AWS S3.
  • w

    Wallacy

    08/24/2021, 2:50 PM
    FWIW: I do this and other more complex search. I do a entire full text search (using flexsearch ), i have a few keys on my DO to filter/find my document list, then a pick the keylist that i want to perform the search and split in few diferents SearchDO, every one ask the document back to the document owner, fill the DocumentIndex and then i can search the data in different ways (flexsearch is pretty good)! After that i can merge the results e pull back to my user. Usually for 2000 docs with over 100KiB each, the first time the search took 8 seconds. Then (because the DO is already loaded and the data indexed) 700ms in the next search. But 300ms if that time is just because theres no DO in my region, and other tons os optimizations that i can do latter.
  • w

    Wallacy

    08/24/2021, 3:21 PM
    My only problem is sometimes i got this error: "too many concurrent storage operations from this account" / Because that i need split my data using KV to avoid that.
  • r

    raRaRa

    08/24/2021, 6:52 PM
    What will happen to a DO when new code is deployed? Does it migrate automatically, or does it re-initialize all DO's?
  • i

    ItsWendell

    08/24/2021, 6:54 PM
    Good question, I have no idea. I assume they'll be evicted but your storage will persist.
  • b

    brett

    08/24/2021, 10:47 PM
    All objects will restart with the new code
  • j

    john.spurlock

    08/24/2021, 10:49 PM
    Was there a workers runtime update last Friday? I don't remember seeing an announcement...
  • k

    kenton

    08/24/2021, 11:28 PM
    We don't typically push major updates on Fridays, but minor config changes happen all the time and could have the effect of restarting the runtime.
  • j

    john.spurlock

    08/24/2021, 11:35 PM
    ah ok, thought those release notes usually appeared weekly, looking back I see that's not quite the case https://community.cloudflare.com/tag/workersreleasenotes
  • k

    kenton

    08/25/2021, 1:38 AM
    We do push a release every week, but I think often whoever is pushing the release forgets to publish the release notes. ๐Ÿ˜•
  • k

    kenton

    08/25/2021, 1:39 AM
    the notes are usually published the day after the release is complete
  • k

    kenton

    08/25/2021, 1:39 AM
    (if the person doing the release remembers...)
  • k

    Kevin W - Itty

    08/25/2021, 2:17 AM
    what's the latest wrangler version for DOs? I've taken a bit of a break from it...
  • k

    Kevin W - Itty

    08/25/2021, 2:17 AM
    last I was on:
    1.15.0-custom-builds-rc.2
    which i'm pretty sure is wayyyy old
  • j

    James

    08/25/2021, 2:25 AM
    No need for a beta anymore. The latest release version (1.19 I think) supports them! ๐Ÿ˜€
  • k

    Kevin W - Itty

    08/25/2021, 2:25 AM
    awesome thanks @User !
  • k

    Kevin W - Itty

    08/25/2021, 2:26 AM
    es module syntax?
  • j

    James

    08/25/2021, 2:26 AM
    Yep same support there too ๐Ÿ‘
  • k

    Kevin W - Itty

    08/25/2021, 3:19 AM
    can we still publish multiple classes e.g.
    wrangler publish --new-class Evacuee Evacuees
    ?
  • k

    Kevin W - Itty

    08/25/2021, 3:20 AM
    i'm getting an error when trying to publish both...
    Copy code
    error: 'Evacuees' isn't a valid value for '<output>'
        [possible values: json]
  • e

    Erwin

    08/25/2021, 3:20 AM
    Two separate calls?
  • k

    Kevin W - Itty

    08/25/2021, 3:20 AM
    tried it - each one complains about the other class
  • e

    Erwin

    08/25/2021, 3:20 AM
    I haven't tried it in a long time.. so I don't know for sure
  • e

    Erwin

    08/25/2021, 3:20 AM
    What is the message?
1...164165166...567Latest