Flexible Architectures for Web Performance Presentation
SergeyChernyshev
10 views
34 slides
May 24, 2024
Slide 1 of 34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
About This Presentation
Today in the web performance space we have a lot of technologies that were invented to speed up various parts of the applications. Many of them are successful when they can be just put in place without changing anything in the applications or at least with minimal changes, like network protocols or ...
Today in the web performance space we have a lot of technologies that were invented to speed up various parts of the applications. Many of them are successful when they can be just put in place without changing anything in the applications or at least with minimal changes, like network protocols or image formats.
However some more advanced features like progressive web apps, edge cache for HTML responses, edge workers and few other features like that are hard to implement in the regular web applications incrementally.
To successfully implement them today, applications have to be built with these technologies in mind from the beginning. This rigidity is something that blocks a lot of innovation from reaching the real world applications that desperately need to get faster.
In this talk, Sergey Chernyshev discusses several of these technologies, highlight the importance of Flexible Architectures and proposes a radical idea of Borderless Computation as a possible solution for the problem.
Size: 2.08 MB
Language: en
Added: May 24, 2024
Slides: 34 pages
Slide Content
Flexible
Architectures
Sergey Chernyshev
NY Web Performance Meetup
May 21, 2024
Rover
(not to scale)
Interplanetary Computation
Satellite
Mars Base
(not to scale)
Rover
Interplanetary Computation
Orbit Station
Moon
Base
Satellite
Rover
Mars
Base
“Cloud”
Mission
Control
Center
Satellites
Latency
(not to scale)
Interplanetary Computation
Close to Earth
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
Close to Earth
Server
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
Close to Earth
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Main Thread
Close to Earth
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
More Layers: CDN
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Serverless
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Services
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Edge Compute
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Interconnected
Main Thread
Server
Service
Worker
Web
Worker
Rendering
What plant is it?
Check it!
Scan the plant with
your camera and
click the button to…
JS
Flexible
Architectures
Why do we need it?
today’s architectures are rigid
All or Nothing
●Having many architectures is rarely possible
●Search is usually an exception
●“Everything is dynamic” is a usual excuse
New Technologies are Hard
●Introducing new workflows is hard
●SPAs were a decade in the making
●Static Generators are often perceived
as “Static is NOT Dynamic”
●PWAs, Edge Compute and etc are still
a mystery to most developers
Slower without Re-Architecture
Slower without Re-Architecture
…based on my experience…
Today’s
Architectures
web-specific
●PHP
●Java
●Python
●NodeJS
Web Pages
CC BY atoach
https://www.flickr.com/photos/atoach/25370605889
Single Page Applications (SPA)
●CSR - Browser
●SSR - Server
●Hydration
CC BY Studio Iloinen Liftari
https://commons.wikimedia.org/wiki/File:Flamingo_Spa_%26_Wellness.jpg
Where?
Static Generators
Where? When?
CC BY JonahPtak
https://www.deviantart.com/jonahptak/art/MCU-T
imeline-Thing-v1-1b-2020-05-14-864229532
Service Workers and PWAs
●Frameworks?
●Who manually
rolled Service
Worker code?
CC BY Diego González-Zúñiga
https://github.com/webmaxru/progressive-web-apps-logo
Web Workers
●What’s your use case?
New Architectures
●Every few years
●.
●.
●.
●.
●.
●.
●.
●.
●.
●.
●
NEW!
Borderless Code
you don’t care where it runs
DEMO
https://github.com/BorderlessFramework
not much to demo
No Framework
Necessary
you can do it without a framework
What should I do today?
●Use progressive enhancement
●Breakdown apps into parts / layers with different
requirements
●Make architecture choices appropriate to those
requirements
●Don’t make rigid choices that are hard to change
●Use more declarative configurations outside of core logic
Notable Developments
●Universal Javascript (already old)
●Event-driven data (also old)
●WASM execution environments (Fastly)
●Edge services - distributed by default, scalable, etc
●Cross-compatible frameworks like Hono
●Framework-defined Infrastructure (Vercel)
●Edge RPC abstractions (Cloudflare)
●RUM and distributed tracing
●AI (everyone)