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

Try Realm Mobile Platform

249b3122eee454c0a818bfe7851418e4?s=47 fromkk
October 18, 2016

Try Realm Mobile Platform

2016/10/18にTimers Inc.で開催されたFirebase.ebisuで発表した資料です

249b3122eee454c0a818bfe7851418e4?s=128

fromkk

October 18, 2016
Tweet

Transcript

  1. Try Realm Mobile Platform Firebase.ebisu #1 (C) fromkk 1

  2. About me • Kazuya Ueoka (͔ͬ͘Μ) • @fromkk • Twitter

    / Github / Qiita • Timers Inc. iOS Team • Blog http://fromkk.me • Facebook Kazuya Ueoka (C) fromkk 2
  3. Firebase ? (C) fromkk 3

  4. Firebase ? (C) fromkk 4

  5. Realm (C) fromkk 5

  6. Why Realm? • 9/27 ʹൃද͞ΕͨΫϥΠΞϯτ㱻αʔόʔ׬શಉظσʔλϕʔ ε(Firebase DatabaseͷϥΠόϧͳͷͰ͸) • iOS /

    Android౳ʹରԠʢFirebase΋ʣ • αʔόʔ͸ࣗ෼Ͱ༻ҙ͢ΔͷͰσʔλϕʔεࣗମ͸ແྉͰར༻ग़ དྷΔʂ(Firebase͸͍ͣΕ༗ྉʹͳΔ) (C) fromkk 6
  7. About Realm Mobile Database SQLite΍Core Dataͷ୅ସͱͳΔςΫϊϩδʔ Ҿ༻ (C) fromkk 7

  8. Features of Realm • Offline first • Fast queries •

    Safe threading • Cross platform(iOS/Android/Xamarin/ReactNative) • Encrypty • Reactive (C) fromkk 8
  9. Realm Object Server Server side realm database • macOS/Linux(CentOS6/7, Ubuntu)/AWS

    • Realtime • Two way data sync (C) fromkk 9
  10. How it works Sync Engine / Object Store / Dashboard

    / Mobile Database / Event Framework / Authentication System / Access Control (C) fromkk 10
  11. Install ex: CentOS 7 # Setup Realm's PackageCloud repository curl

    -s https://packagecloud.io/install/repositories/realm/realm/script.rpm.sh | sudo bash # Install the Realm Object Server sudo yum -y install realm-object-server-de # Enable and start the service sudo systemctl enable realm-object-server sudo systemctl start realm-object-server Ҿ༻ (C) fromkk 11
  12. Launch dashboard (C) fromkk 12

  13. Login (C) fromkk 13

  14. Dashboard (C) fromkk 14

  15. Realm Browser (C) fromkk 15

  16. Realm Swift Usage // Authenticating the User SyncUser.authenticate(with: .google(token: "google

    token"), server: URL(string: "http://realm.example.com:9080")!) { user, error in if let user = user { // Opening a remote Realm let realmURL = URL(string: "realm://realm.example.com:9080/~/userRealm")! let config = Realm.Configuration(syncConfiguration: (user, realmURL)) Realm.Configuration.defaultConfiguration = config let realm = try! Realm() // Any changes made to this Realm will be synced across all devices! } else if let error = error { // handle error } } Ҿ༻ (C) fromkk 16
  17. Demo ʢ͕࣌ؒ͋Ε͹ʣ (C) fromkk 17

  18. ·ͱΊ • αʔόʔͷߏங௒؆୯ʂ • ΫϥΠΞϯτ΋Ϣʔβʔೝূ͢Δ͚ͩͰޙ͸͍ͭ΋௨Γʂ • ࠓޙରԠ͢ΔϓϥοτϑΥʔϜ΋޿͕Δ͸ͣͳͷͰେ͍ʹظ଴ ग़དྷΔςΫϊϩδʔʂ • ༰ྔؔ܎ͳ͘ແྉʂ

    (C) fromkk 18
  19. ΄΅ಉ͡಺༰Ͱϒϩά΋ॻ͍ͯΔͷͰͦͪΒ΋ݟͯ௖͚Ε͹ͱࢥ͍ ·͢ʂ http://techblog.timers-inc.com/entry/ realmmobileplatform (C) fromkk 19

  20. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ (C) fromkk 20