This document discusses functional reactive programming and RxJava. It begins with an overview of functional reactive programming principles like being responsive, resilient, elastic and message-driven. It then covers architectural styles like hexagonal architecture and onion architecture. The rest of the document dives deeper into RxJava concepts like Observables, Observers, Operators, and Schedulers. It provides code examples to demonstrate merging, filtering and transforming streams of data asynchronously using RxJava.
Microservices Part 4: Functional Reactive ProgrammingAraf Karsh Hamid
ReactiveX is a combination of the best ideas from the Observer pattern, the Iterator pattern, and functional programming. It combines the Observer pattern, Iterator pattern, and functional programming concepts. ReactiveX allows for asynchronous and event-based programming by using the Observer pattern to push data to observers, rather than using a synchronous pull-based approach.
This document provides an overview of microservices architecture, including concepts, characteristics, infrastructure patterns, and software design patterns relevant to microservices. It discusses when microservices should be used versus monolithic architectures, considerations for sizing microservices, and examples of pioneers in microservices implementation like Netflix and Spotify. The document also covers domain-driven design concepts like bounded context that are useful for decomposing monolithic applications into microservices.
This document provides an overview of Docker concepts including containers, images, Dockerfiles, and the Docker architecture. It defines key Docker terms like images, containers, and registries. It explains how Docker utilizes Linux kernel features like namespaces and control groups to isolate containers. It demonstrates how to run a simple Docker container and view logs. It also describes the anatomy of a Dockerfile and common Dockerfile instructions like FROM, RUN, COPY, ENV etc. Finally, it illustrates how Docker works by interacting with the Docker daemon, client and Docker Hub registry to build, run and distribute container images.
Building Cloud-Native App Series - Part 1 of 11
Microservices Architecture Series
Design Thinking, Lean Startup, Agile (Kanban, Scrum),
User Stories, Domain-Driven Design
Building Cloud-Native App Series - Part 2 of 11
Microservices Architecture Series
Event Sourcing & CQRS,
Kafka, Rabbit MQ
Case Studies (E-Commerce App, Movie Streaming, Ticket Booking, Restaurant, Hospital Management)
The document discusses Hyperledger Fabric, a blockchain framework. It provides an overview of why blockchain is needed to solve reconciliation issues in multi-party environments. It then summarizes key aspects of Hyperledger Fabric such as its architecture, components, and how transactions flow through the network.
Building Cloud-Native App Series - Part 3 of 11
Microservices Architecture Series
AWS Kinesis Data Streams
AWS Kinesis Firehose
AWS Kinesis Data Analytics
Apache Flink - Analytics
The document discusses API design best practices. It begins with an overview of API lifecycles and introduces two approaches to API design: design first and code first. It then outlines several design principles for APIs, including treating APIs as products and focusing on developer experience. The document also discusses OpenAPI Specification 3.0 and tools for API design like Stoplight, Restlet, and Apicurio. It concludes with complementary tools for API testing, mocking, and design.
Introducing Change Data Capture with DebeziumChengKuan Gan
This document discusses change data capture (CDC) and how it can be used to stream change events from databases. It introduces Debezium, an open source CDC platform that captures change events from transaction logs. Debezium supports capturing changes from multiple databases and transmitting them as a stream of events. The summary discusses how CDC can be used for data replication between databases, auditing, and in microservices architectures. It also covers deployment of CDC on Kubernetes using OpenShift.
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Guido Schmutz
Spark Streaming and Kafka Streams are two popular stream processing platforms. Spark Streaming uses micro-batching and allows for code reuse between batch and streaming jobs. Kafka Streams is embedded directly into Apache Kafka and leverages Kafka as its internal messaging layer. Both platforms support stateful stream processing operations like windowing, aggregations, and joins through distributed state stores. A demo application is shown that detects dangerous driving by joining truck position data with driver data using different streaming techniques.
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedAllen Terleto
The adoption and popularity of the microservices architecture continues to grow across a spectrum of enterprises in every industry. Although a consensus on an implementation standard has yet to be reached, advanced design patterns and lessons learned about the complexities and pitfalls of deploying microservices at scale have been established by thought leaders and the development community. With Redis and Kafka becoming de facto standards across most microservices architectures, we will discuss how their combination can be used to simplify the implementation of event-driven design patterns that will provide real-time performance, scalability, resiliency, traceability to ensure compliance, observability, reduced technology sprawl, and scale to thousands of services. In this discussion, we will decompose a real-time event-driven payment-processing microservices workflow to explore capturing telemetry data, event sourcing, CQRS, orchestrated SAGA workflows, inter-service communication, state machines, and more.
Building Streaming Data Applications Using Apache KafkaSlim Baltagi
Apache Kafka evolved from an enterprise messaging system to a fully distributed streaming data platform for building real-time streaming data pipelines and streaming data applications without the need for other tools/clusters for data ingestion, storage and stream processing.
In this talk you will learn more about:
1. A quick introduction to Kafka Core, Kafka Connect and Kafka Streams: What is and why?
2. Code and step-by-step instructions to build an end-to-end streaming data application using Apache Kafka
Building Cloud-Native App Series - Part 11 of 11
Microservices Architecture Series
Service Mesh - Observability
- Zipkin
- Prometheus
- Grafana
- Kiali
Kafka is a distributed publish-subscribe messaging system that provides high throughput and low latency for processing streaming data. It is used to handle large volumes of data in real-time by partitioning topics across multiple servers or brokers. Kafka maintains ordered and immutable logs of messages that can be consumed by subscribers. It provides features like replication, fault tolerance and scalability. Some key Kafka concepts include producers that publish messages, consumers that subscribe to topics, brokers that handle data streams, topics to categorize related messages, and partitions to distribute data loads across clusters.
Databus - LinkedIn's Change Data Capture PipelineSunil Nagaraj
Introduction to Databus - Linkedin's Change Data Capture Pipeline
https://github.com/linkedin/databus
as presented at Eventbrite - May 07 2013
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...Big Data Spain
This document discusses scaling the backend of a financial platform for big data and blockchain. It describes challenges integrating big data using Apache Spark and Cassandra for tasks like predictive modeling, recommendations, and credit scoring. It also covers using a microservices architecture with Spring Cloud, Docker, and Kubernetes for deployment. Blockchain integration involves a private Ethereum network on Kubernetes for tokenization and a connection to the public Ethereum mainnet using Infura for payments and transfers.
This document discusses Redis, MongoDB, and Amazon DynamoDB. It begins with an overview of NoSQL databases and the differences between SQL and NoSQL databases. It then covers Redis data types like strings, hashes, lists, sets, sorted sets, and streams. Examples use cases for Redis are also provided like leaderboards, geospatial queries, and message queues. The document also discusses MongoDB design patterns like embedding data, embracing duplication, and relationships. Finally, it provides a high-level overview of DynamoDB concepts like tables, items, attributes, and primary keys.
Machine Learning At Speed: Operationalizing ML For Real-Time Data StreamsLightbend
Audience: Architects, Data Scientists, Developers
Technical level: Introductory
From home intrusion detection, to self-driving cars, to keeping data center operations healthy, Machine Learning (ML) has become one of the hottest topics in software engineering today. While much of the focus has been on the actual creation of the algorithms used in ML, the less talked-about challenge is how to serve these models in production, often utilizing real-time streaming data.
The traditional approach to model serving is to treat the model as code, which means that ML implementation has to be continually adapted for model serving. As the amount of machine learning tools and techniques grows, the efficiency of such an approach is becoming more questionable. Additionally, machine learning and model serving are driven by very different quality of service requirements; while machine learning is typically batch, dealing with scalability and processing power, model serving is mostly concerned with performance and stability.
In this webinar with O’Reilly author and Lightbend Principal Architect, Boris Lublinsky, we will define an alternative approach to model serving, based on treating the model itself as data. Using popular frameworks like Akka Streams and Apache Flink, Boris will review how to implement this approach, explaining how it can help you:
* Achieve complete decoupling between the model implementation for machine learning and model serving, enforcing better standardization of your model serving implementation.
* Enable dynamic updates of the served model without having to restart the system.
* Utilize Tensorflow and PMML as model representation and their usage for building “real time updatable” model serving architecture.
This document discusses domain-driven design (DDD) concepts for transforming a monolithic application to microservices, including:
1. Classifying applications into areas like lift and shift, containerize, refactor, and expose APIs to prioritize high business value, low complexity projects.
2. Focusing on shorter duration projects from specifications to operations.
3. Designing around business capabilities, processes, and forming teams aligned to capabilities rather than technology.
4. Key DDD concepts like ubiquitous language, bounded contexts, and context maps to decompose the domain model into independently deployable microservices.
Designing For Multicloud, CF Summit Frankfurt 2016Mark D'Cunha
Your carefully planned cloud strategy and technology architecture is useless, because multicloud changes everything. In this session, we will explore what multicloud means and why your business will force it upon you.
We provide examples of customers successfully using multicloud models, identify early patterns of usage and how to leverage them. You’ll learn about how Cloud Foundry provides unique capabilities to simplify and implement multicloud deployments. We’ll cover how you can use features like service brokers, service plans, asynchronous provisioning and arbitrary parameters to deploy muilticloud, while still maintaining a consistent experience for your application developers and IT operations staff.
This document provides an overview of core Angular 2 concepts, including:
1) Angular 2 introduces components instead of controllers and uses a one-way data flow instead of $scope. It is also written in TypeScript.
2) Angular 2 has a new dependency injection system, improved performance, better mobile support, and server-side rendering capabilities compared to AngularJS 1.x.
3) Key concepts in Angular 2 include components, communication between components, dependency injection, and the component lifecycle. Change detection and zones are also discussed.
Building Cloud-Native App Series - Part 2 of 11
Microservices Architecture Series
Event Sourcing & CQRS,
Kafka, Rabbit MQ
Case Studies (E-Commerce App, Movie Streaming, Ticket Booking, Restaurant, Hospital Management)
The document discusses Hyperledger Fabric, a blockchain framework. It provides an overview of why blockchain is needed to solve reconciliation issues in multi-party environments. It then summarizes key aspects of Hyperledger Fabric such as its architecture, components, and how transactions flow through the network.
Building Cloud-Native App Series - Part 3 of 11
Microservices Architecture Series
AWS Kinesis Data Streams
AWS Kinesis Firehose
AWS Kinesis Data Analytics
Apache Flink - Analytics
The document discusses API design best practices. It begins with an overview of API lifecycles and introduces two approaches to API design: design first and code first. It then outlines several design principles for APIs, including treating APIs as products and focusing on developer experience. The document also discusses OpenAPI Specification 3.0 and tools for API design like Stoplight, Restlet, and Apicurio. It concludes with complementary tools for API testing, mocking, and design.
Introducing Change Data Capture with DebeziumChengKuan Gan
This document discusses change data capture (CDC) and how it can be used to stream change events from databases. It introduces Debezium, an open source CDC platform that captures change events from transaction logs. Debezium supports capturing changes from multiple databases and transmitting them as a stream of events. The summary discusses how CDC can be used for data replication between databases, auditing, and in microservices architectures. It also covers deployment of CDC on Kubernetes using OpenShift.
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Guido Schmutz
Spark Streaming and Kafka Streams are two popular stream processing platforms. Spark Streaming uses micro-batching and allows for code reuse between batch and streaming jobs. Kafka Streams is embedded directly into Apache Kafka and leverages Kafka as its internal messaging layer. Both platforms support stateful stream processing operations like windowing, aggregations, and joins through distributed state stores. A demo application is shown that detects dangerous driving by joining truck position data with driver data using different streaming techniques.
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedAllen Terleto
The adoption and popularity of the microservices architecture continues to grow across a spectrum of enterprises in every industry. Although a consensus on an implementation standard has yet to be reached, advanced design patterns and lessons learned about the complexities and pitfalls of deploying microservices at scale have been established by thought leaders and the development community. With Redis and Kafka becoming de facto standards across most microservices architectures, we will discuss how their combination can be used to simplify the implementation of event-driven design patterns that will provide real-time performance, scalability, resiliency, traceability to ensure compliance, observability, reduced technology sprawl, and scale to thousands of services. In this discussion, we will decompose a real-time event-driven payment-processing microservices workflow to explore capturing telemetry data, event sourcing, CQRS, orchestrated SAGA workflows, inter-service communication, state machines, and more.
Building Streaming Data Applications Using Apache KafkaSlim Baltagi
Apache Kafka evolved from an enterprise messaging system to a fully distributed streaming data platform for building real-time streaming data pipelines and streaming data applications without the need for other tools/clusters for data ingestion, storage and stream processing.
In this talk you will learn more about:
1. A quick introduction to Kafka Core, Kafka Connect and Kafka Streams: What is and why?
2. Code and step-by-step instructions to build an end-to-end streaming data application using Apache Kafka
Building Cloud-Native App Series - Part 11 of 11
Microservices Architecture Series
Service Mesh - Observability
- Zipkin
- Prometheus
- Grafana
- Kiali
Kafka is a distributed publish-subscribe messaging system that provides high throughput and low latency for processing streaming data. It is used to handle large volumes of data in real-time by partitioning topics across multiple servers or brokers. Kafka maintains ordered and immutable logs of messages that can be consumed by subscribers. It provides features like replication, fault tolerance and scalability. Some key Kafka concepts include producers that publish messages, consumers that subscribe to topics, brokers that handle data streams, topics to categorize related messages, and partitions to distribute data loads across clusters.
Databus - LinkedIn's Change Data Capture PipelineSunil Nagaraj
Introduction to Databus - Linkedin's Change Data Capture Pipeline
https://github.com/linkedin/databus
as presented at Eventbrite - May 07 2013
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...Big Data Spain
This document discusses scaling the backend of a financial platform for big data and blockchain. It describes challenges integrating big data using Apache Spark and Cassandra for tasks like predictive modeling, recommendations, and credit scoring. It also covers using a microservices architecture with Spring Cloud, Docker, and Kubernetes for deployment. Blockchain integration involves a private Ethereum network on Kubernetes for tokenization and a connection to the public Ethereum mainnet using Infura for payments and transfers.
This document discusses Redis, MongoDB, and Amazon DynamoDB. It begins with an overview of NoSQL databases and the differences between SQL and NoSQL databases. It then covers Redis data types like strings, hashes, lists, sets, sorted sets, and streams. Examples use cases for Redis are also provided like leaderboards, geospatial queries, and message queues. The document also discusses MongoDB design patterns like embedding data, embracing duplication, and relationships. Finally, it provides a high-level overview of DynamoDB concepts like tables, items, attributes, and primary keys.
Machine Learning At Speed: Operationalizing ML For Real-Time Data StreamsLightbend
Audience: Architects, Data Scientists, Developers
Technical level: Introductory
From home intrusion detection, to self-driving cars, to keeping data center operations healthy, Machine Learning (ML) has become one of the hottest topics in software engineering today. While much of the focus has been on the actual creation of the algorithms used in ML, the less talked-about challenge is how to serve these models in production, often utilizing real-time streaming data.
The traditional approach to model serving is to treat the model as code, which means that ML implementation has to be continually adapted for model serving. As the amount of machine learning tools and techniques grows, the efficiency of such an approach is becoming more questionable. Additionally, machine learning and model serving are driven by very different quality of service requirements; while machine learning is typically batch, dealing with scalability and processing power, model serving is mostly concerned with performance and stability.
In this webinar with O’Reilly author and Lightbend Principal Architect, Boris Lublinsky, we will define an alternative approach to model serving, based on treating the model itself as data. Using popular frameworks like Akka Streams and Apache Flink, Boris will review how to implement this approach, explaining how it can help you:
* Achieve complete decoupling between the model implementation for machine learning and model serving, enforcing better standardization of your model serving implementation.
* Enable dynamic updates of the served model without having to restart the system.
* Utilize Tensorflow and PMML as model representation and their usage for building “real time updatable” model serving architecture.
This document discusses domain-driven design (DDD) concepts for transforming a monolithic application to microservices, including:
1. Classifying applications into areas like lift and shift, containerize, refactor, and expose APIs to prioritize high business value, low complexity projects.
2. Focusing on shorter duration projects from specifications to operations.
3. Designing around business capabilities, processes, and forming teams aligned to capabilities rather than technology.
4. Key DDD concepts like ubiquitous language, bounded contexts, and context maps to decompose the domain model into independently deployable microservices.
Designing For Multicloud, CF Summit Frankfurt 2016Mark D'Cunha
Your carefully planned cloud strategy and technology architecture is useless, because multicloud changes everything. In this session, we will explore what multicloud means and why your business will force it upon you.
We provide examples of customers successfully using multicloud models, identify early patterns of usage and how to leverage them. You’ll learn about how Cloud Foundry provides unique capabilities to simplify and implement multicloud deployments. We’ll cover how you can use features like service brokers, service plans, asynchronous provisioning and arbitrary parameters to deploy muilticloud, while still maintaining a consistent experience for your application developers and IT operations staff.
This document provides an overview of core Angular 2 concepts, including:
1) Angular 2 introduces components instead of controllers and uses a one-way data flow instead of $scope. It is also written in TypeScript.
2) Angular 2 has a new dependency injection system, improved performance, better mobile support, and server-side rendering capabilities compared to AngularJS 1.x.
3) Key concepts in Angular 2 include components, communication between components, dependency injection, and the component lifecycle. Change detection and zones are also discussed.
What's Method Acting?
Method acting is a phrase that loosely refers to a family of techniques used by actors to create in themselves the thoughts and emotions of their characters, so as to develop lifelike performances.
YouTube URL: http://youtu.be/YeOGSQ8rx1c
This documentary show cases the concepts of Method Acting with examples from South Indian Movie star Mammootty, 3 time National Award Winner along with Amitabh Bachchan and Kamal Hassan.
There are 6 sections for this documentary.
Section 1 - Focuses on Vocal variations and body language
Section 2 - Ease at which Mammootty oscillates between Arts and Commercial Cinema
Section 3 - Handling a tragic scene in different ways for different characters (A Writer, A Fisherman, A Schizophrenic and a Village man).
Section 4 - 1980s - The Beginning...
Section 5 - Movies from other Languages (Tamil, Telugu, Kannada, Hindi)
Section 6 - National Award Winning performances..
Java 8 Stream API and RxJava ComparisonJosé Paumard
The slides of my JavaOne talk: Java 8 Stream API and RxJava Comparison: Patterns and Performances.
The spliterators patterns can be found here: https://github.com/JosePaumard/jdk8-spliterators.
Function point analysis is a method of estimating the size of a software or system by counting the number of inputs, outputs, inquiries, internal logical files and external interface files. It was introduced in 1979 as an alternative to simply counting lines of code. Function point analysis measures the software based on end user requirements rather than implementation details. It provides a consistent way to measure software across different projects, organizations and programming languages. The document provides an overview of function point analysis including its history, why it is needed, how it works and how it is used to estimate sizes of major software applications.
Using the Actor Model with Domain-Driven Design (DDD) in Reactive Systems - w...Lightbend
This document discusses using the actor model with domain-driven design for reactive systems. It provides an overview of the actor model and how it relates to DDD. Key points include:
- The actor model uses message passing between independent units called actors to build distributed, concurrent systems.
- The actor model is well-suited for building reactive systems to handle high volumes of asynchronous data and messages.
- DDD focuses on modeling the core domain and business logic, while actors and messaging enable rapid implementation in a clear and understandable way.
- Together, the actor model and DDD support building systems that can respond quickly to changing business needs through loose coupling and isolation of concerns.
(Video of these slides here http://fsharpforfunandprofit.com/rop)
(My response to "this is just Either" here: http://fsharpforfunandprofit.com/rop/#monads)
Many examples in functional programming assume that you are always on the "happy path". But to create a robust real world application you must deal with validation, logging, network and service errors, and other annoyances.
So, how do you handle all this in a clean functional way? This talk will provide a brief introduction to this topic, using a fun and easy-to-understand railway analogy.
Functional Programming Patterns (NDC London 2014)Scott Wlaschin
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
This document provides an overview of reactive programming in Java and Spring 5. It discusses reactive programming concepts like reactive streams specification, Reactor library, and operators. It also covers how to build reactive applications with Spring WebFlux, including creating reactive controllers, routing with functional endpoints, using WebClient for HTTP requests, and testing with WebTestClient.
Reactive programming is quite a popular topic these days. For a long time, reactive programming was constrained to interactive user interface designs. With the advancement of hardware (multi-core CPU’s) and the internet, the scale, complexity, and responsiveness of software began to rise which led to reactive programming being regarded as a major programming paradigm.
Read more from here: https://blog.lftechnology.com/introduction-to-reactive-programming-part-1-5b7c63685586
By: Subash Poudel (Software Engineer @ Leapfrog Technology, Inc.)
Microservices with Spring 5 Webflux - jProfessionalsTrayan Iliev
The document discusses reactive microservices using Spring 5 WebFlux. It introduces reactive programming concepts like Reactive Streams and Project Reactor. It explains how Spring 5 supports reactive programming with WebFlux, reactive repositories, and hot event streaming. Code examples for WebFlux routing, handlers, and reactive clients are available on GitHub.
Reactor is a foundational library for building reactive, fast data applications on the JVM. It provides components and abstractions like selectors, streams, and promises that allow applications to route and process events asynchronously at high throughput and low latency. Reactor draws from other reactive patterns and libraries and is used in various Pivotal projects like Spring and Spring XD to enable fast, event-driven architectures.
Spring 5 Webflux - Advances in Java 2018Trayan Iliev
The document discusses a presentation on functional reactive services with Spring 5 WebFlux. It introduces functional reactive programming (FRP), Project Reactor, building REST services with Spring 5 WebFlux including routers, handlers, filters, and reactive repositories. It also covers end-to-end non-blocking reactive service-oriented architecture with Netty, reactive WebClients, and real-time event streaming to JavaScript clients using server-sent events (SSE). The presentation code examples are available on GitHub.
1. Agera is a lightweight Android library for reactive programming developed by Google Play Music Team. It uses four interfaces - Observable, Supplier, Receiver, and Updatable to implement the reactive pattern.
2. Repositories are observable objects that supply data and define events as changes to the supplied data. There are simple repositories like static and mutable repositories, and complex repositories that listen to changes in other repositories.
3. Compiled repositories initialize complex repositories in one expression by specifying data sources, processing flow using operators like map and filter, and configurations like error handling. They return reactive sequences to notify subscribers of data changes.
Introduction to Apache Apex and writing a big data streaming application Apache Apex
Introduction to Apache Apex - The next generation native Hadoop platform, and writing a native Hadoop big data Apache Apex streaming application.
This talk will cover details about how Apex can be used as a powerful and versatile platform for big data. Apache apex is being used in production by customers for both streaming and batch use cases. Common usage of Apache Apex includes big data ingestion, streaming analytics, ETL, fast batch. alerts, real-time actions, threat detection, etc.
Presenter : <b>Pramod Immaneni</b> Apache Apex PPMC member and senior architect at DataTorrent Inc, where he works on Apex and specializes in big data applications. Prior to DataTorrent he was a co-founder and CTO of Leaf Networks LLC, eventually acquired by Netgear Inc, where he built products in core networking space and was granted patents in peer-to-peer VPNs. Before that he was a technical co-founder of a mobile startup where he was an architect of a dynamic content rendering engine for mobile devices.
This is a video of the webcast of an Apache Apex meetup event organized by Guru Virtues at 267 Boston Rd no. 9, North Billerica, MA, on <b>May 7th 2016</b> and broadcasted from San Jose, CA. If you are interested in helping organize i.e., hosting, presenting, community leadership Apache Apex community, please email [email protected]
Reactive Programming on Android - RxAndroid - RxJavaAli Muzaffar
Introduction to RxJava for reactive programming and how to use RxAndroid to do reactive programming on Android.
There is a sample android app to go with the slides that has all the source shown in the project.
Get ready to experience fast and scalable performance in your web applications as we dive into the world of Reactive Programming. Our guide using WebFlux is perfect for both beginners and experts a like.
Reactors.io fuses the best parts of functional reactive programming and the Actor Model. Reactors are the basic units of concurrent execution which can perform computations as well. They allow you to create concurrent and distributed applications more easily, by providing correct, robust and composable programming abstractions.
Reactive Stream Processing for Data-centric Publish/SubscribeSumant Tambe
The document discusses the Industrial Internet of Things (IIoT) and key challenges in developing a dataflow programming model and middleware for IIoT systems. It notes that IIoT systems involve large-scale distributed data publishing and processing streams in a parallel manner. Existing pub-sub middleware like DDS can handle data distribution but lack support for composable local data processing. The document proposes combining DDS with reactive programming using Rx.NET to provide a unified dataflow model for both local processing and distribution.
Андрій Рева, "How to build reactive java application"Sigma Software
The document discusses reactive programming in Java. It is presented by Andrii Reva, who has 8 years of experience in software development working with telecommunications and cloud computing. The agenda covers why reactive programming is useful, what it is, how the Reactor library works, reactive components, and questions. Reactive programming aims to immediately react to events in a non-blocking way and manage backpressure. Key technologies that help develop reactive applications include Reactor, Spring Web Flux, RDBC, RSocket, and Reactor libraries. Mono and Flux are the basic reactive types in Reactor, analogous to Optional and Stream.
This document discusses Java 8 streams and how they are implemented under the hood. Streams use a pipeline concept where the output of one unit becomes the input of the next. Streams are built on functional interfaces and lambdas introduced in Java 8. Spliterators play an important role in enabling parallel processing of streams by splitting data sources into multiple chunks that can be processed independently in parallel. The reference pipeline implementation uses a linked list of processing stages to represent the stream operations and evaluates whether operations can be parallelized to take advantage of multiple threads or cores.
Sensor data is streamed in realtime from Arduino + accelerometeres, gyroscopes & compass 3D, ultrasound distance sensor, etc. using UDP protocol. The data processing is done with reactive Java alterantive implementations: callbacks, CompletableFutures and using Spring 5 Reactor library. The web 3D visualization with Three.js is streamed using Server Sent Events (SSE).
A video for the IoT demo is available @YouTube: https://www.youtube.com/watch?v=AB3AWAfcy9U
All source code of the demo is freely available @GitHub: https://github.com/iproduct/reactive-demos-iot
There are more reactive Java demos in the same repository - callbacks, CompletableFuture, realtime event streaming. Soon I'll add a description how to build the device and upload Arduino sketch, as well as describe CompletableFuture and Reactor demos and 3D web visualization part with Three.js. Please stay tuned :)
This document provides an overview of reactive programming with RxJava. It begins with introductions to reactive programming and RxJava. It then discusses operators like map, filter, and flatMap that allow transforming and combining observable streams. It covers topics like error handling, threading with schedulers, subscriptions, and backpressure. The document includes examples of how to use various RxJava operators and concepts like transforming streams, handling errors, and improving performance with techniques like throttling.
Innovate2014 Better Integrations Through Open InterfacesSteve Speicher
- The document discusses open interfaces and integrated lifecycle tools through linked data and open standards like OSLC, taking inspiration from principles of the World Wide Web.
- It promotes using open protocols like REST and HTTP for tool integration instead of tight coupling, and outlines guidelines for using URIs, HTTP, and semantic standards like RDF and SPARQL to represent and share resource data on the web.
- OSLC is presented as a solution for lifecycle integration across requirements management, quality management, change management and other tools using common resource definitions and linked data over open APIs.
Proactive ops for container orchestration environmentsDocker, Inc.
This document discusses different approaches to monitoring systems from manual and reactive to proactive monitoring using container orchestration tools. It provides examples of metrics to monitor at the host/hardware, networking, application, and orchestration layers. The document emphasizes applying the principles of observability including structured logging, events and tracing with metadata, and monitoring the monitoring systems themselves. Speakers provide best practices around failure prediction, understanding failure modes, and using chaos engineering to build system resilience.
Building Cloud-Native App Series - Part 7 of 11
Microservices Architecture Series
Containers Docker Kind Kubernetes Istio
- Pods
- ReplicaSet
- Deployment (Canary, Blue-Green)
- Ingress
- Service
Building Cloud-Native App Series - Part 5 of 11
Microservices Architecture Series
Microservices Architecture,
Monolith Migration Patterns
- Strangler Fig
- Change Data Capture
- Split Table
Infrastructure Design Patterns
- API Gateway
- Service Discovery
- Load Balancer
Docker Kubernetes Istio
Understanding Docker and creating containers.
Container Orchestration based on Kubernetes
Blue Green Deployment, AB Testing, Canary Deployment, Traffic Rules based on Istio
The document discusses Microservices architecture and compares it to monolithic architecture. It covers topics like infrastructure for Microservices including API gateways, service discovery, event buses. It also discusses design principles like domain-driven design, event sourcing and CQRS. Microservices are presented as a better approach as they allow independent deployments, scale independently and use multiple programming languages compared to monolithic applications.
1. Microservices architecture breaks down applications into small, independent services that focus on specific business capabilities. This allows services to be developed, deployed and scaled independently.
2. The key characteristics of microservices include being organized around business capabilities, independently deployable, using lightweight protocols and decentralized governance.
3. Microservices provide benefits like scalability, testability and flexibility to change technologies. However, they also add complexity and require new skills around distributed systems.
HyperLedger Fabric is a blockchain framework that provides identity management, smart contracts (chaincode), privacy, and high transaction throughput. It uses a modular architecture consisting of peers, chaincode, ordering service, and certificate authority. Peers host the ledger and smart contracts, endorse and validate transactions. The ordering service orders transactions into blocks. Chaincode defines assets and transaction logic on the ledger. Channels provide isolation between different applications or groups of organizations.
The document discusses HyperLedger Fabric, a permissioned blockchain framework. It provides an overview of key Fabric concepts including its architecture, components, transaction flow, and how it differs from other blockchain platforms like Ethereum. The summary is as follows:
[1] HyperLedger Fabric is a permissioned blockchain framework that uses channels and smart contracts called chaincode to allow for private and confidential transactions between specific network members.
[2] It has a modular architecture consisting of peers that host the ledger and chaincode, an ordering service to sequence transactions into blocks, and a certificate authority for identity management.
[3] Transactions in Fabric are validated by endorsing peers running chaincode, ordered into blocks by
The Engineering, Procurement, and Construction (EPC) industry is highly complex, involving multiple stakeholders, high-value procurement, strict timelines, and resource-heavy project execution. In such a demanding environment, using the right ERP system is not a luxury—it's a necessity.
This presentation highlights the Top 5 Odoo ERP modules specifically tailored to meet the dynamic needs of the EPC sector. Whether you're managing large-scale infrastructure projects or specialized engineering contracts, Odoo provides an integrated solution that can streamline your entire project lifecycle.
🔍 What’s Inside:
Key challenges faced by EPC companies
Overview of essential Odoo modules
Real-world benefits of using Project, Purchase, Inventory, Field Service, and Accounting modules
How these modules contribute to cost control, real-time visibility, and operational efficiency
This presentation is designed for EPC business owners, project managers, procurement heads, and field service teams who are exploring digital transformation through Odoo ERP.
Frontier AI Regulation: What form should it take?Petar Radanliev
Frontier AI systems, including large-scale machine learning models and autonomous decision-making technologies, are deployed across critical sectors such as finance, healthcare, and national security. These present new cyber-risks, including adversarial exploitation, data integrity threats, and legal ambiguities in accountability. The absence of a unified regulatory framework has led to inconsistencies in oversight, creating vulnerabilities that can be exploited at scale. By integrating perspectives from cybersecurity, legal studies, and computational risk assessment, this research evaluates regulatory strategies for addressing AI-specific threats, such as model inversion attacks, data poisoning, and adversarial manipulations that undermine system reliability. The methodology involves a comparative analysis of domestic and international AI policies, assessing their effectiveness in managing emerging threats. Additionally, the study explores the role of cryptographic techniques, such as homomorphic encryption and zero-knowledge proofs, in enhancing compliance, protecting sensitive data, and ensuring algorithmic accountability. Findings indicate that current regulatory efforts are fragmented and reactive, lacking the necessary provisions to address the evolving risks associated with frontier AI. The study advocates for a structured regulatory framework that integrates security-first governance models, proactive compliance mechanisms, and coordinated global oversight to mitigate AI-driven threats. The investigation considers that we do not live in a world where most countries seem to be wishing to follow our ideals, for various reasons (competitiveness, geo-political dominations, hybrid warfare, loss of attractiveness of the European model in the Big South, etc.), and in the wake of this particular trend, this research presents a regulatory blueprint that balances technological advancement with decentralised security enforcement (i.e., blockchain).
Scaling up your Snapshot tests, without the frictionarnold844201
We talk about why most companies give up on snapshot tests, and how you can improve your tooling to scale up your snapshot testing (and testing) efforts
Menu in Android (Define,Create,Inflate and Click Handler)Nabin Dhakal
In Android, a **menu** provides options for user actions and navigation in an app. Menus can appear as **options menus** (accessed via the app bar), **context menus** (triggered by long-press), or **popup menus** (small floating lists). They are typically defined in XML using `<menu>` and `<item>` tags and inflated using `MenuInflater` in activities or fragments. Developers handle menu item clicks using `onOptionsItemSelected()` or similar methods. Menus help improve usability by grouping actions in a consistent interface. Common use cases include settings, search, and sharing options, offering a clean and accessible way to enhance app functionality.
Menus in Android offer a consistent and user-friendly way to present actions and navigation options within an app. By using options menus for global actions, context menus for specific UI elements, and popup menus for flexible interaction, developers can enhance the overall usability and functionality of their applications. Proper implementation of menus not only organizes actions effectively but also improves the user experience by making key features easily accessible.
How a Staff Augmentation Company IN USA Powers Flutter App Breakthroughs.pdfmary rojas
With local teams and talent aligned with U.S. business hours, a staff augmentation company in the USA enables real-time communication, faster decision-making, and better project coordination. This ensures smoother workflows compared to offshore-only models, especially for companies requiring tight collaboration.
AI Ethics: Integrating Transparency, Fairness, and Privacy in AI DevelopmentPetar Radanliev
The expansion of Artificial Intelligence in sectors such as healthcare, finance, and communication has raised critical ethical concerns surrounding transparency, fairness, and privacy. Addressing these issues is essential for the responsible development and deployment of AI systems. This research establishes a comprehensive ethical framework that mitigates biases and promotes accountability in AI technologies. A comparative analysis of international AI policy frameworks from regions including the European Union, United States, and China is conducted using analytical tools such as Venn diagrams and Cartesian graphs. These tools allow for a visual and systematic evaluation of the ethical principles guiding AI development across different jurisdictions. The results reveal significant variations in how global regions prioritise transparency, fairness, and privacy, with challenges in creating a unified ethical standard. To address these challenges, we propose technical strategies, including fairness-aware algorithms, routine audits, and the establishment of diverse development teams to ensure ethical AI practices. This paper provides actionable recommendations for integrating ethical oversight into the AI lifecycle, advocating for the creation of AI systems that are both technically sophisticated and aligned with societal values. The findings underscore the necessity of global collaboration in fostering ethical AI development.
Custom Software Development: Types, Applications and Benefits.pdfDigital Aptech
Discover the different types of custom software, their real-world applications across industries, and the key benefits they offer. Learn how tailored solutions improve efficiency, scalability, and business performance in this comprehensive overview.
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdfNorthwind Technologies
ManageEngine Endpoint Central (formerly known as Desktop Central) is an all-in-one endpoint management solution designed for managing a diverse and distributed IT environment. It supports Windows, macOS, Linux, iOS, Android, and Chrome OS devices, offering a centralized approach to managing endpoints — whether they’re on-premise, remote, or hybrid.
Portland Marketo User Group: MOPs & AI - Jeff Canada - May 2025BradBedford3
Jeff Canada is the first MOPs hire at OpenAI, the creator of ChatGPT. He is a team of 1 in a super fast growing company, which is familiar story for many of us. His presentation, originally presented at Mopsapolooza 2024, he gives you an outline of First Steps to Smarter MOPs with the warning label: This is all brand new to everyone; don’t have to jump in head first!
Jeff's story is how he was able to accomplish more via his “AI employees”. Jeff will talk about how he has used OpenAI to help him staff his team with:
AI Researcher
AI Analyst
AI Content Generator
AI Developer
These additional teammates assist with Vendor and Event Selection, Content Generation, Coding Cleanup, and Thinking! His wrap up includes, Guardrails, words of caution, and steps to get you started.
In today’s workplace, staying connected is more important than ever. Whether teams are remote, hybrid, or back in the office, communication and collaboration are at the heart of getting things done. But here’s the truth — outdated intranets just don’t cut it anymore.
Shortcomings of EHS Software – And How to Overcome ThemTECH EHS Solution
Shortcomings of EHS Software—and What Overcomes Them
What you'll learn in just 8 slides:
- 🔍 Why most EHS software implementations struggle initially
- 🚧 3 common pitfalls: adoption, workflow disruption, and delayed ROI
- 🛠️ Practical solutions that deliver long-term value
- 🔐 Key features: centralization, security, affordability
- 📈 Why the pros outweigh the cons
Perfect for HSE heads, plant managers, and compliance leads!
#EHS #TECHEHS #WorkplaceSafety #EHSCompliance #EHSManagement #ehssoftware #safetysoftware
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROIUdit Goenka
1billion people scroll, only 1 % post…
That’s your opening to hijack LinkedIn—and Autoposting.ai is the unfair weapon Slideshare readers are hunting for…
LinkedIn drives 80 % of social B2B leads, converts 2× better than every other network, yet 87 % of pros still choke on the content hamster-wheel…
They burn 25 h a month writing beige posts, miss hot trends, then watch rivals scoop the deals…
Enter Autoposting.ai, the first agentic-AI engine built only for LinkedIn domination…
It spies on fresh feed data, cracks trending angles before they peak, and spins voice-perfect thought-leadership that sounds like you—not a robot…
Slides in play:
• 78 % average engagement lift in 90 days…
• 3.2× qualified-lead surge over manual posting…
• 42 % marketing time clawed back, week after week…
Real users report 5-8× ROI inside the first quarter, some crossing $1 M ARR six months faster…
Why does it hit harder than Taplio, Supergrow, generic AI writers?
• Taplio locks key features behind $149+ tiers… Autoposting gives you everything at $29…
• Supergrow churns at 20 % because “everyone” is no-one… Autoposting laser-targets • • LinkedIn’s gold-vein ICPs and keeps them glued…
• ChatGPT needs prompts, edits, scheduling hacks… Autoposting researches, writes, schedules—and optimizes send-time in one sweep…
Need social proof?
G2 reviews scream “game-changer”… Agencies slash content production 80 % and triple client capacity… CXOs snag PR invites and investor DMs after a single week of daily posts… Employee advocates hit 8× reach versus company pages and pump 25 % more SQLs into the funnel…
Feature bullets for the skim-reader:
• Agentic Research Engine—tracks 27+ data points, finds gaps your rivals ignore…
• Real Voice Match—your tone, slang, micro-jokes, intact…
• One-click Multiplatform—echo winning posts to Twitter, Insta, Facebook…
• Team Workspaces—spin up 10 seats without enterprise red tape…
• AI Timing—drops content when your buyers actually scroll, boosting first-hour velocity by up to 4×…
Risk? Zero…
Free 7-day trial, 90-day results guarantee—hit 300 % ROI or walk away… but the clock is ticking while competitors scoop your feed…
So here’s the ask:
Swipe down, smash the “Download” or “Try Now” button, and let Autoposting.ai turn Slideshare insights into pipeline—before today’s trending topic vanishes…
The window is open… How loud do you want your LinkedIn megaphone?
Autoposting.ai Sales Deck - Skyrocket your LinkedIn's ROIUdit Goenka
Functional reactive programming
1. Functional Reactive
Programming
“It is NOT the strongest of the species that
survives, nor the most intelligent that survives. It
is the one that is the most adaptable to change.”
- Charles Darwin
Araf Karsh Hamid
3. Services
for UI
Hexagonal Architecture
Ports & Adapters
13 November 2016
3
Ports
File
system Database
Product
JPARepository
Implementation
Adapters
OrderProcessing
Domain Service
(Business Rules)
Implementation
Domain
Models
Domain Layer
Source : https://skillsmatter.com/skillscasts/5744-decoupling-from-asp-net-hexagonal-architectures-in-net
Ports and Adapters architecture style (Hexagonal
Architecture) is a variation of layered architecture style
which makes clear the separation between the Domain
Model which contains the rules of theApplication and
the adapters, which abstract the inputs to the system
and our outputs.
The advantage is the Application is decoupled from
the nature of input / output device and any
framework used to implement them.
For Eg.,When a client makes a RESTAPI request the
Adapter receives the HTTP Request and transforms
that into a call into the Domain Layer and marshals the
response back out to the client over HTTP. Similarly if
the app needs to retrieve persisted Entity to initialize
the domain it calls out to an Adapter that wraps the
access to the DB.
Order Data
Validation
OrderService
REST Service
Implementation
OrderProcessing
Interface
p
The layer between the Adapter and the Domain is identified as the Ports layer.
The Domain is inside the port, adapters for external entities are on the outside of
the port.
The notion of a “port” invokes the OS idea that any device that adheres to a known
protocol can be plugged into a port. Similarly many adapters may use the Ports.
Product,
ProductRepository
Interface
p
A
A
External
Apps
A
A A
Others
A
AOrderService
Interface
p
Web
Services
Data
Store
Use Case
Boundary
A
4. Traditional Architecture Vs. Onion Architecture + DDD
13 November 2016
4
Presentation
Business Logic (BLL)
Data Access (DAL)
Infrastructure
Others
File
system
User Interface
G
Application Services
M
Domain Services
Domain
Model
Services
Database
Order
ViewController
Product
JPARepository
Implementation
Product,
ProductRepository
Interface
OrderProcessing
DomainService
Interface
OrderProcessing
DomainService
Implementation
Source: Onion Architecture
By Jeffrey Palermo, Ex Microsoft
• Interface Driven
• Dependency Injection
• Auto wiring
• Adaptable to future
changes / enhancements
UserName
Available
Order Data
Validation
Order
Discount
Validation
6. Functional Reactive Programming
13 November 2016
6
ResilientElastic
Message – Driven
1. A responsive, maintainable &
Extensible application is the
goal.
2. A responsive application is both
scalable (Elastic) and resilient.
3. Responsiveness is impossible to
achieve without both scalability
and resilience.
4. A Message-Driven architecture
is the foundation of scalable,
resilient, and ultimately
responsive systems.
Value
Means
Form
Principles What it means?
Responsive thus React to users demand
Resilient thus React to errors and failures
Elastic thus React to load
Message-Driven thus React to events and messages
Source: http://reactivex.io/
Responsive Maintainable Extensible
8. 13 November 2016
8
Functional Reactive Programming : Design Patterns
Single
Component Pattern
A Component shall do ONLY one thing,
But do it in FULL.
Single Responsibility Principle By DeMarco : Structured
Analysis & System Specification (Yourdon, New York, 1979)
Let-It-Crash
Pattern
Prefer a FULL component restart to
complex internal failure handling.
Candea & Fox: Crash-Only Software (USENIX HotOS IX, 2003)
Popularized by Netflix Chaos Monkey. Erlang Philosophy
Saga
Pattern
Divide long-lived distributed
transactions into quick local ones with
compensating actions for recovery.
Pet Helland: Life Beyond Distributed Transactions CIDR 2007
9. 4 Building Blocks of RxJava
13 November 2016
9
Observer Listens for emitted values [ Receiver ]
Observable Source of Data Stream [ Sender ]
Client Server
Request
Response
Traditional Synchronous Pull
Communications
1. The Observer subscribes (listens) to the Observable
2. Observer react to what ever item or sequence of items the Observable emits.
3. Many Observers can subscribe to the same Observable
Observer Observableon Next
on Completed
on Error
Time
Subscribes
Non Blocking
Time
1
2
Source: http://reactivex.io/
10. 4 Building Blocks of RxJava
13 November 2016
10
Schedulers
Operators
Content Filtering
Time Filtering
Transformation
Schedulers are used to manage and control
concurrency.
1. observeOn: Thread Observable is executed
2. subscribeOn: Thread subscribe is executed
Operators that let you
Transform, Combine,
Manipulate, and work
with the sequence of
items emitted by
Observables
3
4
Source: http://reactivex.io/
11. Observable Design Pattern (Marble Diagram)
13 November 2016
11
• An Observer subscribes to an Observable.
• Then that observer reacts to whatever item or sequence of items the
Observable emits.
1
Building
Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html | http://rxmarbles.com
12. Observable / Observer Design Pattern
13 November 2016
12
• Allows for Concurrent Operations: the
observer does not need to block while
waiting for the observable to emit values
• Observer waits to receive values when
the observable is ready to emit them
• Based on push rather than pull
1 & 2
Building
Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
13. What’s missing from GOF Observer Pattern
13 November 2016
13
1
Building
Block
Source:http://reactivex.io/intro.html
1.The ability for the producer to signal to the consumer that there
is no more data available (a foreach loop on an Iterable
completes and returns normally in such a case; an Observable
calls its observer’s onCompleted method)
2.The ability for the producer to signal to the consumer that an
error has occurred (an Iterable throws an exception if an error
takes place during iteration; an Observable calls its
observer’s onError method)
3.Multiple Thread Implementations and hiding those details.
4.Dozens of Operators to handle data.
14. Compare Iterable Vs. Observable
13 November 2016
14
Observable is the asynchronous / push
dual to the synchronous pull Iterable
• Composable: Easily chained together or
combined
• Flexible: Can be used to emit:
• A scalar value (network result)
• Sequence (items in a list)
• Infinite streams (weather sensor)
• Free from callback hell: Easy to transform
one asynchronous stream into another
Observables are:
Event
Iterable
(Pull)
Observable
(Push)
Retrieve Data T next() onNext(T)
Discover Error
throws
Exception
onError
(Exception)
Complete !hasNext() onComplete()
1
Building
Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
15. Comparison : Iterable / Streams / Observable
13 November 2016
15
1
Building
Block
First Class Visitor (Consumer)
Serial Operations
Parallel Streams (10x Speed)
Still On Next, On Complete and
On Error are Serial Operations
Completely Asynchronous
Operations
Java 8 – Blocking CallJava 6 – Blocking Call Rx Java - Freedom
16. Observer<T> Contract
13 November 2016
16
Methods:
• onNext(T)
• onError(Throwable T)
• onCompleted()
onError / onCompleted called exactly
once
2
Building
Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
X
|
Time Line
17. RxJava Scheduler Details
13 November 2016
17
Source: http://reactivex.io/documentation/scheduler.html
• If you want to introduce multithreading into your cascade of
Observable operators, you can do so by instructing those operators
(or particular Observables) to operate on particular Schedulers.
• By default, an Observable and the chain of operators that you apply
to it will do its work, and will notify its observers, on the same thread
on which its Subscribe method is called.
• The SubscribeOn operator changes this behavior by specifying a
different Scheduler on which the Observable should operate.
TheObserveOn operator specifies a different Scheduler that the
Observable will use to send notifications to its observers.
3
Building
Block
18. RxJava Scheduler Threading Details
13 November 2016
18
Source: http://reactivex.io/documentation/scheduler.html
Scheduler Purpose
1 Schedulers.computation ( ) Meant for computational work such as event-loops and callback
processing; do not use this scheduler for I/O.
(useSchedulers.io( ) instead)
The number of threads, by default, is equal to the number of processors
2 Schedulers.from(executor) Uses the specified Executor as a Scheduler
3 Schedulers.immediate ( ) Schedules work to begin immediately in the current thread
4 Schedulers.io ( ) Meant for I/O-bound work such as asynchronous performance of
blocking I/O, this scheduler is backed by a thread-pool that will grow as
needed; for ordinary computational work, switch to
Schedulers.computation( );
Schedulers.io( ) by default is a CachedThreadScheduler, which is
something like a new thread scheduler with thread caching
5 Schedulers.newThread ( ) Creates a new thread for each unit of work
6 Schedulers.trampoline ( ) Queues work to begin on the current thread after any already-queued
work
3Building
Block
20. The Problem? How Rx Helps!
13November2016
20
2
Building
Block
Apple Basket
Fruit Processor
Scenario
1. A Basket Full of Apples
2. Fruit Processor capacity (limit) is 3 Apples at a time.
The Problem
1. I don’t have time to wait till the Fruit Processor finishes it’s job.
2. I don’t mind having multiple Fruit Processors too. But that still
doesn’t solve the problem
What I need
1. I want to start the Process and leave.
2. Once the processing is done, then the system should inform me.
3. If something goes wrong, then the system should inform me.
Me = the calling program
21. RxJava : Examples – Handling Fruit Processor
13 November 2016
21
1
Building
Block
Completely Asynchronous
Operations
Rx Java - Freedom
1. Abstract Fruit
2. Fruit (Interface)
3. Apple
4. Orange
5. Grapes
6. Mixed Fruit
(Aggregate Root)
Entities
1. Fruit Processor (Domain
Service) - Observer
2. Fruit Basket Repository
3. Fruit Basket Observable
Factory
Business Layer
Next Section focuses more on Operators and how to handle
business logic in Asynchronous world!
1. Rx Java Example : Observable / Observer / Scheduler
Implementation
2. Rx Java Example 2 : Merge / Filters (on Weight) / Sort (on Price)
Source Code GIT: https://meta-magic.github.io/rxjava/
22. RxJava : Entities & Repositories
13 November 2016
22
1
Building
Block
Source Code GIT: https://meta-magic.github.io/rxjava/
Fruit Interface Abstract Fruit Fruit Repository
23. RxJava : Entities
13 November 2016
23
1
Building
Block
Source Code GIT: https://meta-magic.github.io/rxjava/
Apple Orange Grapes
24. RxJava : Apple Fruit Basket : Observable
13 November 2016
24
1
Building
Block
Source Code GIT: https://meta-magic.github.io/rxjava/
1. This function calls the Apple Basket Repository
function to load the data.
2. Observable is created using the collection from
the data returned by the Repository
3. Call method checks if the Observer is
subscribed
4. If Yes for Each Apple it calls the Observer to do
the action = observer.onNext (fruit)
5. Once the process is completed
6. Observable will call the on Completed method
in Observer.
7. If an error occurs then Observable will call the
on Error method in Observer
Fruit Basket Observable
25. RxJava : Fruit Processor : Observer
13 November 2016
25
1
Building
Block
Source Code GIT: https://meta-magic.github.io/rxjava/
1. Fruit Processor implements Subscriber
(Observer) interface
2. On Next Method Implementation. Main
Business logic is done over here. Observable
will call on Next and pass the Fruit Object for
processing.
3. On Complete Method. Observable will call this
method once the processing is done.
4. If Any error occurred then Observable will call
on Error method and pass on the Exception.
5. call() implements the Func1 for filtering. Weight
is passed as a parameter in Fruit Processor
Constructor.
FruitProcessorObserver
Fruit Processor Handles the Business Logic
26. 26
Bringing all the
pieces together
Apple Basket
Fruit ProcessorObservable / Observer / Schedulers / Operators
Source Code GIT: https://meta-magic.github.io/rxjava/
27. RxJava Operator : Merge 3 Streams
13November2016
27
4Building
Block
Objective:
Merge Three Data Streams (Apple Fruit Basket, Orange Fruit Basket & Grapes Fruit Basket) into a Single Stream and
do the Processing on that new Stream Asynchronously
A1 is the Apple Series, O1 is the Orange Series & G1 is the Grapes Series
Rx Example 2
Source Code GIT: https://meta-magic.github.io/rxjava/
28. RxJava Operator : Merge / Filter Streams
13November2016
28
4Building
Block
Objective:
From the previous three Merged streams Filter Fruits which weighs more than 50 grams.
Rx Example 2
29. RxJava Operator : Merge / Filter / Sort
13November2016
29
4Building
Block
Objective:
From the previous three Merged streams Filter Fruits which weighs more than 50 grams and sort on Price (Asc).
Rx Example 2
Don’t Use
toBlocking()
in Production
Code
30. RxJava Operator : Filter / Sort / FlatMap
13November2016
30
4Building
Block
Objective:
toSortedList() returns an Observable with a single List containing Fruits.
Using FlatMap to Transform Observable <List> to Observable <Fruit>
Rx Example 2
31. The Problem? How Rx Helps!
13November2016
31
2
Building
Block
Scenario – Three Different Data streams
1. Movie database, Movie Reviews, Movie Trivia
2. Based on the Recommendation Engine combine all the three above and
send the final result to end-user / customer.
The Problem / Rule
1. No Synchronous Calls allowed
What I need
1. Movie Suggestion based on recommendation Engine
2. Filter the suggested movies based on the User filter (Movie Ratings)
3. Once the movies are identified, combine all the other related info and
Zip (Movies, Reviews & Trivia) it into a Single Entity (Movie Titles) and
send the collection back to the caller.
32. Movie Example
RxJava Operator : Filter / Sort / FlatMap
13November2016
32
4Building
Block
Objective:
toSortedList() returns an Observable with a single List containing Movies. Using
FlatMap to Transform Observable <List> to Observable <MovieTitle>
33. RxJava Operator Details
13 November 2016
33
4Building
Block
Source: http://reactivex.io/
Creating Observables
Operators that originate new Observables.
• Create — create an Observable from scratch by calling observer methods programmatically
• Defer — do not create the Observable until the observer subscribes, and create a fresh
Observable for each observer
• Empty/Never/Throw — create Observables that have very precise and limited behavior
• From — convert some other object or data structure into an Observable
• Interval — create an Observable that emits a sequence of integers spaced by a particular
time interval
• Just — convert an object or a set of objects into an Observable that emits that or those
objects
• Range — create an Observable that emits a range of sequential integers
• Repeat — create an Observable that emits a particular item or sequence of items repeatedly
• Start — create an Observable that emits the return value of a function
• Timer — create an Observable that emits a single item after a given delay
34. RxJava Operator Details
13 November 2016
34
4Building
Block
Source: http://reactivex.io/
Transforming Observables
Operators that transform items that are emitted by an Observable.
• Buffer — periodically gather items from an Observable into bundles and emit these
bundles rather than emitting the items one at a time
• FlatMap — transform the items emitted by an Observable into Observables, then flatten
the emissions from those into a single Observable
• GroupBy — divide an Observable into a set of Observables that each emit a different group
of items from the original Observable, organized by key
• Map — transform the items emitted by an Observable by applying a function to each item
• Scan — apply a function to each item emitted by an Observable, sequentially, and emit
each successive value
• Window — periodically subdivide items from an Observable into Observable windows and
emit these windows rather than emitting the items one at a time
35. RxJava Operator Details
13 November 2016
35
4Building
Block
Source: http://reactivex.io/
Filtering Observables
Operators that selectively emit items from a source Observable.
• Debounce — only emit an item from an Observable if a particular timespan has passed without it
emitting another item
• Distinct — suppress duplicate items emitted by an Observable
• ElementAt — emit only item n emitted by an Observable
• Filter — emit only those items from an Observable that pass a predicate test
• First — emit only the first item, or the first item that meets a condition, from an Observable
• IgnoreElements — do not emit any items from an Observable but mirror its termination notification
• Last — emit only the last item emitted by an Observable
• Sample — emit the most recent item emitted by an Observable within periodic time intervals
• Skip — suppress the first n items emitted by an Observable
• SkipLast — suppress the last n items emitted by an Observable
• Take — emit only the first n items emitted by an Observable
• TakeLast — emit only the last n items emitted by an Observable
36. RxJava Operator Details
13 November 2016
36
4Building
Block
Source: http://reactivex.io/
Combining Observables
Operators that work with multiple source Observables to create a single Observable
• And/Then/When — combine sets of items emitted by two or more Observables by means of Pattern
and Plan intermediaries
• CombineLatest — when an item is emitted by either of two Observables, combine the latest item
emitted by each Observable via a specified function and emit items based on the results of this
function
• Join — combine items emitted by two Observables whenever an item from one Observable is
emitted during a time window defined according to an item emitted by the other Observable
• Merge — combine multiple Observables into one by merging their emissions
• StartWith — emit a specified sequence of items before beginning to emit the items from the source
Observable
• Switch — convert an Observable that emits Observables into a single Observable that emits the
items emitted by the most-recently-emitted of those Observables
• Zip — combine the emissions of multiple Observables together via a specified function and emit
single items for each combination based on the results of this function
37. RxJava Operator Details
13 November 2016
37
4Building
Block
Source: http://reactivex.io/
Observable Utility Operators
A toolbox of useful Operators for working with Observables
• Delay — shift the emissions from an Observable forward in time by a particular amount
• Do — register an action to take upon a variety of Observable lifecycle events
• Materialize/Dematerialize — represent both the items emitted and the notifications sent as
emitted items, or reverse this process
• ObserveOn — specify the scheduler on which an observer will observe this Observable
• Serialize — force an Observable to make serialized calls and to be well-behaved
• Subscribe — operate upon the emissions and notifications from an Observable
• SubscribeOn — specify the scheduler an Observable should use when it is subscribed to
• TimeInterval — convert an Observable that emits items into one that emits indications of the
amount of time elapsed between those emissions
• Timeout — mirror the source Observable, but issue an error notification if a particular period of
time elapses without any emitted items
• Timestamp — attach a timestamp to each item emitted by an Observable
• Using — create a disposable resource that has the same lifespan as the Observable
38. RxJava Operator Details
13 November 2016
38
4Building
Block
Source: http://reactivex.io/
Conditional and Boolean Operators
Operators that evaluate one or more Observables or items emitted by Observables
• All — determine whether all items emitted by an Observable meet some criteria
• Amb — given two or more source Observables, emit all of the items from only the first of these
Observables to emit an item
• Contains — determine whether an Observable emits a particular item or not
• DefaultIfEmpty — emit items from the source Observable, or a default item if the source
Observable emits nothing
• SequenceEqual — determine whether two Observables emit the same sequence of items
• SkipUntil — discard items emitted by an Observable until a second Observable emits an item
• SkipWhile — discard items emitted by an Observable until a specified condition becomes false
• TakeUntil — discard items emitted by an Observable after a second Observable emits an item or
terminates
• TakeWhile — discard items emitted by an Observable after a specified condition becomes false
39. RxJava Operator Details
13 November 2016
39
4Building
Block
Source: http://reactivex.io/
Mathematical and Aggregate Operators
Operators that operate on the entire sequence of items emitted by an Observable
• Average — calculates the average of numbers emitted by an Observable and emits this average
• Concat — emit the emissions from two or more Observables without interleaving them
• Count — count the number of items emitted by the source Observable and emit only this value
• Max — determine, and emit, the maximum-valued item emitted by an Observable
• Min — determine, and emit, the minimum-valued item emitted by an Observable
• Reduce — apply a function to each item emitted by an Observable, sequentially, and emit the
final value
• Sum — calculate the sum of numbers emitted by an Observable and emit this sum
Backpressure Operators
• backpressure operators — strategies for coping with Observables that produce items more
rapidly than their observers consume them
40. RxJava Operator Details
13 November 2016
40
4Building
Block
Source: http://reactivex.io/
Connectable Observable Operators
Specialty Observables that have more precisely-controlled subscription dynamics
• Connect — instruct a connectable Observable to begin emitting items to its subscribers
• Publish — convert an ordinary Observable into a connectable Observable
• RefCount — make a Connectable Observable behave like an ordinary Observable
• Replay — ensure that all observers see the same sequence of emitted items, even if they subscribe after the
Observable has begun emitting items
Operators to Convert Observables
• To — convert an Observable into another object or data structure
Error Handling Operators
Operators that help to recover from error notifications from an Observable
• Catch — recover from an onError notification by continuing the sequence without error
• Retry — if a source Observable sends an onError notification, re-subscribe to it in the hopes that it will
complete without error
#7: http://reactivex.io/
http://techblog.netflix.com/2013/01/reactive-programming-at-netflix.html
http://reactivex.io/learnrx/
Download the API:
https://github.com/ReactiveX/RxJava
http://mvnrepository.com/artifact/io.reactivex/rxjava/1.1.0
http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/
https://realm.io/
http://blog.reactiveprogramming.org/
What is Reactive Programming?
https://medium.com/reactive-programming/what-is-reactive-programming-bc9fa7f4a7fc#.57mt1ieow
What is Functional Reactive Programming?
https://www.bignerdranch.com/blog/what-is-functional-reactive-programming/
Reactive Programming Patterns with Java 8 Features
https://www.youtube.com/watch?v=tiJEL3oiHIY
Going Reactive with Java 8
https://www.youtube.com/watch?v=y-8sHHbMks4
Reactive Programming for Java Developers
https://www.youtube.com/watch?v=fz31sbwOYq8
http://www.slideshare.net/rickbwarren/building-scalable-stateless-applications-with-rx-java?related=1
#10: Stanford Unv: Rx
https://www.youtube.com/watch?v=y9xudo3C1Cw
https://dzone.com/articles/using-rx-java-observable
https://github.com/Betterment/DaggerStarter
http://www.grahamlea.com/2014/07/rxjava-threading-examples/
RxJava in Different Flavours
http://instil.co/2014/08/05/rxjava-in-different-flavours-of-java/
https://github.com/Netflix/RxJava
https://github.com/Netflix/RxJava/wiki
http://www.infoq.com/author/Erik-Meijer
React conference http://www.youtube.com/playlist?list=PLSD48HvrE7-Z1stQ1vIIBumB0wK0s8llY
Cat picture taken from http://www.teckler.com/en/Rapunzel