robospice
robospice copied to clipboard
Investigate linking with RxJava
This lib can help https://github.com/stanfy/enroscar
RS doesn't support RxJava, it could become an extension or an addition to the core module of RS.
Maybe this lib can help to: https://github.com/realm/realm-java
It's compatible with RxJava: http://realm.io/news/using-realm-with-rxjava/
I am now exploring Rx and I think we would be able to use it fully and correctly only by replacing core RS, currently relying on ExecutorService-s, by one using RxJava. This is probably a theme for RoboSpice 2.0.
I experiment with wrapping the request listener with rx observable. What do you think?https://github.com/anotherdev/robospice-fluent-request/commit/178b05dcc45750dc2550198db08b58991664abc0
Client would call:
RoboSpice.with(SpiceManager)
.execute(SpiceRequest)
.subscribe(... -> ...);
Still thinking about request progress. Either all progress and result in one stream or separate observables and client can merge them if they want.