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
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
The Rise of LLMOps
asei
7
1.4k
いざ、BSC討伐の旅
nikinusu
2
780
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
990
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
SSMRunbook作成の勘所_20241120
koichiotomo
2
130
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
What's new in Ruby 2.0
geeforr
343
31k
The Language of Interfaces
destraynor
154
24k
Agile that works and the tools we love
rasmusluckow
327
21k
Scaling GitHub
holman
458
140k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Adopting Sorbet at Scale
ufuk
73
9.1k
4 Signs Your Business is Dying
shpigford
180
21k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
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]