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
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
180
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
260
Lambdaと地方とコミュニティ
miu_crescent
2
370
AIチャットボット開発への生成AI活用
ryomrt
0
170
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
550
Application Development WG Intro at AppDeveloperCon
salaboy
0
200
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
190
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Building Your Own Lightsaber
phodgson
103
6.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
A Philosophy of Restraint
colly
203
16k
Faster Mobile Websites
deanohume
305
30k
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]