SlideShare a Scribd company logo
Tamir Dresher
Senior Software Architect
November 2015
Reactiveness All The Way
About Me
• Software architect, consultant and instructor
• Software Engineering Lecturer @ Ruppin Academic Center
• Reactive Extensions in Action (Manning)
@tamir_dresher
tamirdr@codevalue.net
http://www.TamirDresher.com.
Software Architecture is like Pasta
3
By @benorama
4
Social
media
RSS feeds
GPS
Server management
Your System
Being Reactive
5
Responsive
Resilience
React to users
React to failures
http://www.reactivemanifesto.org/
Resiliency
6
You know you have a distributed system when the crash of a
computer you’ve never heard of stops you from getting any
work done.
- Leslie Lamport -
Being Reactive
7
Responsive
Resilience
React to users
React to failures
Being Reactive
8
Responsive
Resilience
Message Driven
React to users
React to failures
React to messages
Being Reactive
9
Responsive
Elastic Resilience
Message Driven
React to users
React to failuresReact to load
React to messages
Being Reactive
10
Responsive
Elastic Resilience
Message Driven
React to users
React to failuresReact to load
React to messages
Reacting to Changes (notifications) with Rx
• Observables
• Observers
• Operators
• www.ReactiveX.io
11
g(x)
f(x)
Rx Example
12
1. At least 4 characters
2. Don’t overflow server (0.5 sec delay)
3. Don’t send the same string again
4. Discard results if another search was requested
Rx Example
13
Rx.Observable.fromEvent($('#input'),'keyup')
.map(e => e.target.value)
.filter(text => text.length > 3)
.throttle(500 /* ms */)
.distinctUntilChanged()
.flatMapLatest(searchWikipedia)
.subscribe(
data => {
/* handle the results */},
error => {
/* handle any errors */});
Observable.FromEventPattern(txtBox,“TextChanged”)
.Select(_ => txtBox.Text);
.Where(txt => txt.Length > 3);
.Throttle(TimeSpan.FromSeconds(0.5))
.DistinctUntilChanged()
.Select(text => SearchAsync(text))
.Switch()
.Subscribe(
results => {
/* handle the results */ },
ex => {
/* handle any errors */ } );
RxJS Rx.NET
Back Pressure
14
3 per sec 1 per sec
http://www.reactive-streams.org/
Publisher Subscriber
demand
• “Push” behavior when consumer is
faster
• “Pull” behavior when producer is
faster
The Actor Model (Hewitt et al. 1973)
15
Alice
Mailbox
Bob
Sally
Mailbox
Mailbox
“the Actor model retained
more of what I thought
were the good features of
the object idea.”
Alan Kay
Object Orientation pioneer
and Smalltalk co-designer
Alice
Parent
Bob
Parent
Sally
Parent
Akka Example
16
class SimpleActor extends Actor {
override def receive: Receive = {
case x =>
println("Received message: " + x)
}
}
object Main extends App {
val system = ActorSystem(“actor-system")
val anActor: ActorRef =
system.actorOf(Props[SimpleActor])
anActor ! "Hello world"
} akka {
actor.deployment {
/simpleActor {
remote = "akka://actor-system@127.0.0.1:3232"
}
}
}
Akka Parental Supervision
17
override val supervisorStrategy =
OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case _: ArithmeticException => Resume
case _: NullPointerException => Restart
case _: IllegalArgumentException => Stop
case _: Exception => Escalate
}
1. OneForOneStrategy – affect only the failing child
2. AllForOneStrategy – affects the failing child & it’s siblings
Child
Parent
Child
Summary
18
manning.com/dresher
Discount code:
ctwswarch
http://www.reactivemanifesto.org/
Presenter contact details
t: @tamir_dresher
e: tamirdr@codevalue.net
b: TamirDresher.com
w: www.codevalue.net

More Related Content

Similar to Reactiveness All The Way - SW Architecture 2015 Conference

Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
 
CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
David Hoerster
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
Araf Karsh Hamid
 
Scale up your thinking
Scale up your thinkingScale up your thinking
Scale up your thinking
Yardena Meymann
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
Araf Karsh Hamid
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_groupSkills Matter
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
Peter Lawrey
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
Erin Schnabel
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
Roy Russo
 
Streamlining with rx
Streamlining with rxStreamlining with rx
Streamlining with rx
Akhil Dad
 
10-DesignPatterns.ppt
10-DesignPatterns.ppt10-DesignPatterns.ppt
10-DesignPatterns.ppt
TAGADPALLEWARPARTHVA
 
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Flip Kromer
 
RxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android MontréalRxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android Montréal
Sidereo
 
Sharing-akka-pub
Sharing-akka-pubSharing-akka-pub
Sharing-akka-pub
Hendri Karisma
 
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYCBuilding a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Konrad Malawski
 
Microservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive ProgrammingMicroservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive Programming
Araf Karsh Hamid
 
CrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked dataCrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked data
Raphael do Vale
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
Marcus Denker
 
Give your microservices a bus ride with MassTransit
Give your microservices a bus ride with MassTransitGive your microservices a bus ride with MassTransit
Give your microservices a bus ride with MassTransit
Alexey Zimarev
 

Similar to Reactiveness All The Way - SW Architecture 2015 Conference (20)

Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
 
CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Scale up your thinking
Scale up your thinkingScale up your thinking
Scale up your thinking
 
Functional reactive programming
Functional reactive programmingFunctional reactive programming
Functional reactive programming
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJava
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
 
Streamlining with rx
Streamlining with rxStreamlining with rx
Streamlining with rx
 
10-DesignPatterns.ppt
10-DesignPatterns.ppt10-DesignPatterns.ppt
10-DesignPatterns.ppt
 
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
 
RxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android MontréalRxJava pour Android : présentation lors du GDG Android Montréal
RxJava pour Android : présentation lors du GDG Android Montréal
 
Sharing-akka-pub
Sharing-akka-pubSharing-akka-pub
Sharing-akka-pub
 
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYCBuilding a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
 
Microservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive ProgrammingMicroservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive Programming
 
CrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked dataCrawlerLD - Distributed crawler for linked data
CrawlerLD - Distributed crawler for linked data
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
 
Give your microservices a bus ride with MassTransit
Give your microservices a bus ride with MassTransitGive your microservices a bus ride with MassTransit
Give your microservices a bus ride with MassTransit
 

More from Tamir Dresher

NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdfNET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
Tamir Dresher
 
Tamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptxTamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher
 
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher
 
Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#
Tamir Dresher
 
Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher   Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher
Tamir Dresher
 
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
Tamir Dresher   Clarizen adventures with the wild GC during the holiday seasonTamir Dresher   Clarizen adventures with the wild GC during the holiday season
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
Tamir Dresher
 
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
Tamir Dresher
 
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
From zero to hero with the actor model  - Tamir Dresher - Odessa 2019From zero to hero with the actor model  - Tamir Dresher - Odessa 2019
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
Tamir Dresher
 
Tamir Dresher - Demystifying the Core of .NET Core
Tamir Dresher  - Demystifying the Core of .NET CoreTamir Dresher  - Demystifying the Core of .NET Core
Tamir Dresher - Demystifying the Core of .NET Core
Tamir Dresher
 
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Tamir Dresher
 
.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher
Tamir Dresher
 
Testing time and concurrency Rx
Testing time and concurrency RxTesting time and concurrency Rx
Testing time and concurrency Rx
Tamir Dresher
 
Building responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresherBuilding responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresher
Tamir Dresher
 
.NET Debugging tricks you wish you knew tamir dresher
.NET Debugging tricks you wish you knew   tamir dresher.NET Debugging tricks you wish you knew   tamir dresher
.NET Debugging tricks you wish you knew tamir dresher
Tamir Dresher
 
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx  - CodeMash2017 - Tamir DresherBuilding responsive applications with Rx  - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
Tamir Dresher
 
Debugging tricks you wish you knew - Tamir Dresher
Debugging tricks you wish you knew  - Tamir DresherDebugging tricks you wish you knew  - Tamir Dresher
Debugging tricks you wish you knew - Tamir Dresher
Tamir Dresher
 
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
Rx 101  - Tamir Dresher - Copenhagen .NET User GroupRx 101  - Tamir Dresher - Copenhagen .NET User Group
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
Tamir Dresher
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Tamir Dresher
 
Rx 101 Codemotion Milan 2015 - Tamir Dresher
Rx 101   Codemotion Milan 2015 - Tamir DresherRx 101   Codemotion Milan 2015 - Tamir Dresher
Rx 101 Codemotion Milan 2015 - Tamir Dresher
Tamir Dresher
 
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications -  Tamir DresherLeveraging Dependency Injection(DI) in Universal Applications -  Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
Tamir Dresher
 

More from Tamir Dresher (20)

NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdfNET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
 
Tamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptxTamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptx
 
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6
 
Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#
 
Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher   Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher
 
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
Tamir Dresher   Clarizen adventures with the wild GC during the holiday seasonTamir Dresher   Clarizen adventures with the wild GC during the holiday season
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
 
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
 
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
From zero to hero with the actor model  - Tamir Dresher - Odessa 2019From zero to hero with the actor model  - Tamir Dresher - Odessa 2019
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
 
Tamir Dresher - Demystifying the Core of .NET Core
Tamir Dresher  - Demystifying the Core of .NET CoreTamir Dresher  - Demystifying the Core of .NET Core
Tamir Dresher - Demystifying the Core of .NET Core
 
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
 
.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher
 
Testing time and concurrency Rx
Testing time and concurrency RxTesting time and concurrency Rx
Testing time and concurrency Rx
 
Building responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresherBuilding responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresher
 
.NET Debugging tricks you wish you knew tamir dresher
.NET Debugging tricks you wish you knew   tamir dresher.NET Debugging tricks you wish you knew   tamir dresher
.NET Debugging tricks you wish you knew tamir dresher
 
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx  - CodeMash2017 - Tamir DresherBuilding responsive applications with Rx  - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
 
Debugging tricks you wish you knew - Tamir Dresher
Debugging tricks you wish you knew  - Tamir DresherDebugging tricks you wish you knew  - Tamir Dresher
Debugging tricks you wish you knew - Tamir Dresher
 
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
Rx 101  - Tamir Dresher - Copenhagen .NET User GroupRx 101  - Tamir Dresher - Copenhagen .NET User Group
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
 
Rx 101 Codemotion Milan 2015 - Tamir Dresher
Rx 101   Codemotion Milan 2015 - Tamir DresherRx 101   Codemotion Milan 2015 - Tamir Dresher
Rx 101 Codemotion Milan 2015 - Tamir Dresher
 
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications -  Tamir DresherLeveraging Dependency Injection(DI) in Universal Applications -  Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Reactiveness All The Way - SW Architecture 2015 Conference

Editor's Notes

  1. שלום לכולם, תודה שהצטרפתם אלי ביום חורפי זה
  2. שמי תמיר דרשר, אני יועץ בחברת קוד ווליו שמלבד היותה חברת יעוץ במגוון נושאים וטכנולוגיות, היא גם מרכז הפיתוח של כלי הDebugging OzCode ו כמו כן אני מרצה במרכז האקדמי רופין אחד הbuzzwords שאנחנו שומעים יותר ויותר בשנים האחרונות הוא נושא ה Reactiveness של מערכות ושל אפליקציות ובשפות תכנות באופן כללי. גם אותי זה נורא הלהיב, ובפרט הטכנולוגיה שנקראת זה הלהיב אותי כל כך שכתבתי ספר בנושא Reactive Extensions in Action בהוצאת manning קצת Self Promotion לא הזיק אבל בוא נקח רגע צעד אחורה ונסתכל על האבולוציה של הארכיטקטורות שלנו כמו כן אני מרצה במרכז האקדמי רופין אחד הbuzzwords שאנחנו שומעים יותר ויותר בשנים האחרונות הוא נושא ה Reactiveness של מערכות ושל אפליקציות ובשפות תכנות באופן כללי. גם אותי זה נורא הלהיב, ובפרט הטכנולוגיה שנקראת זה הלהיב אותי כל כך שכתבתי ספר בנושא Reactive Extensions in Action בהוצאת manning קצת Self Promotion לא הזיק
  3. ארכיטקטורת תוכנה היא נורא דומה לפסטה ואפשר לראות את ההתפתחות שלנו כתעשיה בוסג הפסטה שאנחנו משתמשים בהתחלה כולנו כתבנו ספגטי קוד עם GOTO ואז למדנו שאי אפשר אפילו להבין ולתחזק את מה שאנחנו כתבנו אז עברנו למודל הלזניה והתחלנו לכתוב הכל בשכבות ואז ראינו שלהכין את הלזניה כחתיכה אחת זה לא מספיק טוב, בטח כשיש לנו המון סועדים ועדיף לנו לחלק אותה לחתיכות קטנות יותר מה שיצר את מודל הרביולי – אותם microservices שהם הBUZZWORD שכולם נהנים להגיד איך שלא יהיה, בסופו של דבר יש לנו משתמש שנמצא בקצה אחד שרוצה לקבל שירות, בין אם המשתמש אנושי או מערכת אחרת. והמטרה הסופית שלנו כשעשינו את המערכת זה שהיא תדע להגיב כמו כן אני מרצה במרכז האקדמי רופין אחד הbuzzwords שאנחנו שומעים יותר ויותר בשנים האחרונות הוא נושא ה Reactiveness של מערכות ושל אפליקציות ובשפות תכנות באופן כללי. גם אותי זה נורא הלהיב, ובפרט הטכנולוגיה שנקראת זה הלהיב אותי כל כך שכתבתי ספר בנושא Reactive Extensions in Action בהוצאת manning קצת Self Promotion לא הזיק אבל בוא נקח רגע צעד אחורה ונסתכל על האבולוציה של הארכיטקטורות שלנו
  4. המערכת שאתנחנו כותבים היום, יותר מתמיד, צריכות להגיב למסה הולכת וגדלה של אירועים ושל שינויים מרכיבי מסך שמעלים אירועים ועד לחיישנים שמזרימים לנו עדכונים המערכת שלנו צריכה להגיב לכל זה, ולעשות את זה בזמן סביר אחרת המשתמשים שלנו מתעצבנים ועוזבים
  5. ההגדרה למה זה מערכות שהם reaectiv מפורט במסמך שנקרא reactive manifesto שפורסם בשנת 2014 ובעצם מסכם סדרה של עקרונות ומאייפינים למערכת שהיא ריאקטיבית הדבר הראשון שאנחנו מגדירים במערכת שהיא ריאקטיבית הוא: responsive הדבר הראשון והחשוב ביותר הוא הצורך שלנו להגיב למשתמשים (בין אם הם אנושיים או שהם מערכות אחרות) המערכת צריכה להגיב בזמן הגיוני לפניות שמתקבלות. אנחנו לא רוצים שהמערכת תעבור סף זמן מסוים לפני שהיא תחזיר תשובה ואני מדבר פה על כל סוג של תשובה. גם להגיד תודה קיבלתי את הפניה זאת תשובה נהדרת זה מה שנקרא להיות רספונסיבי וזה היעד שאנחנו מנסים להגיע אליו.
  6.   resilient כמובן שעובדת החיים היא שתקלות ושגיאות קורות. זה לא שאנחנו רוצים את זה או מכוונים שזה מה שיקרה אבל אין מה לעשות זה יקרה. ולכן המערכת שלנו צריכה לדעת להגיב לכשלונות (react to failures) להגיב במובן הזה אומר לדעת להתמודד ולהתאושש. כיוון שאחרת לא יהיה לנו responsiveness לדעת להיות resilient לא אומר שאנחנו מנסים לבנות מערכת מושלמת, כזו שאף פעם לא נכשלת. זה רק אומר שאנחנו צריכים לתכנן את המערכת כך שהיא תדע להתמודד עם כשלונות של החלקים שלה. זה אומר למשל לבנות את המערכת בצורה מחולקת כך שכשלון של חלק אחד לא ישפיע על חלק אחר. או לבנות את המערכת כך שחלקים מסוימים ישוכפלו ככה שאם אחד מהם קורס יש אחר שיקח את מקומו. גישה הreactive מקובלת היא לנקוט במבנה של supervision כך שחלק אחד ינטר חלק אחר ויגיב כשהוא נכשל
  7.   Message driven אם כל המאפיינים שדיברנו עליהם עד עכשיו הם היעדים שאנחנו רוצים מהמערכת אז גישה מונחית הודעות היא ישום של איך אפשר להשיג אותם. כשנעבוד בגישה כזו אנחנו אוטומטית הופכים את התקשורת של לאסינכרונית ולכן באופן מיידי עושים decoupling בין החלקים של המערכת גם במובן של ה-interfaces שהם חושפים וגם מבחינת הזמן הרבה יותר קל לנו לעשות שינויים במבנה המערכת כך שיחידה מסוימת תטפל בהודעה מסוימת או תעשה לה ראוטינג. והרבה יותר קל לשנות את הpriority והסדר של הטיפול בהודעות. כל רכיב במערכת בוחר איך להגיב להודעות בצורה שונה. הודעה מסוימת יכולה להיות הטריגר שלנו לעשות שינוי על כמות הnodes שאנחנו מרימים כדי לטפל בבקשות הבאות. כך שמערכת מגיבה בצורה דינמית ויחד עם האלסטיות אנחנו זוכים למערכת נושמת שמותאמת לצרכים האמיתיים בשטח. ה-decoupling שאנחנו מקבלים בעבודה מבוססת הודעות כך שאין תלות בclient מסוים על מי יטפל בבקשה מאפשר לנו לשלוט בlatency   כל החלקים יחד בסופו של דבר כל המרכיבים מתחברים ביחד. כדי להשיג רספונסיביות אנחנו צריכים שהמערכת תהיה resilience. כדי שנשיג reslieincy אננו רוצים מימד של בקרה על התקשורות ועל הנפילות של החלקים השונים בלי לאבד את הבקשות בדרך. וזה מתקבל על ידי התקשורת שמבוססת על הודעות. כמו כן, ההודעות שמתקבלות מחזקות את היכולת של המערכת להיות רספונסיבית כי קבלת ההודעה לא אומר טיפול בה ולכן תגובה מיידית על קבלת ההודעה עושה את המערכת רספונסיבית. על בסיס ההודעות הללו אנחנו יכולים להשיג אלסטיות שמשנה את מבנה המערכת בסיס כמות ההודעות שיש והמשמעות הספציפית לכל אחת. וכמובן ברגע שהערכת אלסטית אנחנו משיגים resiliency
  8.     elastic ככל שהזמן חולף ככה המערכת שלנו תיחשף לעומסים שונים אני מקווה בשביל כולכם שהעומס על המערכת שלכם רק יגדל, אבל עומס יכול לגדול בתקופה מסוימת ולרדת בתקופה אחרת כדי להיות responsive ו-resilient המערכת חייבת להיות גמישה. כשהעומס עולה נוסיף Nodes או שנעלה את ה-scale של Nodes אחרים.
  9. בסופו של דבר כל המרכיבים מתחברים ביחד. כדי להשיג רספונסיביות אנחנו צריכים שהמערכת תהיה resilience. כדי שנשיג reslieincy אננו רוצים מימד של בקרה על התקשורות ועל הנפילות של החלקים השונים בלי לאבד את הבקשות בדרך. וזה מתקבל על ידי התקשורת שמבוססת על הודעות. כמו כן, ההודעות שמתקבלות מחזקות את היכולת של המערכת להיות רספונסיבית כי קבלת ההודעה לא אומר טיפול בה ולכן תגובה מיידית על קבלת ההודעה עושה את המערכת רספונסיבית. על בסיס ההודעות הללו אנחנו יכולים להשיג אלסטיות שמשנה את מבנה המערכת בסיס כמות ההודעות שיש והמשמעות הספציפית לכל אחת. וכמובן ברגע שהערכת אלסטית אנחנו משיגים resiliency
  10. הרכיבים במערכת שלנו צריכים לדעת עכשיו להגיב להודעות שמתקבלות אצל חלק מהרכיבים, למשל הclients שלנו, צריכים להגיב לשינויים שקורים והם לא בהכרח הודעות, למשל תגובה לסנסורים או להקלדות של משתמש – או בקצרה שינוים. זה דורש מאתנו מודל של תגובה לשינויים ואבטסטרקציה על מקור השינויים. בין המקור הוא queue שאנחנו קוראים ממנו הודעות או תיבת טקסט על המסך. אנחנו צריכים מודל שגם יודע להסתכל על אוסף המקורות הללו ועל איך מטפלים במקרים שהם תלויים אחד בשני, או קורים ביחד. בטרמינולוגיה של Rx מקור של הודעות או שינויים נקראה observable והצרכן של השינויים נקרא observer בין שניהם יכולים לבוא אוסף של אופרטורים שמאפשרים להגדיר טרנספורמציות, קומבינציות, פילטורים, אגרגציות ושליטה באורך החיים של הקשר. כך שאפשר לקבל complex event processing היופי בRx שהטרימינלוגיה והסגנון הוא פורטבילי ולא משהו שספציפי רק לשפה אחת – יש לנו Rx לJAVA ל-C++ C# Swift וזה נראה כמעט אותו דבר
  11. כך נראת דוגמא בJS וב-C# בשתי הדוגמאות אנחנו הופכים תיבת טקסט לobservable עבור כל שינוי טקסט לוקחים את הערך של הטקסט אם הוא ארוך משלושה תוים ואם עבר זמן של חצי שניה מההקלדה האחרונה ואם ערך הטקסט שונה מהטקסט שכבר קיבלנו עבורו תוצאות בפעם האחרונה אנחנו מבצעים חיפוש על פי הטקסט בצורה אסינכרונית ודואגים שאם הטקסט שונה בזמן שממתינים לתוצאות של החיפודש הקודם אחנו נזרוק את התוצאות שיגיעו ונחכה לתוצאות של הטקסט החדש בסופו של דבר הobserver שלנו מקבל תוצאות אם שגיאות ויכול להציג אותן על המסך או לעבד אותן
  12. המודל של הObservable והobserver עובד מאוד טוב אבל אחת הבעיות היא שאם הקצב של הObservable גבוה מהקצב של הobserver אנחנו מגיעים למצב של backpresuure , נוצר לנו עומס שדוחף אחורה, כדי לנסות לתת מענה נוצר הspec של reactive streams שבעצם מוסיף לפרוטוקול בין הobservable ל-observer אפשרות לobserver להודיע לobservable שהוא עמוס ולסמן לו מתי הוא פנוי לקבל עוד נוטיפיקציות Rx לכשעצמו עדיין לא עובד לפי הreactive streams.
  13. מודל נוסף שמקיים את הדרישות של ארכיטקטורה שהיא reactive הוא הActor model הוצג ע"י Carl Hewitt ב1973
  14. Resume the subordinate, keeping its accumulated internal state Restart the subordinate, clearing out its accumulated internal state Stop the subordinate permanently Escalate the failure, thereby failing itself