Realm advanced topics and demo

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
June 12, 2017

Realm advanced topics and demo

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

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

June 12, 2017
Tweet

Transcript

  1. Part 3:
 Advanced topics and demo Leonardo YongUk Kim (lk@realm.io)

  2. • MVCC (RMD) • Zero Copy (RMD) • Event Handling

    (RMD + RMP) • RMP Demo (RMP)
  3. MVCC: Multi Version Concurrency Control

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

    ஸۢ ӝળਵ۽ ҳࢿ. • ߸҃ ࢎ೦ਸ MVCC(Multi Version Concurrency Control)۽ ҙܻ.
  5. ݒ਋ ௾ B+ ౟ܻ … ప੉࠶ ܖ౟ ஸۢਵ۽ࠗఠ ؘ੉ఠ

  6. ਫ਼Ӭ݅ਃ? ৵ ஸۢࠗఠભ? … ప੉࠶ ܖ౟ ஸۢਵ۽ࠗఠ ؘ੉ఠ

  7. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় d@realm.io 1004 2 ੐਷઱

    da@realm.io 1005 3 ѱ੉எ g@realm.io 1006 4 ш޹਋ 1@realm.io 1007
  8. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় d@realm.io 1004 2 ੐਷઱

    da@realm.io 1005 3 ѱ੉எ g@realm.io 1006 4 ш޹਋ 1@realm.io 1007 ੉ܴਵ۽ ઑഥ೮णפ׮.
  9. ੋؙझ ੉ܴ ੉ݫੌ ੹ചߣഐ 1 ٣஠೐ܻয় d@realm.io 1004 2 ੐਷઱

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

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

    da@realm.io 1005 3 ѱ੉எ g@realm.io 1006 4 ш޹਋ 1@realm.io 1007 ೠ઴ঀ ੷੢ೞݶ நए൤౟ਯ੉ ֫Ҋ ಁ٬੉ ೙ਃহযਃ.
  12. ׮઺ߡ੹ زदઁয(MVCC) A B C D F G E H

    I ߡ੹ 1 Root
  13. ॳӝ ౟ے੥࣌਷ ࢜ झշࢫਸ ٟ݅פ׮. A B C D F

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

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

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

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

    ॳӝܳ ೞӝ ਤ೧
 ݫఋ ؘ੉ఠܳ झۨ٘ ױਤ۽ ੷੢.
 • ݫݽܻ ݗਵ۽ োѾػ ؘ੉ఠח ݣ౭ झۨ٘۽ ҕਬغҊ ੓਺.
 • ׮݅ झۨ٘ ۽ஸ۽ ৌܽ Realm, RealmList, RealmResults, RealmObject ё୓ܳ ׮ܲ झۨ٘۽ ੹׳ೡ ࣻ হ਺.
 • ׮ܲ झۨ٘ীࢲ ௪ܻܳ ೞݶ ݣ౭ झۨ٘ ੗ܐ ҕਬ ؋ী ߄۽ ੍਺.
  19. Zero copy

  20. җѢ ಕ੉झ࠘ জ੄ ޙઁ੼ • JSON ੋ௏٬җ ٣௏٬ী ݆਷ ܻࣗझܳ

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

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

    ഋక۽ оઉ২פ׮. • ॳ૑ب ঋ਷ ؘ੉ఠب ׮ оઉয়Ҋ ߸ജө૑ Ѣଢ଼যਃ.
 • ౵य ഑਷ ٣௏٬ਸ ೧ࢲ оઉৡ ؘ੉ఠܳ ކٶ Java ё୓੄ ೙٘ ׸ই સפ׮. • ॳ૑ب ঋਸ ؘ੉ఠܳ ੹ࠗ ׮द ߸ജೞҊ ކٶ ೙٘ী ׸ওযਃ.
  23. FlatBuffers • Facebook জীࢲ FlatBuffers (Google)ਸ بੑೞৈ ਬݺ೧૗.

  24. 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();

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

    ੋؙझী null ഑਷ ޙ੗ৌਸ ੷੢ पઁ ؘ੉ఠо ׸ӟ ప੉࠶ ۽਋৬ ஸۢਸ ੉ਊ೧ࢲ झ౟݂ਸ о૑Ҋ ১
  26. • RealmProxyObject name setName getName RealmObject realmGet$name realmSet$name RealmProxyObject •

    Annotation Processing Tool੉ ੉ ੘সਸ ؀न೧સפ׮.
  27. Event Handling

  28. ؘ੉ఠ੄ ൒ܴ݅ ࢤпೞۄ. 1. ௿ۄ੉঱౟ب ੉߮౟ ӝ߈੄ ೐۽Ӓې߁. 2. ࢲߡ

    ࢎ੉٘(RMP)ب ੉߮౟ ӝ߈੄ ೐۽Ӓې߁. ௿ۄ੉঱౟
 ؘ੉ఠ ߸҃ ࢲߡ ࢎ੉٘
 ؘ੉ఠ ߸҃ ࢲߡ
 ೩ٜ۞ ഐ୹ ௿ۄ੉঱౟
 ೩ٜ۞ ഐ୹
  29. ௿ۄ੉঱౟
 ؘ੉ఠ ߸҃ ࢲߡ ࢎ੉٘
 ؘ੉ఠ ߸҃ ࢲߡ
 ೩ٜ۞ ഐ୹

    ௿ۄ੉঱౟
 ೩ٜ۞ ഐ୹
  30. ௿ۄ੉঱౟
 ؘ੉ఠ ߸҃ ࢲߡ ࢎ੉٘
 ؘ੉ఠ ߸҃ ࢲߡ
 ೩ٜ۞ ഐ୹

    ௿ۄ੉঱౟
 ೩ٜ۞ ഐ୹
  31. Good bye REST!

  32. RMP Demo

  33. None
  34. Code

  35. জ ࣗѐ
 (Scanner)

  36. ࢎ૓੉ա ଼ਸ झப೧ࢲ

  37. IBM Watson ࢲ࠺झܳ ج۰ࢲ…

  38. ೧ࢳػ Ѿҗܳ ߈ജ೤פ׮.

  39. None
  40. ࢎਊ੗о ࢎ૓ਸ ନणפ׮.

  41. ۽ஸ DBী زӝചؾפ׮.

  42. ۽ஸ DB৬ ࢲߡо زӝച

  43. ࢲߡ੄ ੉߮౟ ೩ٜ۞о ৌ݀פ׮

  44. ੉߮౟ ೩ٜ۞о ৲टী ੉޷૑ܳ ੹׳೤פ׮.

  45. ৲ट੉ ੉޷૑ܳ ࠙ࢳ೤פ׮ -_-b

  46. ୊ܻ Ѿҗо ੉߮౟ ೩ٜ۞ীѱ ܻఢ

  47. ੉߮౟ ೩ٜ۞о DBܳ সؘ੉౟ ೤פ׮

  48. ࢲߡ৬ ۽ஸ DBо زӝച

  49. ௿ۄ੉঱౟੄ ߸҃ ܻझց ഐ୹غҊ UIܳ јन೤פ׮

  50. Scanner জ ੷੢ࣗ https://github.com/realm-demos/realm-scanner name@realm.io

  51. ݽ؛ Scanner, Swift

  52. None
  53. nullਸ ೲਊೞ૑ ঋणפ׮.

  54. ?۽ ՘աח ఋੑ਷ null ೲਊ

  55. ݽ؛ Scanner, Java

  56. None
  57. RealmObject ё୓ܳ ࢚ࣘ.

  58. nullਸ ೲਊೞ૑ ঋח ೙٘.

  59. ಴ળ getters/setters ೙ࣻח ইתפ׮.

  60. ੋૐ (Java)

  61. None
  62. ই੉٣, ಁझਕ٘ܳ ੹׳೧ࢲ SyncCredetialsܳ ٟ݅פ׮.

  63. ۽Ӓੋ

  64. ੋૐ ࢲߡ ҃۽

  65. ࢿҕ

  66. Realm ࢸ੿

  67. ؘ੉ఠ ߬੉झ੄ ҃۽

  68. Realm ੋझఢझ

  69. Realm ੋझఢझܳ ੜ ײ਻द׮.
 (ۨಌ۠झ ஠਍౟)

  70. ੋૐ (Swift)

  71. ۽Ӓੋਸ ೤פ׮.

  72. Realm ࢸ੿

  73. Realm ੋझఢझ

  74. ׮নೠ ੋૐ (Java)

  75. None
  76. ׮নೠ ੋૐ (Swift)

  77. None
  78. ॳӝ

  79. None
  80. ॳӝী݅ ౟ے੥࣌ ࢤࢿ

  81. ݽ؛ਸ ੉ਊೞৈ ੋझఢझ ࢤࢿ

  82. Scan ੋझఢझ੄ ࢚క ࣻ੿

  83. ߸҃ ҙܻܳ ਤೠ ੉߮౟ ܻझց ١۾ ࢲߡա জ੄ ׮ܲ ࠗ࠙ীࢲ

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

  85. ё୓ оઉয়ӝ

  86. ೙ఠ݂җ ੿۳

  87. ߸҃ ঌܿ (Java)

  88. ߸҃ػ ё୓о ੋ੗۽ ੹׳ؽ.

  89. ߸҃ ঌܿ (Swift)

  90. iOS੄ ಴ળ Key-Value Observation

  91. ߸҃ ঌܿ (ࢲߡ)

  92. None
  93. ࢲߡ ੉߮౟ ೩ٜ۞ܳ ٜ݅ ٸח ؀ѐ ష௾ਸ ੉ਊ೧ࢲ ۽Ӓੋ.

  94. ߑӘ ݅ٚ admin_user৬ NOTIFIER_PATH ҃۽, ࢚ױ੄ ௒ߔਵ۽ ܻझցܳ ١۾.

  95. change_event੄ ׮নೠ ࣘࢿਸ ੉ਊ.

  96. Realm ੋझఢझ

  97. ੌ۲੄ ؀࢚ ё୓.

  98. ੋؙझо ୶о, ࢏ઁ, ߸҃ ૘೤ਵ۽
 ࣁ޻ೞѱ ੹׳. Fine-grained notifications.

  99. Thank you kr@realm.io realm.io/kr name@realm.io