What is Real Time Database? A real-time database is a database system which uses real-time processing to handle workloads whose state is constantly changing. This differs from traditional databases containing persistent data, mostly unaffected by time. For example, a stock market changes very rapidly and is dynamic. The Firebase Realtime Database It's a cloud-hosted database powered by Google. Data is stored in JSON format and synchronized in realtime to every connected client(devices). You can build the using their iOS, Android and JavaScript SDKs and all of your clients share one Realtime Database instance and automatically receive updates with any changes in the content of the database. How does it work? The Firebase Realtime Database allows you to build rich, collaborative applications by providing secure access to the database directly from client-side code. Data is persisted locally, and even while offline, realtime events continue to fire, it gives the end u...
Reactive programming is a programming style where the consumer reacts to the data as it comes in. Asynchronous programming is also called reactive programming. In reactive a programming observables are allowed to propagate event changes to registered observers. "The Observer pattern has done right. ReactiveX is a combination of the best ideas from the Observer pattern, the Iterator pattern, and functional programming." Building blocks for RxJava2.x Observables : Representing sources of data Subscribers (or observers) : Listens to the observables Methods : A set of methods for modifying and composing the data An observable emits items; a subscriber consumes those items. Observables : As mentioned above Observables are the sources for the data. Observable objects that emit a stream of data and then terminate. It can terminate either successfully or with an error. Subscribers : A subscriber objects that subscribe to Observables. An Observer receives a...