String } struct LinkEntity: Entity { let title: String let href: URL let submitted: String } struct CommentEntity: Entity { let link: String let body: String let author: String } Entity Entity Data Access Data Access Interactor Model Presenter View
Need more money $ to build in some case • Data cache system doesn’t suit for your app in some case • Sorting and Query are hard to use • Scaling requires sharding (100,000 concurrent connections & 1,000 writes/sec.) Cons
Need more money $ to build in some case • Data cache system doesn’t suit for your app in some case • Sorting and Query are hard to use • Scaling requires sharding (100,000 concurrent connections & 1,000 writes/sec.) Cons %
data with protobuf, which have more types • Introduced reference type, so requires less denormalization and data flattening • Indexed queries with compound sorting and filtering Cloud Firestore
) is also effective to use on native apps • API server can be replaced by Firebase Database / Cloud firestore in some case • Replaceable DAO and separate Entity and Model in app is important • With side effect, easy to test modules
by Robert C. Martin • https://firebase.google.com/docs/firestore/rtdb-vs-firestore • https://firebase.google.com/docs/firestore/firestore-for- rtdb • https://speakerdeck.com/bpyamasinn/api-wo-firebase- realtime-database-niyi-xing-siteqi-fu-itakoto-ver2