Deleted User
04/14/2021, 2:27 PMDeleted User
04/14/2021, 2:27 PMjs
const { client, server } = new WebSocketPair();
jed
04/14/2021, 2:31 PMkristian
04/14/2021, 2:48 PMGrygrFlzr
04/14/2021, 2:56 PMDeleted User
04/14/2021, 3:05 PMmatt
04/14/2021, 3:17 PMmatt
04/14/2021, 3:17 PMmatt
04/14/2021, 3:22 PM[durable_objects]
section in wrangler.toml
) when you delete the class that it binds to, otherwise creating the binding will fail as the class has been deleted (note that if any part of script upload fails, migrations are rolled back)alex.b
04/14/2021, 3:56 PMconst inMemoryStorage = []
array, and pushed a new Uint8Array(5000000)
(5MB) to it after every received message, and there was seemingly no limit to how big it would get (I surpassed 128MB, if my code was working right).
Also, I couldn't get two rooms to share the inMemoryStorage
array. Is this just a fluke, or does each instance of a durable object get its own worker/runtime instance?matt
04/14/2021, 4:07 PMmatt
04/14/2021, 4:09 PMinMemoryStorage
, there are certain conditions where multiple durable objects will share global scope, but it's not something you should rely on. you should have your rooms call each otherReaver
04/14/2021, 4:26 PMalex.b
04/14/2021, 4:37 PMGrygrFlzr
04/14/2021, 4:38 PMeidam | SuperSaaS
04/14/2021, 5:17 PMKevin W - Itty
04/14/2021, 7:38 PMKevin W - Itty
04/14/2021, 7:39 PMbrett
04/14/2021, 7:43 PMGreg-McKeon
04/14/2021, 8:21 PMGreg-McKeon
04/14/2021, 8:21 PMGreg-McKeon
04/14/2021, 8:34 PMvans163
04/14/2021, 9:08 PMjed
04/14/2021, 9:09 PMKevin W - Itty
04/14/2021, 9:16 PMKevin W - Itty
04/14/2021, 9:17 PMkenton
04/14/2021, 10:21 PMvans163
04/14/2021, 10:24 PMvans163
04/14/2021, 10:26 PM