Skip to content

Instantly share code, notes, and snippets.

@amitsnyderman
Created May 2, 2018 19:15
Show Gist options
  • Select an option

  • Save amitsnyderman/adb6bee883b1b6152e89e5241f106613 to your computer and use it in GitHub Desktop.

Select an option

Save amitsnyderman/adb6bee883b1b6152e89e5241f106613 to your computer and use it in GitHub Desktop.
Stitch AR workshop notes: 20180503
  • “stitcha” name is complementary name to builda
  • Goals
    • Reduce the number of asset requests on a page
    • Question the benefits of reducing the number of asset requests versus reducing the bytes for CSS (removing unused CSS)
  • Traffic might have opinions about what the path is (/ac/)
  • Why Google App Engine?
    • Similar pathway as Photos stack read pathway (GAE, GCP)
    • Has a lot of nice features for deploying
    • However, Security at point had concerns with GAE
  • Caching is at the level of CDN
  • In asset clusters, assets are time stamped and are removed as we need space
  • buildaCSS skips files if they are unchanged
  • There are internal apps that use pinned versions of the Toolkit CSS
  • Toolkit asset could be static whereas the rest of assets would be dynamic
  • Request URI limit is pretty large so we don’t think we’ll hit it. Also when compiling, we can truncate bytes/chars.
  • Unresolved Qs: Why do this? Why Node? Why not modPHP in asset clusters?
    • Having a looser architecture sounds compelling (maybe for moving to the cloud?)
    • All assets should still exist in the asset cluster so if Stitcha fails, we can still use the asset cluster
  • Probably leave the service dumb and remove Toolkit at the Neu-level
  • This introduces a new thing that fails. Any weird cases where one component failing?
    • If Stitcha fails, we can do something at the proxy layer so that it redirects straight to the asset cluster. But, either can returns a 404.
  • Scaling?
    • There is manual scaling, auto scaling, health checks API. It can scale up and down.
    • Curious, how fast can it scale up?
  • Reverse fear: Right now, we only push pre-bundled files. With this, we need to push more standalone files. Can we run out of space on the - asset cluster? Our current solution doesn’t sound sustainable.
    • If there additional # files but same storage space, how does that work?
      • We can compress singular large files down smaller than if it was spaced out in more # of files
  • We pay per request at GAE/GCP, consider what our SLA is
  • Are product engs going to run Stitcha on their VMs?
    • Maybe. We can have it off in dev.
    • If we want DEV to mirror PROD, we can turn it on via chef.
  • Debugging in production and source maps?
    • We do not have that support
  • Will Stitcha work with “new thing” (ex. Webpack)?
    • At the moment, not thinking about it.
    • Need to talk about how they will intersect
  • Initially, thought about doing this for CSS first, then JS. But that was before Webpack talks
  • Right now we use Neu to get engineers have best practices. Willing to rip out Stitcha once we have best practices engrained in our culture - and if the “new thing” is a better solution.
  • How do product teams implement new Neu Views and test the assets for both experiences?
    • Unsure. Homepage team is down to prototype that
    • Will have a config flag for transitioning
    • Stitcha is optional and not required
    • Could use Toolkit as a test for both experiences
  • Call getCSS files, aggregate and de-dupe them, builds the URL, and puts it in the HTML. The product engineer will not need to know these - details.
    • Right now, there are no exclusions from getCSS.
    • Do we need more controls here for optimal caching?
    • Do we want breakpoint/media-query specific files?
      • Artifact of our existing system which will require a refactor
  • Browser-level caching? Is there a performance regression?
    • All of these is predicated on being on Toolkit/Neu
    • Might be resolved with modularizing work of Toolkit
      • Breakdown Toolkit into components
      • Determine core components and keep them dynamic so that it is highly cach-able
      • Less frequency used and page-specific CSS should be the parts that are dynamic
      • This work might be done before/simultaneously with Stitcha
    • Without Stitcha, we can’t answer the question b/c we need to experiment
  • Who owns pager / alerts for asset clusters? Stitcha?
    • Might be web platform
    • Line between FES and Web-Platform are getting blurry
    • Maybe pool together
  • Can we be prone to attacks to overload our systems and cost us money?
    • Proxies in front of stitch should throttle this
  • Current state?
    • Right now, it is in GAE sandbox
    • Still need to test load.
    • Need to figure out deployment process for prod
    • Then experiment!
  • Do we need to educate the company and have open AR?
    • Maybe after load / Proof of concept testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment