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

    joe

    06/16/2021, 8:45 PM
    niiiiice
  • j

    Josh

    06/16/2021, 8:46 PM
  • g

    Greylock

    06/16/2021, 10:33 PM
    yeah, filters.
  • g

    Greylock

    06/16/2021, 10:33 PM
    I figured, workers have a memory limit of 500MB
  • g

    Greylock

    06/16/2021, 10:33 PM
    so I was like, this data doesnt need to scale so the 'single thread' bottleneck wouldn't really apply
  • g

    Greylock

    06/16/2021, 10:34 PM
    the issue is that the actual persistent mechanism limits values to 30kb which is incredibly small
  • g

    Greylock

    06/16/2021, 10:34 PM
    so im kinda confused on how the data should be organized with such small key/value pairs
  • g

    Greylock

    06/16/2021, 10:39 PM
    I mean its possible its designed this way intentionally to remind developers that durable objects don't really scale well as individual objects, but I am not really sure I get the point of durable objects I guess.
  • g

    Greylock

    06/16/2021, 10:40 PM
    I mean originally I thought this pitfall was addressed through the ability to run compute directly on the worker, ie, querying/sorting the data before returning it, etc.
  • g

    Greylock

    06/16/2021, 10:41 PM
    but that still doesn't explain the correct way to store say, 500 1kb documents in a single durable object
  • v

    vodyl

    06/16/2021, 10:43 PM
    Within Cloudflare, KV might be the closest, with no limit on number of keys and key formed with period filter in mind (something like user:period:transactionID). But maybe other providers suites best.
  • v

    Vanessa🦩

    06/16/2021, 10:56 PM
    Nice! It looks like I’m only getting the log entries after a request is finished. Which for a web socket connection means only after the session. Is that the expected behavior?
  • k

    kristian

    06/16/2021, 10:57 PM
    https://developers.cloudflare.com/workers/learning/using-durable-objects#development-tools
  • g

    Greylock

    06/16/2021, 11:00 PM
    fair enough but like
  • g

    Greylock

    06/16/2021, 11:00 PM
    whats a valid use case for durable objects?
  • g

    Greylock

    06/16/2021, 11:00 PM
    I mean I understand the latency and consistency advantages but other than that im lost.
  • g

    Greylock

    06/16/2021, 11:01 PM
    the way it was advertised in the blog post associated w/ its open beta sort of implied it was a replacement for databases whereas I am starting to see that isnt the case?
  • j

    Josh

    06/16/2021, 11:02 PM
    I mean it's a keyvalue DB, there's lots of types of DB
  • j

    Josh

    06/16/2021, 11:03 PM

    https://www.youtube.com/watch?v=W2Z7fbCLSTw&tā–¾

  • g

    Greylock

    06/16/2021, 11:03 PM
    sure, I do see that
  • g

    Greylock

    06/16/2021, 11:04 PM
    so its really just an alternative to the KV store that is less globally distributed and more consistent and closer to the user
  • g

    Greylock

    06/16/2021, 11:04 PM
    ie, lower latency, higher consistency, but worse at scaling?
  • j

    Josh

    06/16/2021, 11:05 PM
    Nope, still perfect linear scaling
  • g

    Greylock

    06/16/2021, 11:05 PM
    a single object is a single thread
  • g

    Greylock

    06/16/2021, 11:05 PM
    so you cannot simply cram more throughput out of a given object
  • g

    Greylock

    06/16/2021, 11:05 PM
    a given object is limited by the single thread/worker that it runs on?
  • j

    Josh

    06/16/2021, 11:06 PM
    Where are you seeing the single thread? Just to make sure we're on the same page?
  • j

    Josh

    06/16/2021, 11:07 PM
    Can't see anything about that on https://developers.cloudflare.com/workers/learning/using-durable-objects
  • g

    Greylock

    06/16/2021, 11:07 PM
  • g

    Greylock

    06/16/2021, 11:07 PM
    https://blog.cloudflare.com/durable-objects-open-beta/
1...101102103...567Latest