Realtime Client Database: Flutter client using Bloc and gRPC
//TODO
pubspec.yaml Dependencies
This sample client requires 2 Flutter libraries:
- grpc core implementation for networking.
- flutter_bloc …
- built_collection …
- path_provider …
Sources
Flutter Realtime Database
Bloc persistence and streaming updates using gRPC.Realtime Client Database: gRPC Bi-Directional Streams and ZIO Hub
Realtime push-based databases such as Google Firebase conveniently ensure clients are synchronized with the server. Data updates stream to clients immediately as they happen; and if a client disconnects, updates are immediately processed after reconnecting. gRPC server streaming and ZIO Hub can implement this functionality replicating an expensive paid Firebase service while allowing greater extensibility.
Realtime Client Database: External Datasource using ZIO ZLayer
Expanding on the realtime Firebase implementation in the previous article, this expands the functionality allowing the server to fetch data on-demand from an external datasource. Additionally, functionality to periodical refresh active data which is subscribed to by connected clients transforms this database into an efficient cache to evolving external data which can only be obtained by polling.