Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Realm advanced topics and demo

Realm
June 12, 2017

Realm advanced topics and demo

Realm advanced topics and demo
Realm World Tour Seoul June 8th 2017

Realm

June 12, 2017
Tweet

More Decks by Realm

Other Decks in Technology

Transcript

  1. ݒ਋ ௾ B+ ౟ܻ৬ MVCC • ݒ਋ ௾ B+ ౟ܻܳ

    ஸۢ ӝળਵ۽ ҳࢿ. • ߸҃ ࢎ೦ਸ MVCC(Multi Version Concurrency Control)۽ ҙܻ.
  2. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় [email protected] 1004 2 ੐਷઱

    [email protected] 1005 3 ѱ੉எ [email protected] 1006 4 ш޹਋ [email protected] 1007 ੹ా੸ੋ ؘ੉ఋ߬੉झח ೠ઴ ঀ ੷੢೤פ׮. -> நए ޷झ
  3. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় [email protected] 1004 2 ੐਷઱

    [email protected] 1005 3 ѱ੉எ [email protected] 1006 4 ш޹਋ [email protected] 1007 ೠ઴ ঀ ੷੢ೞݶ ਊ۝੉ ݏ૑ ঋইࢲ ಁ٬ب ֍যঠ ೤פ׮.
  4. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় [email protected] 1004 2 ੐਷઱

    [email protected] 1005 3 ѱ੉எ [email protected] 1006 4 ш޹਋ [email protected] 1007 ೠ઴ঀ ੷੢ೞݶ நए൤౟ਯ੉ ֫Ҋ ಁ٬੉ ೙ਃহযਃ.
  5. ॳӝ ౟ے੥࣌਷ ࢜ झշࢫਸ ٟ݅פ׮. A B C D F

    G E H I E’ H’ C’ A’ Root ߡ੹ 2
  6. ॳӝ ઺ীب ੍ӝо оמ೤פ׮. A B C D F G

    E H I E’ H’ C’ A’ ߡ੹ 2 ॳӝ઺ ߡ੹ 1 ੍ӝ ઺
  7. ੍ӝח ߓఋ੸੉૑ ঋणפ׮. A B C D F G E

    H I E’ H’ C’ A’ ߡ੹ 2 ॳӝ઺ ਬ੷ 2: ߡ੹ 1 ੍ӝ ઺ ਬ੷ 1: ߡ੹ 1 ੍ӝ ઺
  8. উ੹೤פ׮ A B C D F G E H I

    E’ C’ A’ Root ߡ੹ 1 ੘ࢿ ઺ ೐ܻૉ ߊࢤ ߡ੹ 1਷ উ੹ ನੋఠب ৈ੹൤ ߡ੹ 1ਵ۽
  9. пӝ ׮ܲ झۨ٘ ۽ஸਸ о૘פ׮. 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
  10. ഒۆझ۞਎ ࣻ ੓ח झۨ٘ ۽ஸ • ߓఋ੸੉૑ ঋѱ ബਯ੸ਵ۽ ੍ӝ,

    ॳӝܳ ೞӝ ਤ೧
 ݫఋ ؘ੉ఠܳ झۨ٘ ױਤ۽ ੷੢.
 • ݫݽܻ ݗਵ۽ োѾػ ؘ੉ఠח ݣ౭ झۨ٘۽ ҕਬغҊ ੓਺.
 • ׮݅ झۨ٘ ۽ஸ۽ ৌܽ Realm, RealmList, RealmResults, RealmObject ё୓ܳ ׮ܲ झۨ٘۽ ੹׳ೡ ࣻ হ਺.
 • ׮ܲ झۨ٘ীࢲ ௪ܻܳ ೞݶ ݣ౭ झۨ٘ ੗ܐ ҕਬ ؋ী ߄۽ ੍਺.
  11. җѢ ಕ੉झ࠘ জ੄ ޙઁ੼ • JSON ੋ௏٬җ ٣௏٬ী ݆਷ ܻࣗझܳ

    ೲ࠺.
 • ࢎਊغ૑ ঋ਷ ؘ੉ఠب ٣௏٬ਸ ೧ࢲ Java ё୓ী ׸ওযঠ ೣ.
 • ೧Ѿ଼: ҳӖ੄ FlatBuffersܳ ॳ੗.
  12. ੹ా੸ੋ ࣻച (Hydrate) • ؘ੉ఠ߬੉झীࢲ ੗ܐܳ ޙ੗ৌ੉ա ӝఋ ੋ௏٬ ػ

    ഋక۽ оઉ২פ׮.
 • ౵य ഑਷ ٣௏٬ਸ ೧ࢲ оઉৡ ؘ੉ఠܳ ކٶ Java ё୓ী ׸ইસפ׮.
  13. CPU৬ ݫݽܻܳ խ࠺ೞח ࣻച • ؘ੉ఠ߬੉झীࢲ ੗ܐܳ ޙ੗ৌ੉ա ӝఋ ੋ௏٬ػ

    ഋక۽ оઉ২פ׮. • ॳ૑ب ঋ਷ ؘ੉ఠب ׮ оઉয়Ҋ ߸ജө૑ Ѣଢ଼যਃ.
 • ౵य ഑਷ ٣௏٬ਸ ೧ࢲ оઉৡ ؘ੉ఠܳ ކٶ Java ё୓੄ ೙٘ ׸ই સפ׮. • ॳ૑ب ঋਸ ؘ੉ఠܳ ੹ࠗ ׮द ߸ജೞҊ ކٶ ೙٘ী ׸ওযਃ.
  14. 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();

  15. • Realmب Zero copy അ੤ rowী ؀ೠ ੿ࠁ ஸۢҗ ۽਋੄

    ੋؙझী null ഑਷ ޙ੗ৌਸ ੷੢ पઁ ؘ੉ఠо ׸ӟ ప੉࠶ ۽਋৬ ஸۢਸ ੉ਊ೧ࢲ झ౟݂ਸ о૑Ҋ ১
  16. ؘ੉ఠ੄ ൒ܴ݅ ࢤпೞۄ. 1. ௿ۄ੉঱౟ب ੉߮౟ ӝ߈੄ ೐۽Ӓې߁. 2. ࢲߡ

    ࢎ੉٘(RMP)ب ੉߮౟ ӝ߈੄ ೐۽Ӓې߁. ௿ۄ੉঱౟
 ؘ੉ఠ ߸҃ ࢲߡ ࢎ੉٘
 ؘ੉ఠ ߸҃ ࢲߡ
 ೩ٜ۞ ഐ୹ ௿ۄ੉঱౟
 ೩ٜ۞ ഐ୹
  17. ߸҃ ҙܻܳ ਤೠ ੉߮౟ ܻझց ١۾ ࢲߡա জ੄ ׮ܲ ࠗ࠙ীࢲ

    ؘ੉ఠо ߸҃غ঻ਸ ٸ ܻझցܳ ഐ୹. (iOS੄ ҃਋ীח Key-Value Observationب ૑ਗ.)