Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Launching into Orbit.js
Search
Sibiu Web Meetup
November 23, 2019
Programming
0
42
Launching into Orbit.js
Sibiu Web Meetup
November 23, 2019
Tweet
Share
More Decks by Sibiu Web Meetup
See All by Sibiu Web Meetup
Git commit messages and PR etiquette
sibiuwebmeetup
0
16
Introduction to Cypress
sibiuwebmeetup
0
13
Web Application Security
sibiuwebmeetup
0
69
Zero Coupled Microservices
sibiuwebmeetup
0
8
Ethereum: Quick & Dirty
sibiuwebmeetup
0
75
Automation in Code Reviews
sibiuwebmeetup
0
96
useState(props.title)
sibiuwebmeetup
0
82
Introduction into ClojureScript
sibiuwebmeetup
0
34
Static website generators
sibiuwebmeetup
0
28
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
200
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
500
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
170
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
180
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
300
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
4
940
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
5
2k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
400
Macとオーディオ再生 2024/11/02
yusukeito
0
320
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Rails Girls Zürich Keynote
gr2m
93
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
How STYLIGHT went responsive
nonsquared
95
5.2k
What's in a price? How to price your products and services
michaelherold
243
12k
How GitHub (no longer) Works
holman
310
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
A better future with KSS
kneath
238
17k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Transcript
LAUNCHING INTO ORBIT.JS
mercury ABOUT ME Stamate Cosmin @monovertex
venus ABOUT ORBIT.JS • Overcharged ORM • Framework for interacting
with and synchronizing various data sources • Offline/online transitions
earth INSPIRATION • “Ember in Orbit - Building apps for
Outer Space Connectivity” • Miguel Camba @cibernox • Ember{{fest}} 2019 • https://youtu.be/ b7-VegI-WX8
mars ORBIT.JS PHILOSOPHY • Everything is interchangeable • Incremental complexity
• Easy wiring • Glue APIs and strategies together with minimal friction
jupiter MAIN DIRECTIVES
io (jupiter) GOALS • Optimistic/pessimistic strategies • Plug n’ play
• Client-first • Branching/merging • Change tracking => undo/redo support
europa (jupiter) CONSTRAINTS • Disparate data sources • Compatible interfaces
• Normalized data • Notifications and change tracking
saturn PRIMITIVES
mimas (saturn) RECORD • Data in normalized form • Has
an id • Has a type • It can include other attributes or relationships
enceladus (saturn) SCHEMA • The entirety of Models • Models
describe a record type • Think of Models as classes, records as instances and of schema as domain/project
dione (saturn) SOURCE • Sources are providers and managers of
data • Each source understands how data of any given schema should be stored in their corresponding backend
tethys (saturn) TRANSFORM • A set of Operations • Operations
describe a mutation on a record • Transforms are atomic • E.g. a new record, an attribute update, a relationship deletion
rhea (saturn) QUERY • An expression to retrieve specific data
• Same meaning as in traditional database systems • Query builder
iapetus (saturn) LOG TASK BUCKET • Log: history of transforms
• Task: handle actions in async or synchronous manners • Bucket: a database backup for database state; holds transient information
hyperion (saturn) COORDINATOR • Higher order component • The Coordinator
dictates strategies • Handles wiring between a set of sources • Declarative
uranus DATA SOURCES
ariel (uranus) MEMORY • @orbit/memory • Tab-specific • Lives in
memory allocated for the JS process • Immutable data structures • Cheap forking/merging
miranda (uranus) JSONAPI • @orbit/jsonapi • JSON:API is a set
of conventions for building APIs with data formatted as JSON objects • Modern standard that allows for better integration
umbriel (uranus) INDEXEDDB • @orbit/indexeddb • Client-side database • Provides
a persistent, domain-specific structured storage solution • Especially useful for PWAs, if available
titania (uranus) LOCAL STORAGE • @orbit/local-storage • Synchronous storage •
Designed for smaller amounts of data • Can be a fallback from indexeddb, but performance can be impacted
oberon (uranus) OTHER SOURCES • Adapters for other sources can
be easily implemented • Custom REST APIs • orbitdb/orbit-db - peer-to-peer database • Google Drive - a spreadsheet or a JSON file • Local file system (nodejs/native apps)
neptune Q&A
pluto THANK YOU!