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
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
130
バクラクにおける可観測性向上の取り組み
yuu26
3
410
Java x Spring Boot Warm up
kazu_kichi_67
2
490
オニオンアーキテクチャで実現した 本質課題を解決する インフラ移行の実例
hryushm
14
3k
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
140
ガバメントクラウド単独利用方式におけるIaC活用
techniczna
3
270
端末が簡単にリモートから操作されるデモを通じて ソフトウェアサプライチェーン攻撃対策の重要性を理解しよう
kitaji0306
0
170
IaC運用を楽にするためにCDK Pipelinesを導入したけど、思い通りにいかなかった話
smt7174
1
110
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
730
マネジメント視点でのre:Invent参加 ~もしCEOがre:Inventに行ったら~
kojiasai
0
460
Jr. Championsになって、強く連携しながらAWSをもっと使いたい!~AWSに対する期待と行動~
amixedcolor
0
190
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Navigating Team Friction
lara
183
14k
Music & Morning Musume
bryan
46
6.1k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Visualization
eitanlees
144
15k
GraphQLとの向き合い方2022年版
quramy
43
13k
Building Your Own Lightsaber
phodgson
102
6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
Faster Mobile Websites
deanohume
304
30k
Code Reviewing Like a Champion
maltzj
519
39k
Designing Experiences People Love
moore
138
23k
A designer walks into a library…
pauljervisheath
202
24k
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]