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
Realm advanced topics and demo
Search
Realm
June 12, 2017
Technology
0
2k
Realm advanced topics and demo
Realm advanced topics and demo
Realm World Tour Seoul June 8th 2017
Realm
June 12, 2017
Tweet
Share
More Decks by Realm
See All by Realm
WWDC 2017 Review
realm
0
2.1k
Xcode shortcuts
realm
0
4.7k
Self Branding with GitHub
realm
0
4.3k
Realm Mobile Platform overview and demo
realm
0
2k
Realm introduction Seoul meetup 10
realm
0
2.1k
Stuart Hall: How I got 2.3 Million App Downloads
realm
0
1.9k
James Majors: What the Swiftly Func?
realm
1
4.2k
Simina Pasat: Continuous everything for iOS apps
realm
0
600
James Majors: What making Records taught me about writing code
realm
0
1.4k
Other Decks in Technology
See All in Technology
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
250
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
520
20241220_S3 tablesの使い方を検証してみた
handy
3
330
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
AIのコンプラは何故しんどい?
shujisado
1
190
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
370
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
Optimising Largest Contentful Paint
csswizardry
33
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Gamification - CAS2011
davidbonilla
80
5.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
What's in a price? How to price your products and services
michaelherold
243
12k
Site-Speed That Sticks
csswizardry
2
190
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
The Cult of Friendly URLs
andyhume
78
6.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Transcript
Part 3: Advanced topics and demo Leonardo YongUk Kim (
[email protected]
)
• MVCC (RMD) • Zero Copy (RMD) • Event Handling
(RMD + RMP) • RMP Demo (RMP)
MVCC: Multi Version Concurrency Control
ݒ B+ ܻ৬ MVCC • ݒ B+ ܻܳ
ஸۢ ӝળਵ۽ ҳࢿ. • ߸҃ ࢎ೦ਸ MVCC(Multi Version Concurrency Control)۽ ҙܻ.
ݒ B+ ܻ … ప࠶ ܖ ஸۢਵ۽ࠗఠ ؘఠ
ਫ਼Ӭ݅ਃ? ৵ ஸۢࠗఠભ? … ప࠶ ܖ ஸۢਵ۽ࠗఠ ؘఠ
ੋؙझ ܴ ݫੌ ചߣഐ 1 ٣ܻয়
[email protected]
1004 2
[email protected]
1005 3 ѱஎ
[email protected]
1006 4 ш
[email protected]
1007
ੋؙझ ܴ ݫੌ ചߣഐ 1 ٣ܻয়
[email protected]
1004 2
[email protected]
1005 3 ѱஎ
[email protected]
1006 4 ш
[email protected]
1007 ܴਵ۽ ઑഥ೮णפ.
ੋؙझ ܴ ݫੌ ചߣഐ 1 ٣ܻয়
[email protected]
1004 2
[email protected]
1005 3 ѱஎ
[email protected]
1006 4 ш
[email protected]
1007 ాੋ ؘఋ߬झח ೠ ঀ פ. -> நए झ
ੋؙझ ܴ ݫੌ ചߣഐ 1 ٣ܻয়
[email protected]
1004 2
[email protected]
1005 3 ѱஎ
[email protected]
1006 4 ш
[email protected]
1007 ೠ ঀ ೞݶ ਊ ݏ ঋইࢲ ಁ٬ب ֍যঠ פ.
ੋؙझ ܴ ݫੌ ചߣഐ 1 ٣ܻয়
[email protected]
1004 2
[email protected]
1005 3 ѱஎ
[email protected]
1006 4 ш
[email protected]
1007 ೠঀ ೞݶ நएਯ ֫Ҋ ಁ٬ ਃহযਃ.
ߡ زदઁয(MVCC) A B C D F G E H
I ߡ 1 Root
ॳӝ ے࣌ ࢜ झշࢫਸ ٟ݅פ. A B C D F
G E H I E’ H’ C’ A’ Root ߡ 2
ॳӝ ীب ੍ӝо оמפ. A B C D F G
E H I E’ H’ C’ A’ ߡ 2 ॳӝ ߡ 1 ੍ӝ
੍ӝח ߓఋ ঋणפ. A B C D F G E
H I E’ H’ C’ A’ ߡ 2 ॳӝ ਬ 2: ߡ 1 ੍ӝ ਬ 1: ߡ 1 ੍ӝ
উפ A B C D F G E H I
E’ C’ A’ Root ߡ 1 ࢿ ܻૉ ߊࢤ ߡ 1 উ ನੋఠب ৈ ߡ 1ਵ۽
пӝ ܲ झۨ٘ ۽ஸਸ оפ. A B C D F
G E H I E’ H’ C’ A’ ਬ 3:ߡ 2 ॳӝ ਬ 2: ߡ 1 ੍ӝ ਬ 1: ߡ 1 ੍ӝ झۨ٘ ۽ஸ 1: ߡ 1 झۨ٘ ۽ஸ 2: ߡ 1 झۨ٘ ۽ஸ 3: ߡ 1 -> 2
ഒۆझ۞ ࣻ ח झۨ٘ ۽ஸ • ߓఋ ঋѱ ബਯਵ۽ ੍ӝ,
ॳӝܳ ೞӝ ਤ೧ ݫఋ ؘఠܳ झۨ٘ ױਤ۽ . • ݫݽܻ ݗਵ۽ োѾػ ؘఠח ݣ౭ झۨ٘۽ ҕਬغҊ . • ݅ झۨ٘ ۽ஸ۽ ৌܽ Realm, RealmList, RealmResults, RealmObject ёܳ ܲ झۨ٘۽ ׳ೡ ࣻ হ. • ܲ झۨ٘ীࢲ ௪ܻܳ ೞݶ ݣ౭ झۨ٘ ܐ ҕਬ ؋ী ߄۽ ੍.
Zero copy
җѢ ಕझ࠘ জ ޙઁ • JSON ੋ٬җ ٣٬ী ݆ ܻࣗझܳ
ೲ࠺. • ࢎਊغ ঋ ؘఠب ٣٬ਸ ೧ࢲ Java ёী ওযঠ ೣ. • ೧Ѿ଼: ҳӖ FlatBuffersܳ ॳ.
ాੋ ࣻച (Hydrate) • ؘఠ߬झীࢲ ܐܳ ޙৌա ӝఋ ੋ٬ ػ
ഋక۽ оઉ২פ. • य ٣٬ਸ ೧ࢲ оઉৡ ؘఠܳ ކٶ Java ёী ইસפ.
CPU৬ ݫݽܻܳ խ࠺ೞח ࣻച • ؘఠ߬झীࢲ ܐܳ ޙৌա ӝఋ ੋ٬ػ
ഋక۽ оઉ২פ. • ॳب ঋ ؘఠب оઉয়Ҋ ߸ജө Ѣଢ଼যਃ. • य ٣٬ਸ ೧ࢲ оઉৡ ؘఠܳ ކٶ Java ё ٘ ই સפ. • ॳب ঋਸ ؘఠܳ ࠗ द ߸ജೞҊ ކٶ ٘ী ওযਃ.
FlatBuffers • Facebook জীࢲ FlatBuffers (Google)ਸ بੑೞৈ ਬݺ೧.
Zero copy public long id() { int o = __offset(4);
return o != 0 ? bb.getLong(o + bb_pos) : 0; } public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } ByteBuffer bb = ByteBuffer.wrap(bytes); MyObject obj = MyObject.getRootAsMyObject(bb); long id = obj.id(); String name = obj.name();
• Realmب Zero copy അ rowী ೠ ࠁ ஸۢҗ ۽
ੋؙझী null ޙৌਸ पઁ ؘఠо ӟ ప࠶ ۽৬ ஸۢਸ ਊ೧ࢲ झ݂ਸ оҊ ১
• RealmProxyObject name setName getName RealmObject realmGet$name realmSet$name RealmProxyObject •
Annotation Processing Tool সਸ न೧સפ.
Event Handling
ؘఠ ܴ݅ ࢤпೞۄ. 1. ۄب ߮ ӝ߈ ۽Ӓې߁. 2. ࢲߡ
ࢎ٘(RMP)ب ߮ ӝ߈ ۽Ӓې߁. ۄ ؘఠ ߸҃ ࢲߡ ࢎ٘ ؘఠ ߸҃ ࢲߡ ೩ٜ۞ ഐ ۄ ೩ٜ۞ ഐ
ۄ ؘఠ ߸҃ ࢲߡ ࢎ٘ ؘఠ ߸҃ ࢲߡ ೩ٜ۞ ഐ
ۄ ೩ٜ۞ ഐ
ۄ ؘఠ ߸҃ ࢲߡ ࢎ٘ ؘఠ ߸҃ ࢲߡ ೩ٜ۞ ഐ
ۄ ೩ٜ۞ ഐ
Good bye REST!
RMP Demo
None
Code
জ ࣗѐ (Scanner)
ࢎա ଼ਸ झப೧ࢲ
IBM Watson ࢲ࠺झܳ ج۰ࢲ…
೧ࢳػ Ѿҗܳ ߈ജפ.
None
ࢎਊо ࢎਸ ନणפ.
۽ஸ DBী زӝചؾפ.
۽ஸ DB৬ ࢲߡо زӝച
ࢲߡ ߮ ೩ٜ۞о ৌ݀פ
߮ ೩ٜ۞о ৲टী ܳ ׳פ.
৲ट ܳ ࠙ࢳפ -_-b
ܻ Ѿҗо ߮ ೩ٜ۞ীѱ ܻఢ
߮ ೩ٜ۞о DBܳ সؘ פ
ࢲߡ৬ ۽ஸ DBо زӝച
ۄ ߸҃ ܻझց ഐغҊ UIܳ јनפ
Scanner জ ࣗ https://github.com/realm-demos/realm-scanner
[email protected]
ݽ؛ Scanner, Swift
None
nullਸ ೲਊೞ ঋणפ.
?۽ աח ఋੑ null ೲਊ
ݽ؛ Scanner, Java
None
RealmObject ёܳ ࢚ࣘ.
nullਸ ೲਊೞ ঋח ٘.
ળ getters/setters ࣻח ইתפ.
ੋૐ (Java)
None
ই٣, ಁझਕ٘ܳ ׳೧ࢲ SyncCredetialsܳ ٟ݅פ.
۽Ӓੋ
ੋૐ ࢲߡ ҃۽
ࢿҕ
Realm ࢸ
ؘఠ ߬झ ҃۽
Realm ੋझఢझ
Realm ੋझఢझܳ ੜ ײद. (ۨಌ۠झ )
ੋૐ (Swift)
۽Ӓੋਸ פ.
Realm ࢸ
Realm ੋझఢझ
নೠ ੋૐ (Java)
None
নೠ ੋૐ (Swift)
None
ॳӝ
None
ॳӝী݅ ے࣌ ࢤࢿ
ݽ؛ਸ ਊೞৈ ੋझఢझ ࢤࢿ
Scan ੋझఢझ ࢚క ࣻ
߸҃ ҙܻܳ ਤೠ ߮ ܻझց ١۾ ࢲߡա জ ܲ ࠗ࠙ীࢲ
ؘఠо ߸҃غਸ ٸ ܻझցܳ ഐ. (iOS ҃ীח Key-Value Observationب ਗ.)
੍ӝ
ё оઉয়ӝ
ఠ݂җ ۳
߸҃ ঌܿ (Java)
߸҃ػ ёо ੋ۽ ׳ؽ.
߸҃ ঌܿ (Swift)
iOS ળ Key-Value Observation
߸҃ ঌܿ (ࢲߡ)
None
ࢲߡ ߮ ೩ٜ۞ܳ ٜ݅ ٸח ѐ షਸ ਊ೧ࢲ ۽Ӓੋ.
ߑӘ ݅ٚ admin_user৬ NOTIFIER_PATH ҃۽, ࢚ױ ߔਵ۽ ܻझցܳ ١۾.
change_event নೠ ࣘࢿਸ ਊ.
Realm ੋझఢझ
ੌ۲ ࢚ ё.
ੋؙझо ୶о, ઁ, ߸҃ ਵ۽ ࣁೞѱ ׳. Fine-grained notifications.
Thank you
[email protected]
realm.io/kr
[email protected]