RxJava is a library that let’s you represent anything as an asynchronous data-stream that can be created on any thread, functionally transformed, and consumed by everyone on any thread.
Tag Archives: RxJava
- Powerful & Simple set of Operations:
- API for Humans: Type Safety, Immutability & Thread-Safety
- Convenient builders with compile-time guarantees for required params. Forget about 6-7
- Optional Type-Safe Object Mapping, if you don’t want to work with
ContentValuesyou don’t have to
- No reflection in Operations and no annotations in the core, also
StorIOis not ORM
- Every Operation over
StorIOcan be executed as blocking call or as
RxJavaas first class citizen, but it’s not required dependency!
GetOperation will observe changes in
ContentProvider) and receive updates automatically
StorIOis replacements for
RxJavais replacement for
- We are working on
MockStorIO(similar to MockWebServer) for easy unit testing
In this blog entry I want to show you how to use Realm and RxJava together. Realm is a new mobile-first NoSQL database for Android. RxJava is a library for composing asynchronous and event-based programs by using observable sequences. I’ve used it as part of my main library’s stack in Android development for more than a year. If you’re not familiar with it check out the Grokking RxJava series.
At ribot, we started using RxJava a few months ago and now it’s become a core element in the architecture of the Android apps we create. There are many benefits that come with it, but the learning curve is steep and quite often we still find ourselves trying to get our heads around those “beautiful” diagrams that explain how operators work.
The first step to rx-ify our architecture was to change the methods in the data layer so that they returned Observables. The next question was: how do we unit test this?
Suppose I have some
Data that I query from the network. I could simply hit the network each time I need the data, but caching the data on disk and in memory would be much more efficient.
More specifically, I want a setup that:
- Occasionally performs queries from the network for fresh data.
- Retrieves data as quickly as possible otherwise (by caching network results).
I’d like to present an implementation of this setup using RxJava.
Our recent post on optimizing the Netflix API introduced how our web service endpoints are implemented using a reactive programming model for composition of asynchronous callbacks from our service layer.
This post takes a closer look at how and why we use the reactive model and introduces our open source project RxJava – a Java implementation of Rx (Reactive Extensions).