Giter Site home page Giter Site logo

reflect-draw's People

Contributors

aboodman avatar arv avatar cesara avatar gitter-badger avatar grgbkr avatar iamraffe avatar ingar avatar jason-curtis avatar mrbbot avatar othree avatar phritz avatar slightlytyler avatar thatneat avatar thezjy avatar threepointone avatar voronianski avatar wassgha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reflect-draw's Issues

We should autodeploy the worker to Cloudflare!

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?

Need to make reps resuable

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:

  1. CF Workers don't allow eval or dynamic import for security reasons
  2. The Worker Runtime instantiates the Durable Object, not the user's app, so parameterizing the class / dependency injection doesn't work

I think that ideally what I'd like is something like:

  1. npm install --save-dev reps in your application
  2. the user does something (env var, runs a script ... something else?) that configures reps to get the mutators from the parent application.
  3. Thereafter, whenever the user builds reps (either via npm run dev, npm run build, wrangler publish, etc) it uses the configured mutators from step 2.

Simulating client offline is tricky during development

  • Using Chrome Devtools' "offline" does not work, because it doesn't work on WebSocket and now everything runs through WebSocket
  • Accessing localhost from another device one the network does not work, because SubtleCrypto thinks it's insecure and will return 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?

Rip out current scheduling code - it's not working well

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.