rocicorp / reflect-draw Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://reflect-draw.vercel.app
License: Other
Home Page: https://reflect-draw.vercel.app
License: Other
It's interesting to think through exactly what should happen here.
As far as I can tell the Workers platform lacks anything like Vercel's "one-env-per-PR" feature so we can't autodeploy for PRs. I suppose this implies that vercel previews for PR only work for UI changes. Which ... ok that's a start.
I did find this Github action: https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler. We could use this to promote to production automatically, but not 100% that's a good idea?
Right now reps
is baked into this repository. However it is entirely boilerplate except for one line - where mutators.ts
is linked into the server.
We need to figure out an easy way for our customers to build apps and reuse the server, supplying their own mutators. This is complicated by the facts that:
I think that ideally what I'd like is something like:
npm install --save-dev reps
in your applicationreps
(either via npm run dev
, npm run build
, wrangler publish
, etc) it uses the configured mutators from step 2.undefined
for all its fields.For now the only way I can think of is to turn off and then turn on the Miniflare dev server. But it's not the same situation as some client going offline.
Is there a better way?
Why is it OK here to call initClientState
directly, while initShapes
is delayed until after the first sync?
(Also, LMK if this is/isn't a good place to ask questions)
We are experiencing a problem with this server where the peer-to-peer latency is unexpectedly high: you move a mouse on one tab and it takes awhile to show up on other other tab. Watching the server output I can see that what's happening is that something is going wrong with scheduling: the server calculates that the frame should play in the future and waits -- sometimes awhile! -- to play it.
It seems to get worse the longer the client is connected. I regularly see the server wait a full second which makes the experience pretty bad.
Cloudflare Workers have hobbled clocks for security reasons: https://developers.cloudflare.com/workers/learning/security-model#there-is-no-fix-for-spectre. It seems very likely that the behavior observed is related to this somehow, but I can't figure out what's going wrong yet.
It only works when using Miniflare. But once deployed it does not work (try https://replidraw-do.vercel.app in Safari) and the console says:
[Debug] roomID=LWyzh- req=p4twbolFsCwS-qfRaB9Y5 โ "Skipping duplicate connect request" (598-0f8f78f483115daa.js, line 1)
Could be something on how Safari deals with WebSocket and https?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.