Advanced Topics in Functional and Reactive Programming

Slides:



Advertisements
Similar presentations
Synchronization with Eventcounts and Sequencers
Advertisements

Chapter 6: Process Synchronization
Scalable Synchronous Queues By William N. Scherer III, Doug Lea, and Michael L. Scott Presented by Ran Isenberg.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for Threads.
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
Advanced Java New York University School of Continuing and Professional Studies.
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Node.js - What is Node.js? -
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for.
CSEP 545 Transaction Processing for E-Commerce Course Information Spring (March – May) 2007.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Threads. Readings r Silberschatz et al : Chapter 4.
CSC 520 – Advanced Object Oriented Programming, Fall, 2010 Thursday, October 14 Week 7, UML Diagrams
Unit 4: Processes, Threads & Deadlocks June 2012 Kaplan University 1.
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Chapter 4 – Thread Concepts
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Node.Js Server Side Javascript
Chapter 2: Computer-System Structures
Introduction to Distributed Platforms
Introduction to Load Balancing:
Advanced Topics in Distributed and Reactive Programming
Operating systems Deadlocks.
Sarah Diesburg Operating Systems COP 4610
CSC 221: Computer Programming I Spring 2010
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Spark Presentation.
CSC 221: Computer Programming I Fall 2005
Concurrency.
Chapter 4 – Thread Concepts
Parallel and Distributed Simulation Techniques
Eng Computation & Data Science.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Node.Js Server Side Javascript
Advanced Operating Systems
Advanced Topics in Distributed and Reactive Programming
Enterprise Service Bus (ESB) (Chapter 9)
Operating Systems Bina Ramamurthy CSE421 11/27/2018 B.Ramamurthy.
Module 2: Computer-System Structures
Operating Systems : Overview
Spring CS 599. Instructor: Jyo Deshmukh
Software models - Software Architecture Design Patterns
Operating systems Deadlocks.
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
INTRODUCTION TO By Stepan Vardanyan.
Serverless Architecture in the Cloud
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Concurrency: Mutual Exclusion and Process Synchronization
Subject : T0152 – Programming Language Concept
Operating Systems : Overview
Module 2: Computer-System Structures
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
EECE.4810/EECE.5730 Operating Systems
Course Overview CS 4640 Programming Languages for Web Applications
Last Class: Naming Name distribution: use hierarchies DNS
Synchronization and liveness
Presentation transcript:

Advanced Topics in Functional and Reactive Programming Majeed Kassis

Syllabus Asynchronous Programming Reactive Programming Introduction to Concurrency Synchronization Mechanisms Liveness, Deadlock Causes and Prevention Distributed Systems and Concurrency Distributed Systems Concurrency Control in Distributed Systems Synchronization in Distributed Systems Lock-Free Concurrency Synchronization Hardware Immutability in Concurrency Concurrency Tools Java Concurrency Tools C++ Concurrency Tools JavaScript Concurrency Tools Python Concurrency Tools Debugging Multithreaded Applications Asynchronous Programming Actor Model and Event Driven Programming Python Asynchronous Frameworks JavaScript Asynchronous Frameworks Reactive Programming Functional Reactive Programming Reactive Frameworks Reactive REST Case Studies

Introduction to Concurrency Basic concepts Types of concurrency Difficulties in concurrency Synchronization Mechanisms Locks Mutual Exclusion Semaphore Monitors Liveness, Deadlock Causes and Prevention Deadlock causes Deadlock avoidance and solutions Starvation – causes, prevention (scheduling)

Distributed Systems and Concurrency Basics State and time Physical clocks Event ordering – logical clocks Concurrency in Distributed Systems Causes Deadlocks Synchronization in Distributed Systems Distributed Mutual Exclusion Token based Centralized Contention based Election based

Lock-Free Concurrency Synchronization Hardware Atomic Operations CPU Instructions: Test-and-Set, compare-and-swap, fetch-and-add Spin-locks: busy-wait locks Immutability in Concurrency Immutable Collections – data structures (that have) Mutative API – allows add/remove/update! (which are) Persistent - preserves the previous version of itself when modified (and implemented with) Maximum Sharability and Runtime Efficiency

Concurrency Tools Java Concurrency Tools C++ Concurrency Tools Executors, Futures, CompletionServices C++ Concurrency Tools std::async std::future JavaScript Concurrency Tools Generators async, await, promises Python Concurrency Tools Coroutines Debugging Multithreaded Applications

Asynchronous Programming Actor Model and Event Driven Programming Actor Model Application components are defined as Actors who communicate through mail Even Driven Programing Program flow is determined by the occurrence of events. Asynchronous Programming Asynchronous Design Pattern Event loop Non-blocking IO Python Asynchronous Frameworks AsyncIO JavaScript Asynchronous Frameworks Node.js

Reactive Programming Reactive (adaptive) applications are capable to: React to events the event-driven nature enables the following qualities. React to load focus on scalability rather than single-user performance. React to failure build resilient systems with the ability to recover at all levels. React to users combine the above traits for an interactive user experience.

Reactive Programming Reactive Programming Streams, Stream Combinators, Reactive Streams Observables – Sequences, Streams Functional Reactive Programming Akka Reactive Frameworks ReactiveX - RxJava, RxJS, RxCpp, RxPY Reactive REST Case Studies Node Express – Reactive REST server Java Spring - HTTP streaming over asynchronous servlet ReactiveX use case - Reactive Client of multiple REST servers

Course Requirements Assignments – 60-70% Exam – 30-40% Question Answering – 15% Small “research” assignments + questions to be answered Programming – 15% Small “research” assignments + programing assignments Big Assignment – 30-40% Incorporating reactive programming tools taught at class Exam – 30-40% Yes, I know. But it’s in the syllabus. Late Submissions You are allowed to be late (2 days maximum) once for free, beyond that 3 days late will net you 6 points penalty (2 points loss per day) Beyond 3 days, submission will not be accepted! Only army reserve duty or hospitalization are accepted for extensions.

Research assignments? Each week you will receive links to guides for self reading These links are guides for specific elements you need to research An assignment will be published asking specific questions, their answers can be found in these guides. No copypasta! A block of text which has been copied and pasted from somewhere else.   An error in a software application caused by the copy-and-paste of erroneous code. Write the answers using your own words.

Practical Session Material Timeline - March Date Class Material Practical Session Material Slides Week 1 March 13 (1)Introduction to Course (2)Introduction to Concurrency March 16 Synchronization in Java8 & C++14 15+31 18 March 15 Synchronization Mechanisms Week 2 March 20 Liveness, Deadlock Causes and Prevention March 23 Distributed Mutual Exclusion 30 March 22 (1)Introduction to Distributed Systems (2) MapReduce (3)Case Study – Google Cluster 10+?+11 Week 3 March 27 Distributed Systems – Clock Synchronization March 30 Apache ZooKeeper vs Google Chubby 43 March 29 *Distributed Systems – Global State 17 The Chubby Lock Service for Loosely-coupled Distributed Systems ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

Practical Session Material Timeline - April Date Class Material Practical Session Material Slides Week 4 April 03 *Concurrency Control in Distributed Systems April 06 Holiday 36 April 05 Synchronization Mechanisms in Distributed Systems 32 Week 5 April 17 April 20 April 19 Actor Model and Akka Week 6 April 24 More Akka April 27 April 26 Event Driven Programming

Practical Session Material Timeline - May Date Class Material Practical Session Material Slides Week 7 May 01 Holiday May 04 May 03 Functional Programming Week 8 May 08 Persistent Data Structures May 11 May 10 Reactive Programming - RxJava Week 9 May 15 May 18 May 17 Week 10 May 22 May 25 May 24 Week 11 May 29 June 01 May 31 Week 9 May 15 May 18 May 17

Practical Session Material Timeline - June Date Class Material Practical Session Material Slides Week 12 June 05 June 08 June 07 Student Day Week 13 June 12 June 15 June 14 Week 14 June 20 June 23 June 22 Week 15 June 26 June 29 June 28