IBM/reactive-code-workshop

Name: reactive-code-workshop

Owner: International Business Machines

Description: Think 2018 Reactive Code workshop

Created: 2018-02-09 20:07:09.0

Updated: 2018-03-19 21:48:07.0

Pushed: 2018-03-19 21:06:06.0

Homepage: null

Size: 402

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Think 2018: Reactive Java? Let us count the ways!

About the Lab

We hope to help you “count the ways” in which you can write reactive applications in the following activities. If you aren't a savvy developer, we should be able keep you on a straight and narrow path to help you get an idea of the landscape. If you're an old-hand or a new hotshot, feel free to go off-roading, though we'll expect you to do a fair amount of self-rescue if you do so.

We have divided this lab into a few parts:

Let's get started

Please open the Skytap VM for this lab (#6915) in the browser. The Ubuntu desktop should be ready and waiting with VS Code open and code staring you in the face.

First, we need to Open a terminal window and run a script:

    $ ~/reactive-code-workshop/scripts/helloWorkshop.sh

While that runs…

Reactive Concepts

Reactive programming

Reactive systems

Marble diagrams

Love them or hate them, when you talk about reactive programming, you're going to see a lot of these:

Reactive Marble diagram, from http://reactivex.io/documentation/observable.html

These diagrams are used to represent an Observable and how data is changed by operations on it. Try to read them from left to right (as a time series), with items from the top line being munged/mangled/transformed on their way to the subscriber via the bottom line.

In the case above, the top line is the sequence of items emitted by the original Observable (a finite number, as it happens). A flip operation is being performed on the items emitted by the Observable, such that the subscriber will see the items (shapes in our case) in the orientation shown on the bottom line.

Excercises!!
In summary

Even though we only scratched the surface, we hope you have a better idea of the problems reactive programming intends to solve, and the similarities and differences in approach provided by different tools and frameworks.

About the VM

The lab uses a Skytap-hosted virtual machine (VM), which contains all necessary artifacts for the lab. The Skytap VM features Ubuntu 16.04.3 LTS (xenial) as the operating system and has the following software installed:

This VM will update itself on launch, and will start the Lagom Chirper example service in the background.

Using Skytap

Each person in the lab will have their own VM environment, which should be accessed from the browser.

Tips:

Skytap help: Accessing VMs with your browser

About chirper

This lab relies on a variant of the Lagom Chirper Example, which is running in the background of your VM. Our variant relies on Docker Compose to remove as many moving parts as possible, and to trim the footprint on the VM. There are two aliases we use to work with this background system: think-compose and think-run. See the ~/lagom-java-chirper-example directory if you're curious.

References
Contacts

Erin Schnabel (schnabel@us.ibm.com / @ebullientworks) Kiki Carter (kikia.carter@lightbend.com / @kikisworldrace)


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.