Open8

mBaaSを検討したときのメモ

jimejime

個人開発でどのmBaaS(mobile Backend as a Service)を使えばいいのか調べてみた

主な候補は下記の3つ

  1. CloudKit
  2. FireBase
  3. MongoDB Realm

CloudKit以外は,NoSQL系のDatabase

jimejime

比較するときの観点

どのサービスにしようかなと思うときにはまず下のチェックリストにそって,要件を調べてみる

1. How much storage are you going to be using?
2. How are you going to query that data?
3. What kind of structures are you using?
4. Is the data schema is changing often?
5. What kind of back-end management do you want? (server side interface)
6. What kind of documentation/support do you expect from the solution?
7. etc
jimejime

料金について

個人開発なので,できる限りはただでやりたかったので比較してみた

CloudKit

サービス 料金 利用制限 課金のタイミング
Public 無料
1PB (1000TB) Asset Storage (Photos, Videos, etc.)

10TB Database Storage (Structured data in the CloudKit key-value store)

200TB data transfer

400 requests per second.
16ヶ月間のActiveユーザーの利用状況をもとに平均値を算出し超過した場合に課金が実施される場合がある
Private 基本無料 10GB Asset Storage (Photos, Videos, etc.)

100MB Data storage (Structured data in the CloudKit key-value store)

2GB Data Transfer (This is unclear, but I'm assuming it's calculated per month.)

40 Requests per second (I'm assuming a user will get throttled if they perform more than 3 requests in a 2 second period.)
16ヶ月間のActiveユーザーの利用状況をもとに平均値を算出し超過した場合に課金が実施される場合がある
jimejime

1アプリにたいして1Containerで管理するが,1度作成したContainerを削除できないというルールがある

jimejime

FireBaseの料金

サービス 無料枠
Cloud Firestore Stored data 1 GiB total
Network egress 10 GiB/month
Document writes 20K writes/day
Document reads 50K reads/day
Document deletes 20K deletes/day
Realtime Database Simultaneous connections help 100
GB stored 1 GB
GB downloaded 10 GB/month
Multiple databases per project ✗

https://firebase.google.com/pricing

jimejime

FirebaseのDBは2つ種類があるらしい
Cloud FireStoreの方が新しいので利用されがちみたい
使い分けとしては,
データの更新頻度が大きいが一回ごとの送信しているデータの容量が小さい時
→Realtime Database

データの保持する量が大きいとき
→Cloud FireStore

jimejime

MongoDB Realm

無料枠の上限 3つの中だと多分一番少ない

  • 1,000,000 requests or 500 hours of compute or 10,000 hours of sync runtime (whichever occurs first)
  • 10GB of data transfer

基本料金 従量課金制

Compute Sync Request Transfer
$10/500 hours of request runtime Excluding Sync $0.08/1M minutes of Sync runtime $2.00/1M application requests $0.12/GB for egress
$0.000000005/ms $0.00000008/min $0.000002/request $0.12/GB for egress

https://docs.mongodb.com/realm/billing/?_ga=2.186568617.1800996460.1647581974-364222573.1647581974