amupoti/Principles-of-Reactive-Programming


Principles of Reactive Programming, Scala: assignments and other code from Coursera https://class.coursera.org/reactive-002

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.amupoti:Principles-of-Reactive-Programming:'
	}
	dependencies {
		implementation("com.github.amupoti:Principles-of-Reactive-Programming:")
	}
	<dependency>
	    <groupId>com.github.amupoti</groupId>
	    <artifactId>Principles-of-Reactive-Programming</artifactId>
	    <version></version>
	</dependency>

                            
    libraryDependencies += "com.github.amupoti" % "Principles-of-Reactive-Programming" % ""
        
        

                            
    :dependencies [[com.github.amupoti/Principles-of-Reactive-Programming ""]]
        
        

Readme


Principles of Reactive Programming (Scala)

assignments and other code from Coursera class (now removed)

  • https://class.coursera.org/reactive-002
  • https://www.coursera.org/course/reactive

Assignments

  • Week 1: QuickCheck/ScalaCheck
  • Week 2: Calculator
  • Week 3: NodeScala
  • Week 4: Wikipedia Suggestions
  • Week 5: Actor Binary Tree
  • Week 6: Replicated KV Store

Sources

  • https://github.com/headinthebox/CourseraCodeSamplesReactiveProgramming
  • https://github.com/typesafehub/activator-akka-cluster-sharding-scala

Video lectures:

https://www.youtube.com/playlist?list=PLMhMDErmC1TdBMxd3KnRfYiBV2ELvLyxN

worksheets: code snippets from lectures

Recap: Getting Started with Tools

  • Tools Setup for Linux (12:24)
  • Tools Setup for Mac OS X (12:17)
  • Tools Setup for Windows (10:37)
  • Tutorial: Working on the Programming Assignments (8:47)

Week 1

  • What is Reactive Programming? (11:42)
  • Recap: Functions and Pattern Matching (19:56)
  • Recap: Collections (12:54)
  • Functional Random Generators (19:42)
  • Monads (20:22)

Week 2

  • Functions and State (15:28)
  • Identity and Change (8:12)
  • Loops (8:25)
  • Extended Example: Discrete Event Simulation (Optional) (10:54)
  • Discrete Event Simulation: API and Usage (Optional) (10:57)
  • Discrete Event Simluation: Implementation and Test (Optional) (18:12)
  • Imperative Event Handling: The Observer Pattern (12:27)
  • Functional Reactive Programming (20:24)
  • A Simple FRP Implementation (19:32)

Week 3

  • Monads and Effects 1
  • Monads and Effects 2
  • Latency as an Effect 1
  • Latency as an Effect 2
  • Combinators on Futures 1
  • Combinators on Futures 2
  • Composing Futures 1
  • Composing Futures 2
  • Async Await
  • Promises, promises

Week 4

  • From Try to Future (5:22)
  • From Iterables to Observables 1 (8:06)
  • From Iterables to Observables 2 (9:44)
  • Hello World Observables (6:29)
  • RX Operators (11:39)
  • Subscriptions (10:34)
  • Promises and Subjects (8:55)
  • RX potpourri (11:30)
  • Observable Contract (14:19)

Week 5

  • Introduction: Why Actors? (14:46)
  • The Actor Model (13:43)
  • Message Processing Semantics (27:28)
  • Designing Actor Systems (38:10)
  • Testing Actor Systems (17:16)

Week 6

  • Failure Handling with Actors (22:38)
  • Lifecycle Monitoring and the Error Kernel (24:07)
  • Persistent Actor State (40:05)

Week 7

  • Actors are Distributed (36:30)
  • Actors are Distributed Part II (18:17 — optional)
  • Eventual Consistency (15:49)
  • Actor Composition (20:14)
  • Scalability (17:00)
  • Responsiveness (11:41)