Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing Realm Mobile Platform

Introducing Realm Mobile Platform

Introducing Realm Mobile Platform

9bf923e39671cde83584e3e926296c13?s=128

Kishikawa Katsumi

October 20, 2016
Tweet

Transcript

  1. Realm meetup #2 kk@realm.io

  2. #realm_jp kk@realm.io

  3. Katsumi Kishikawa Realm Inc. kk@realm.io

  4. Realm Mobile Platform kk@realm.io

  5. Open Sourcing Realm Core kk@realm.io

  6. What is Realm Mobile Platform? kk@realm.io

  7. Realm ˖ 42-JUFך➿剏הז׷ٌغ؎ٕرغ؎أ㼔欽ך ر٦ةك٦أ ˖ ؙٗأفٓحزؿؓ٦ي ˖ J04"OESPJE ˖ +BWB

    4XJGU 0CKFDUJWF$ $ +BWB4DSJQU ˖ ؔ٦فٝا٦أ kk@realm.io
  8. Realm Mobile Database kk@realm.io ˖ 42-JUFך➿剏הז׷ٌغ؎ٕرغ؎أ㼔欽ך ر٦ةك٦أ ˖ ؙٗأفٓحزؿؓ٦ي ˖

    J04"OESPJE ˖ +BWB 4XJGU 0CKFDUJWF$ $ +BWB4DSJQU ˖ ؔ٦فٝا٦أ
  9. kk@realm.io Realm Mobile Platform

  10. kk@realm.io Realm Mobile Platform Realm Mobile Database

  11. Realm Mobile Platform kk@realm.io Realm Mobile Database Data Sync ٔ،ٕة؎يず劍

  12. Realm Mobile Platform kk@realm.io Realm Mobile Database Data Sync User

    Identify ٔ،ٕة؎يず劍 ِ٦ؠ٦陎ⴽ
  13. Realm Mobile Platform kk@realm.io Realm Mobile Database Data Sync Access

    Control User Identify ٔ،ٕة؎يず劍 ِ٦ؠ٦陎ⴽ ر٦ةⰟ剣
  14. Realm Mobile Platform kk@realm.io Realm Mobile Database Data Sync Access

    Control User Identify Event Handling ٔ،ٕة؎يず劍 ِ٦ؠ٦陎ⴽ ر٦ةⰟ剣 ؽآطأٗآحؙ
  15. Realm Mobile Platform jp@realm.io kk@realm.io Realm Mobile Database

  16. Demo kk@realm.io

  17. ࢖ͬͯΈΔ kk@realm.io

  18. ηοτΞοϓ jp@realm.io kk@realm.io

  19. Realm Object ServerΛىಈ͢Δ jp@realm.io kk@realm.io

  20. AdminΞΧ΢ϯτΛ࡞Δ kk@realm.io

  21. ηοτΞοϓ jp@realm.io kk@realm.io

  22. ηοτΞοϓ jp@realm.io kk@realm.io

  23. jp@realm.io kk@realm.io μογϡϘʔυ

  24. jp@realm.io kk@realm.io μογϡϘʔυ

  25. Object Server্ͷσʔλΛݟΔ kk@realm.io

  26. Realm Browser jp@realm.io kk@realm.io

  27. جຊతͳ࢖͍ํ jp@realm.io kk@realm.io

  28. ΞΫηετʔΫϯʢmacOSʣ jp@realm.io kk@realm.io

  29. ΞΫηετʔΫϯʢCentOSʣ jp@realm.io kk@realm.io # cd /etc/realm/ # ls admin_token.base64 configuration.yml

    token- signature.key token-signature.pub # cat admin_token.base64 ewoJImlkZW50a...
  30. جຊతͳ࢖͍ํ jp@realm.io kk@realm.io User.authenticate(with: Credential.usernamePassword(username: "username", password: "password", actions: []),

    server: URL(string: "http://128.199.141.202:9080")!, onCompletion: { user, error in guard let user = user else { fatalError(String(describing: error)) } let configuration = Realm.Configuration( syncConfiguration: (user, URL(string: "realm://128.199.141.202:9080/~/realmtasks")!) ) self.realm = try! Realm(configuration: configuration) })
  31. FacebookϩάΠϯ jp@realm.io kk@realm.io

  32. FacebookϩάΠϯ jp@realm.io kk@realm.io func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error:

    NSError!) { if let _ = error { return } if result.isCancelled { return } User.authenticate(with: Credential.facebook(token: result.token.tokenString), server: URL(string: "http://128.199.141.202:9080")!, onCompletion: { user, error in guard let user = user else { fatalError(String(describing: error)) } let configuration = Realm.Configuration( syncConfiguration: (user, URL(string: "realm://128.199.141.202:9080/~/realmtasks")!) ) self.realm = try! Realm(configuration: configuration) }) }
  33. FacebookϩάΠϯ jp@realm.io kk@realm.io developers.facebook.com/docs/facebook-login/ios

  34. Typical Mobile App Development kk@realm.io /login /tasks /tasks/id

  35. w/ Realm Mobile Platform kk@realm.io

  36. Data Sync kk@realm.io ر٦ةず劍

  37. User Identify kk@realm.io ر٦ةず劍 ِ٦ؠ٦陎ⴽ

  38. Access Control kk@realm.io ر٦ةず劍 ِ٦ؠ٦陎ⴽ ،ؙإأ؝ٝزٗ٦ٕ

  39. Event Handling kk@realm.io ؎كٝزعٝسؚٔٝ

  40. ΠϕϯτϋϯυϦϯά kk@realm.io var Realm = require('realm'); var filter_callback = function(realm_name)

    { ... }; var change_notification_callback = function(realm_name, realm) { var channels = realm.objects('Channel'); for (var i = 0; i < channels.length; ++i) { var channel = channels[i]; ... } }; Realm.setGlobalSyncListener(local_root_dir, server_base_url, access_token, filter_callback, change_notification_callback);
  41. jp@realm.io kk@realm.io

  42. Realm Mobile Platform ˖ .PCJMF%BUBCBTF ˖ ⿽倯ぢךر٦ةず劍 ˖ ٔ،ٕة؎ي ˖

    ء٦يٖأ ˖ ؝ٝؿؙٔزך荈⹛鍑寸 ˖ ِ٦ؠ٦陎ⴽ ˖ ؎كٝزعٝسؚٔٝ • αʔόʔϓογϡ • σʔλڞ༗ • ΞΫηείϯτϩʔϧ kk@realm.io
  43. ίϯϑϦΫτͷղܾ jp@realm.io kk@realm.io • جຊ͸ޙউͪ • ಉ͡ΞΠςϜʹผͷมߋΛՃ͑ͨ৔߹ɺޙʹىͬͨ͜มߋ͕࠾༻ ͞Ε·͢ɻ • ಉ͡ΠϯσοΫε΁ͷૠೖ͸࣌ؒॱʹͳΔ

    • ࡟আ͸͢΂ͯʹউͭ • ͋ΔΞΠςϜ͕࡟আ͞ΕͯɺผͷσόΠεͰ͸ಉ͡ΞΠςϜΛมߋ ͨ͠ɺͱ͍͏৔߹͸ɺ࡟আ͚͕ͩى͜Γ·͢ɻ
  44. Demo github.com/realm/RealmTasks kk@realm.io

  45. Recent Updates kk@realm.io

  46. Recent Updates • Realm Objective-C/Swift 2.0 (was 1.1.0) • Realm

    Java 2.0 (was 1.1.0) • Realm React Native 0.14.0 • Realm Xamarin 0.78 (was 0.77.2) kk@realm.io
  47. Realm Objective-C/Swift 2.0 kk@realm.io

  48. Realm Objective-C/Swift 2.0 • Realm Mobile PlatformରԠ • RealmSwift.Error =>

    RealmSwift.Realm.Error jp@realm.io kk@realm.io
  49. Where to find us • % Realm Japan User Group:

    facebook.com/groups/realmjp • % Twitter: twitter.com/realmJapan • GitHub: github.com/realm • % StackOverflow: ja.stackoverflow.com/questions/tagged/realm • % Email: help@realm.io • % Slack: slack.realm.io/ kk@realm.io
  50. Realm Japan User Group Facebook kk@realm.io

  51. Support Chat Slack kk@realm.io

  52. Ξϯέʔτ bit.ly/RealmJP_Kansai2 kk@realm.io

  53. Questions? Katsuma Kishikawa kk@realm.io www.realm.io/jp @k_katsumi