Introduction to Reactive

0 %
100 %
Information about Introduction to Reactive

Published on February 19, 2014

Author: CantinaCo



The slides from the first Boston Reactive Software Meetup: Introduction to Reactive

Boston Reactive Software Meetup

Introduction to Reactive Presented by ! Steven Pember Principal Consultant , Technical Architect at Cantina David Fox Principal Consultant , Technical Architect at Cantina !2

What is Reactive? !3

What is Reactive? A buzzword !4

What is Reactive? A popular (comp) science buzzword !5

The Reactive Manifesto Written by Jonas Bonér with contributions by Erik Meijer, Martin Odersky, Greg Young, Martin Thompson, Roland Kuhn, James Ward and Guillaume Bort. !6

tl;dr 1. WAY more traffic than just a few years ago 2. Users expect immediate response 3. Need 100% uptime 4. Large amounts of data 5. Need better models of concurrency 6. Old models like servlet showing their age !7

The Four Traits These are the traits they use to describe this class of software. !8

The Four Traits Note how they play off one another to form a cohesive whole !9

changeable The Missing Traits There should really be a couple more traits… !10

changeable The Missing Traits There should really be a couple more traits… managable !11

Reactive Technologies not just from Typesafe! !12

These are all “Reactive” technologies !13

These are all “Reactive” technologies Reactive isn’t about particular technologies, it’s a holistic view of application architecture to support the needs of the current generation of applications !14

As developers, we need to see the whole picture of the application, from the front-end to the back-end. It’s not enough to just use a “reactive framework”. !15

Spray Framework HTTP for Akka Actors !16

Akka • De-facto Actor implementation for Scala • Replaced Scala’s actor implementation • Team wanted to keep Scala smaller • Better as a separate framework • Used as basis of Play and Spray and many other frameworks !17

Actor Model • Invented in 1973 by Carl Hewitt, Peter Bishop, and Richard Steiger at MIT's AI lab • A design pattern for concurrency • Encapsulates state and behavior • Alleviates the need for locks • Allows work to be scheduled fairly !18

How do actors work? !19

Actor Receives Message Message is placed into the actor’s mailbox !20

Actor Scheduled The actor system’s scheduler schedules the actor to run in a thread. ! The actor processes a message according to its behavior !21

Execution Complete The actor state is modified. ! The scheduler will continue to fairly schedule the actor to run while its mailbox has messages. !22

Akka’s actors also have supervision strategies for failure !23

Supervision • By default, when an actor crashes, it will simply be restarted by the system ! • Other strategies can be employed such as: • Resume keeping state • Resume clearing state • Terminate the actor permanently • Escalate, failing the supervising actor !24

Other Features • • • • Finite state machine mixin Typed actor proxy for integration with nonactor-based code Location transparency / clustering Support for event/command sourcing !25

What Are the Drawbacks? • • • Programming with actors is more difficult Type safety is lost Not as easy to compose !26

Promises & Futures • Synchronization constructs/patterns • Allow use of values which will be eventually available at a later point in time • Terms sometimes used interchangeably • A promise is a container to write a value to • A future is a handle used to read that value !27

Spray Framework Live coding demo !28

Cantina is a digital agency that plans, 
 designs and builds connected experiences 
 and product innovations. !29

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Introduction to Rx

Introduction to Rx Kindle edition ... Welcome. is the online resource for getting started with the Reactive Extensions to .Net.
Read more

An Introduction to Reactive Oxygen Species - Measurement ...

Applications - White Papers An Introduction to Reactive Oxygen Species - Measurement of ROS in Cells. 26-Jan-14 View PDF file. Related Products: Cytation 3
Read more

The introduction to Reactive Programming you've been ...

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Read more

An Introduction to Reactive Oxygen Species - BioTek

2 Cellular Defense against ROS Detoxification of reactive oxygen species is paramount to the survival of all aerobic life forms. As such a number of
Read more

Introduction to Reactive Programming - InfoQ

Stephane Maldini and Rossen Stoyanchev discuss what "reactive" means and why it matters, Reactive Streams and Reactive Extensions and the emerging ...
Read more

Introduction to Reactive Gas Dynamics

Contents Introduction xiii General Notations xvii Part I "Fundamental Statistical Aspects 1 Notations to Part I ' 3 1 Statistical Description and Evolution ...
Read more

Introduction to Reactive Oxygen Species—Section 18.1 ...

Molecular Probes has available several probes that either generate or detect various reactive oxygen species, including singlet oxygen (1O2), superoxide ...
Read more

A Brief Introduction to the Reactive Extensions for .NET ...

Wow, it has been a long time since I have blogged. Yesterday, we made the first official public release of Rx on devlabs. And that means that I ...
Read more

An introduction to reactive programming - Recurse Center

An introduction to reactive programming. Nemanja Stanarevic. There has been a significant shift in recent years towards server-side and network programming ...
Read more

Beginner's Guide to Reactive Extensions for .NET

Beginner's Guide to the Reactive Extensions for .NET, including videos, essential articles, samples, books, and training.
Read more