Giter VIP home page Giter VIP logo

oreilly-reactive-architecture-student's Introduction

O'Reilly Reactive Architecture Course


Introduction

This document describes how to setup:

  • The development environment
  • The case study project

We recommend using the following tools:

  • Eclipse or IntelliJ
  • sbt build tool

Prerequisites


Required Knowledge and Software

This course is best suited for individuals that have knowledge of Java. Also, we need access to the internet and a computer with the following software installed:

  • Unix compatible shell
  • JVM 1.8 or higher
  • Scala 2.12.2 or higher
  • Sbt 0.13.15 or higher

Unix Compatible Shell

If you are running OSX, then you are on a nix system already. Otherwise install a Unix compatible shell like Cygwin.


JVM 1.8 or Higher

If you are running OSX and a Homebrew Cask user, from a terminal run:

$ brew cask install java

Otherwise follow the setup instructions to download and install. Once the installation is complete, very the installation by running the following command in a terminal session:

$ java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

Scala 2.12 or Higher

If you are running OSX and a Homebrew user, from a terminal run:

$ brew install scala

Otherwise follow the setup instruction to download and install. Once the installation is complete, verify the installation by running the following command in a terminal session:

$ scala -version
Scala code runner version 2.12.2 -- Copyright 2002-2017, LAMP/EPFL and Lightbend, Inc.

sbt 0.13.15 or Higher

If you are running OSX and a Homebrew user, from a terminal run:

$ brew install sbt

Otherwise follow the setup instruction to download and install. Once the installation is complete, verify the installation by running the following command in a terminal session:

$ sbt sbtVersion
...
[info] 0.13.15

sbt


Make Yourself Familiar with sbt

  • Read the first chapters of the Getting Started Guide
  • Starting sbt takes you to a interactive session
  • Take a look at build.sbt and the other .sbt files for Coffee House
  • Change directory to the fast-track-akka-java directory and start sbt as follows:
$ sbt
[run the man command] base >

man

The man command, short for manual, displays the setup instructions (what you are reading now) for the courseware. To view the instructions for the current exercise, use the e option. If you are using an IDE, you can also open up the setup instructions (README.md) file or the current exercises instructions (src/test/resources/README.md) file in your workspace.

// display the setup instructions
[run the man command] base > man

// display the instructions for the current exercise
[run the man command] base > man e

run

As part of each exercise, we use the run command to bootstrap the main class CoffeeHouseApp. This command starts the application for the current exercise that we interact with and verify our solution.

[run the man command] [000] Initial_state > run

next/prev

next and prev are sbt commands that allows us to navigate the courseware:

// move to the next exercise
[run the man command] base > next
[info] Set current project to exercise_000_Initial_state (in build file:/...)
[run the man command] [000] Initial_state >

// move to the previous exercise
[run the man command] [000] Initial_state >
[info] Set current project to base (in build file:/...)
[run the man command] base >

clean

To clean your current exercise, use the clean command from your sbt session. Clean deletes all generated files in the target directory.

[run the man command] [000] Initial_state > clean

compile

To compile your current exercise, use the compile command from your sbt session. This command compiles the source in the src/main/scala directory.

[run the man command] [000] Initial_state > compile

reload

To reload sbt, use the reload command from your sbt session. This command reloads the build definitions, build.sbt, project/.scala and project/.sbt files. Reloading is a requirement if you change the build definition files.

[run the man command] [000] Initial_state > reload

test

To test your current exercise, use the test command from your sbt session. Test compiles and runs all tests for the current exercise. Automated tests are your safeguard and validate whether or not you have completed the exercise successfully and are ready to move on.

[run the man command] [000] Initial_state > test

Eclipse


Install the Eclipse IDE

Follow these instructions if you want to use Eclipse:

  • You can download and install the latest version from Eclipse IDE for your platform
  • In Eclipse import the coffee-house project

IntelliJ


Install the IntelliJ IDEA IDE

Follow these instructions if you want to use IntelliJ IDEA:

  • Download and install the latest version of IntelliJ 2017.2 for your platform
  • In Intellij, import the coffee-house project

Case Study


Coffee House

Welcome to the Akka Coffee House where we work through a series of exercises organized by topic as laid out in the Fast Track to Akka with java slide deck and experience:

  • Yummy caffeinated concoctions like Akkaccino, MochaPlay, and CaffeJava
  • Guests becoming caffeinated, and waiters can getting frustrated
  • Barista's becoming bottlenecks

Our mission is to keep the Akka Coffee House healthy, so make sure you have the deck handy as it is a useful reference for guidance.


Exercise Outline

  1. Exercise 0 > Initial State
  2. Exercise 1 > Implement Actor
  3. Exercise 2 > Top Level Actor
  4. Exercise 3 > Message Actor
  5. Exercise 4 > Use Sender
  6. Exercise 5 > Child Actors
  7. Exercise 6 > Actor State
  8. Exercise 7 > Use Scheduler
  9. Exercise 8 > Busy Actor
  10. Exercise 9 > Stop Actor
  11. Exercise 10 > Lifecycle Monitoring
  12. Exercise 11 > Faulty Guest
  13. Exercise 12 > Custom Supervision
  14. Exercise 13 > Faulty Waiter
  15. Exercise 14 > Self Healing
  16. Exercise 15 > Detect Bottleneck
  17. Exercise 16 > Use Router

oreilly-reactive-architecture-student's People

Contributors

henrikengstrom avatar ironfish avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.