As a Knowledge Sharing session at Networked Assets
By JAROSŁAW WATRAL
And what it isn't.
+++
+++
RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences.
+++
+++
+++
+++
+++
+++
+++
+++
+++
+++
+++
+++
+++
Let's ask Oracle's Legal Department ;-)
See this article for details.
+++
Note: Server-side concurrency is needed to effectively reduce network chattiness. Without concurrent execution on the server, a single “heavy” client request might not be much better than many “light” requests because each network request from a device naturally executes in parallel with other network requests. If the server-side execution of a collapsed “heavy” request does not achieve a similar level of parallel execution it may be slower than the multiple “light” requests even accounting for saved network latency.
+++
Note:
Java Futures are straight-forward to use for a single level of asynchronous execution but they start to add non-trivial complexity when they’re nested (prior to Java 8 CompletableFuture).
Conditional asynchronous execution flows become difficult to optimally compose (particularly as latencies of each request vary at runtime) using Futures. It can be done of course, but it quickly becomes complicated (and thus error prone) or prematurely blocks on ‘Future.get()’, eliminating the benefit of asynchronous execution.
+++
Note: Callbacks offer a solution to the tendency to block on Future.get() by not allowing anything to block. They are naturally efficient because they execute when the response is ready. Similar to Futures though, they are easy to use with a single level of asynchronous execution but become unwieldy with nested composition.
+++
- Stay close to the original Rx.Net implementation while adjusting naming conventions and idioms to Java
- All contracts of Rx should be the same
- Target the JVM not a language. New language adapters can be contributed.
- Support Java 6 (to include Android support) and higher with an eventual goal to target a build for Java 8 with its lambda support. (Update: Java 8 support was achieved without a separate build)
+++
+++
+++
getListOfLists(userId).mapMany({ VideoList list ->
list.getVideos() // for each VideoList we want to fetch the videos
.take(10) // we only want the first 10 of each list
.flatMap({ Video video ->
def m = video.getMetadata().map({ // for each video we want to fetch metadata
Map<String, String> md ->
return [title: md.get("title"), // transform to the data and format we want
length: md.get("duration")]
})
def b = video.getBookmark(userId).map({
position -> return [bookmark: position]
})
def r = video.getRating(userId).map({
VideoRating rating ->
return [rating:
[actual: rating.getActualStarRating(),
average: rating.getAverageStarRating(),
predicted: rating.getPredictedStarRating()]]
})
return Observable.zip(m, b, r, {
metadata, bookmark, rating ->
return [id: video.videoId] << metadata << bookmark << rating
})
})
})Note: /**
- Demonstrate how Rx is used to compose Observables together
- such as how a web service would to generate a JSON response.
- The simulated methods for the metadata represent different
- services that are often backed by network calls.
- This will return a sequence of dictionaries such as this:
- [id:1000, title:video-1000-title, length:5428, bookmark:0,
- rating:[actual:4, average:3, predicted:0]] */
Press Down key for details. | See GitPitch Wiki for details.
+++
The same tool you use to create project READMEs and Wikis for your Git repos.
Press Down key for examples. | See GitPitch Wiki for details.
+++
And enjoy code syntax highlighting for dozens of languages powered by highlight.js.
+++
// JavaScript Code Block
$('button').click(function(){
$('h1, h2, p').addClass('blue')
$('div').removeClass('important')
$('h3').toggleClass('error')
$('#foo').attr('alt', 'Lorem Ipsum')
});+++
// Scala Code Block
HashMap params = HashMap(n -> 10, mean -> 5)
// Define executable for R stats#rnorm function call.
OCPUTask task = OCPU.R()
.pkg("stats")
.function("rnorm")
.input(params.asJava)
.library()+++
// Go Code Block
package main
import "fmt"
func swap(x, y string) (string, string) {
return y, x
}
func main() {
a, b := swap("hello", "world")
fmt.Println(a, b)
}Press Down key for examples. | See GitPitch Wiki for details.
+++
Enjoy 100% reusable code snippets, excellent syntax highlighting, code indentation and styling.
+++?gist=8da53731fd54bab9d5c6
+++?gist=28ee3d19ddef9d51b15adbdfe9ed48da
Press Down key for examples. | See GitPitch Wiki for details.
+++
Use inline images to lend a visual punch to your slideshow presentations.
+++
Inline Image at Absolute URL
the Private Investocat by jeejkang
+++
Inline Image at GitHub Repo Relative URL
the Octocat-De-Los-Muertos by cameronmcefee
+++
Animated GIFs Work Too!
the Daftpunktocat-Guy by jeejkang
Press Down key for examples. | See GitPitch Wiki for details.
+++
Use high-resolution background images for maximum impact.
+++?image=https://d1z75bzl1vljy2.cloudfront.net/kitchen-sink/victory.jpg
+++?image=https://d1z75bzl1vljy2.cloudfront.net/kitchen-sink/127.jpg
Press Down key for examples. | See GitPitch Wiki for details.
+++
Embed YouTube, Vimeo, MP4 and WebM inline on any slide.
+++
+++
+++
Press Down key for examples. | See GitPitch Wiki for details.
+++
Go fullscreen with MP4 and WebM videos.
+++?video=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
Press Down key for examples. | See GitPitch Wiki for details.
+++
Use TeX, LaTeX and MathML markup powered by MathJax.
+++
$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
+++
\begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{align}
+++
\[ \left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \]
+++
\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]
+++
This expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation.
Press Down key for examples. | See GitPitch Wiki for details.
+++
Step through slide content in sequence to slowly reveal the bigger picture.
+++
- Java
- Groovy |
- Kotlin |
- Scala |
- The JVM rocks! |
+++
| Firstname | Lastname | Age |
|---|---|---|
| Jill | Smith | 25 |
| Eve | Jackson | 94 |
| John | Doe | 43 |
Press Down key for examples. | See GitPitch Wiki for details.
+++
Set a default theme, custom logo, custom css, background image, and preferred code syntax highlighting style.
+++
Enable auto-slide with custom slide intervals, presentation looping, and RTL flow.
Press Down key for examples. | See GitPitch Wiki for details.
+++
| Mode | On Key | Off Key |
|---|---|---|
| Fullscreen | F | Esc |
| Overview | O | O |
| Blackout | B | B |
| Help | ? | Esc |
Press Down key for examples. | See GitPitch Wiki for details.
+++
- View any slideshow at its public URL
- Promote any slideshow using a GitHub badge
- Embed any slideshow within a blog or website
- Share any slideshow on Twitter, LinkedIn, etc
- Print any slideshow as a PDF document
- Download and present any slideshow offline








