The term “reactive” has lately become a buzzword, with a variety of definitions around the Web. When you hear reactive, what do you think of? Reactive Streams? The Reactive Manifesto? ReactJS? These terms may seem unrelated, but they share a common core concept.
Reactive applications and reactive programming result in flexible, concise, performant code and are a superior alternative to the old standard thread-based imperative programming model. The reactive approach has gained popularity recently for one simple reason: we need alternative designs and architectures to meet today’s demands. However, it can be difficult to shift one’s mind to think in reactive terms due to how accustomed we’ve become to the imperative style.
Stephen Pember explores the various definitions of reactive and reactive programming with the goal of providing techniques for building efficient, scalable applications. Steve dives into the key concepts of Reactive Streams and examines some sample implementations—including how ThirdChannel is currently using reactive libraries in production code. Steve looks at some of the open source options available in the JVM—including Reactor, RxJava, and Ratpack—giving attendees an idea of where to begin with the reactive ecosystem. If reactive is new to you, this should be an excellent introduction.
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
An Introduction to Reactive Application, Reactive Streams, and options for JVM
1. An introduction to reactive
applications, Reactive Streams, and
options for the JVM
Steve Pember
CTO, ThirdChannel
Software Architecture Con, 2016
THIRDCHANNEL @svpember
45. THIRDCHANNEL @svpember
What is Rx?
• Collections + Time
• A Single Abstraction over data from different sources
• Observer Pattern with Push-based iterators
• Stream Based Functional Programming
• … with Extensions for Reactive Programming
• Async is easy
• Backpressure
56. THIRDCHANNEL @svpember
Groovy
• Dynamic Language for the JVM
• Less Verbose (Reduce Java Boilerplate)
• Ruby/Python - esque Collections
• Run Time Meta Programming
• Optionally Typed
• AST Transformations
• Powerful Annotations
• Multi - Inheritance via Traits and @DelegatesTo
87. Don’t Unsubscribe from Observables
Programmatically complete them
when another Observable fires
88.
89. THIRDCHANNEL @svpember
AutoComplete Requirements
• Wait 250 ms between keypresses before querying
• If no keys are pressed, no query
• Successful queries should render movies
• Any new queries should kill in-flight queries
111. THIRDCHANNEL @svpember
Akka & Akka Streams
• Library
• Definition of Reactive System
• Created by LightBend
• Actor-Based Concurrency
• Implemented Streams on Top of Actor Model
117. THIRDCHANNEL @svpember
• Library
• Reactive Streams
• Reactor Pattern
• Built on LMAX Ring Buffer / Disrupter
• Multiple libraries to extend Ring Buffer in multiple ways