SlideShare a Scribd company logo
1 of 14
Download to read offline
Demo the reactive jargons
Mushtaq Ahmed
ThoughtWorks
@mushtaqA
getProductPage
getModule1
getModule2
getPricing
getProductSpec
square(a: Int): Intsquares(a: Seq[Int]): Seq[Int]
Demo
● Async and NonBlocking mean different things
○ Async is about API
○ NonBlocking is about Implementation
● Async API can be implemented for Blocking calls!
● For NonBlocking calls, Sync API is not possible!
○ Macros and CPS transformations can be used to fake it
Blocking Non-blocking
Sync square(a: Int): Int XXX
Async square(a: Int): Future[Int] square(a: Int): Future[Int]
API
Implementation
Demo
● Blocking IO is contagious
○ ExecutionContext helps to quarantine it
● Separate ExecutionContext for Blocking and
NonBlocking IO
○ Like different speed lanes
Demo
● Error handling in Future is a bit difficult for bulk
operation
● Observable is a nicer alternative
○ Yet to explore: Retry, Timeout etc
● Observable API does not support backpressure
○ Be Careful not to introduce memory leaks
Single Multiple
Sync square(a: Int): Int squares(a: Seq[Int]): Seq[Int]
Async square(a: Int): Future[Int]
squares(a: Seq[Int]): Future[Seq
[Int]]
squares(a: Seq[Int]): Observable[Int]
Observable[Int] == Future[Iterable[Future[Int]]]
The code for demo is here:
https://github.com/mushtaq/pune-scala-symposium
● We like to teach Scala
● We are planning to offer a FREE training in Pune!
○ Screening based on coding test ;)
● 4 full day sessions
○ Two consecutive Friday-Saturdays
● Sometime in May or June
○ Will announce it via @punescala/Pune Scala meetup group
Thank you

More Related Content

What's hot

IBus Chinese input methods for HongKongers - Problem, Solution, Future.
IBus Chinese input methods for HongKongers - Problem, Solution, Future.IBus Chinese input methods for HongKongers - Problem, Solution, Future.
IBus Chinese input methods for HongKongers - Problem, Solution, Future.
Sammy Fung
 
Objectivec vs swift
Objectivec vs swiftObjectivec vs swift
Objectivec vs swift
Nisr Mohamed
 

What's hot (16)

CIKM Cup 2016: Cross-Device Linking
CIKM Cup 2016: Cross-Device LinkingCIKM Cup 2016: Cross-Device Linking
CIKM Cup 2016: Cross-Device Linking
 
IBus Chinese input methods for HongKongers - Problem, Solution, Future.
IBus Chinese input methods for HongKongers - Problem, Solution, Future.IBus Chinese input methods for HongKongers - Problem, Solution, Future.
IBus Chinese input methods for HongKongers - Problem, Solution, Future.
 
D422 7-2 string hadeling
D422 7-2  string hadelingD422 7-2  string hadeling
D422 7-2 string hadeling
 
Introduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScriptIntroduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScript
 
WSDM Cup 2017: Vandalism Detection
WSDM Cup 2017: Vandalism DetectionWSDM Cup 2017: Vandalism Detection
WSDM Cup 2017: Vandalism Detection
 
Feel++ webinar 9 27 2012
Feel++ webinar 9 27 2012Feel++ webinar 9 27 2012
Feel++ webinar 9 27 2012
 
Cyclomatic and cognitive complexity
Cyclomatic and cognitive complexityCyclomatic and cognitive complexity
Cyclomatic and cognitive complexity
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101
 
Іван Лаврів "Transducers for ruby developers"
Іван Лаврів "Transducers for ruby developers"Іван Лаврів "Transducers for ruby developers"
Іван Лаврів "Transducers for ruby developers"
 
Koreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko TransliteratorKoreanizer : Statistical Machine Translation based Ro-Ko Transliterator
Koreanizer : Statistical Machine Translation based Ro-Ko Transliterator
 
iOS NSAgora #3: Objective-C vs. Swift
iOS NSAgora #3: Objective-C vs. SwiftiOS NSAgora #3: Objective-C vs. Swift
iOS NSAgora #3: Objective-C vs. Swift
 
Large Scale Vandalism Detection in Knowledge Bases: PyData Berlin 2017
Large Scale Vandalism Detection in Knowledge Bases: PyData Berlin 2017Large Scale Vandalism Detection in Knowledge Bases: PyData Berlin 2017
Large Scale Vandalism Detection in Knowledge Bases: PyData Berlin 2017
 
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
[Question Paper] Object Oriented Programming with C++ (Old Course) [April / 2...
[Question Paper] Object Oriented Programming with C++ (Old Course) [April / 2...[Question Paper] Object Oriented Programming with C++ (Old Course) [April / 2...
[Question Paper] Object Oriented Programming with C++ (Old Course) [April / 2...
 
Objectivec vs swift
Objectivec vs swiftObjectivec vs swift
Objectivec vs swift
 

Similar to Demo the reactive jargons

Algorithm 110801105245-phpapp01-120223065724-phpapp02
Algorithm 110801105245-phpapp01-120223065724-phpapp02Algorithm 110801105245-phpapp01-120223065724-phpapp02
Algorithm 110801105245-phpapp01-120223065724-phpapp02
dhruv patel
 
Algorithm 110801105245-phpapp01
Algorithm 110801105245-phpapp01Algorithm 110801105245-phpapp01
Algorithm 110801105245-phpapp01
Jay Patel
 
Tw2010slide2
Tw2010slide2Tw2010slide2
Tw2010slide2
s1150036
 

Similar to Demo the reactive jargons (20)

Event Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQEvent Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQ
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...
 
Async fun
Async funAsync fun
Async fun
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Concurrency and Python - PyCon MY 2015
Concurrency and Python - PyCon MY 2015Concurrency and Python - PyCon MY 2015
Concurrency and Python - PyCon MY 2015
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Software Architecture Stories
Software Architecture StoriesSoftware Architecture Stories
Software Architecture Stories
 
Android kotlin coroutines
Android kotlin coroutinesAndroid kotlin coroutines
Android kotlin coroutines
 
GraphQL Meetup Bangkok 4.0
GraphQL Meetup Bangkok 4.0GraphQL Meetup Bangkok 4.0
GraphQL Meetup Bangkok 4.0
 
Understanding concurrency
Understanding concurrencyUnderstanding concurrency
Understanding concurrency
 
Introduction to Binary Exploitation
Introduction to Binary Exploitation	Introduction to Binary Exploitation
Introduction to Binary Exploitation
 
Algorithm 110801105245-phpapp01-120223065724-phpapp02
Algorithm 110801105245-phpapp01-120223065724-phpapp02Algorithm 110801105245-phpapp01-120223065724-phpapp02
Algorithm 110801105245-phpapp01-120223065724-phpapp02
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Algorithm 110801105245-phpapp01
Algorithm 110801105245-phpapp01Algorithm 110801105245-phpapp01
Algorithm 110801105245-phpapp01
 
Asynchronous, Event-driven Network Application Development with Netty
Asynchronous, Event-driven Network Application Development with NettyAsynchronous, Event-driven Network Application Development with Netty
Asynchronous, Event-driven Network Application Development with Netty
 
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
 
Do You Need a Service Mesh? @ London Devops, January 2019
Do You Need a Service Mesh? @ London Devops, January 2019Do You Need a Service Mesh? @ London Devops, January 2019
Do You Need a Service Mesh? @ London Devops, January 2019
 
Tw2010slide2
Tw2010slide2Tw2010slide2
Tw2010slide2
 
pure-functional-programming.pdf
pure-functional-programming.pdfpure-functional-programming.pdf
pure-functional-programming.pdf
 
JS Event Loop
JS Event LoopJS Event Loop
JS Event Loop
 

More from Thoughtworks

More from Thoughtworks (20)

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovation
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
 
When we design together
When we design togetherWhen we design together
When we design together
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloud
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go live
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the Rubicon
 
Error handling
Error handlingError handling
Error handling
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!
 
Docker container security
Docker container securityDocker container security
Docker container security
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unit
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Demo the reactive jargons

  • 1. Demo the reactive jargons Mushtaq Ahmed ThoughtWorks @mushtaqA
  • 3. square(a: Int): Intsquares(a: Seq[Int]): Seq[Int]
  • 5. ● Async and NonBlocking mean different things ○ Async is about API ○ NonBlocking is about Implementation ● Async API can be implemented for Blocking calls! ● For NonBlocking calls, Sync API is not possible! ○ Macros and CPS transformations can be used to fake it
  • 6. Blocking Non-blocking Sync square(a: Int): Int XXX Async square(a: Int): Future[Int] square(a: Int): Future[Int] API Implementation
  • 8. ● Blocking IO is contagious ○ ExecutionContext helps to quarantine it ● Separate ExecutionContext for Blocking and NonBlocking IO ○ Like different speed lanes
  • 10. ● Error handling in Future is a bit difficult for bulk operation ● Observable is a nicer alternative ○ Yet to explore: Retry, Timeout etc ● Observable API does not support backpressure ○ Be Careful not to introduce memory leaks
  • 11. Single Multiple Sync square(a: Int): Int squares(a: Seq[Int]): Seq[Int] Async square(a: Int): Future[Int] squares(a: Seq[Int]): Future[Seq [Int]] squares(a: Seq[Int]): Observable[Int] Observable[Int] == Future[Iterable[Future[Int]]]
  • 12. The code for demo is here: https://github.com/mushtaq/pune-scala-symposium
  • 13. ● We like to teach Scala ● We are planning to offer a FREE training in Pune! ○ Screening based on coding test ;) ● 4 full day sessions ○ Two consecutive Friday-Saturdays ● Sometime in May or June ○ Will announce it via @punescala/Pune Scala meetup group