SlideShare a Scribd company logo
1 of 34
Download to read offline
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Asynchronous Event Streams – when
java.util.stream met org.osgi.util.promise!
Tim Ward
http://www.paremus.com
info@paremus.com
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
•Chief Technology Officer at Paremus

•7 years developing OSGi specifications

•Chair of the OSGi IoT Expert Group

•Interested in Asynchronous Distributed Systems

•Author of Manning’s Enterprise OSGi in Action

•http://www.manning.com/cummins
Who is Tim Ward?
@TimothyWard
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Data Structure and Algorithms
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
You all remember Computer Science lectures, right?
Whether or not we think about them much, data structures are really important

Knowing when you want a List, Set or Map is a good start

Knowing the drawbacks of various implementation types is better!

Thankfully, most of the time it doesn’t matter which implementation you use

N is typically small enough for it not to matter

Modern computers are so fast that even a bad algorithm is “instant”

Most code paths aren’t super hot

The JIT Compiler is often indistinguishable from magic
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Working with simple data structures
At their most basic level data structures are “holders” for data

All you can really do is add/remove a value, or look at the existing value(s)
17 23 11 1931
The order in which the values appear is typically determined by the structure

Some data structures restrict visibility to a first/last value

We typically refer to processing the values in a data structure as “iteration”
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Iteration in Java
We’ve probably all written this code:

for(int i =0; i < list.size(); i ++) {
MyData data = list.get(i);
…
} and this code:

Iterator<MyData> it = list.iterator();
while(it.hasNext()) {
MyData data = it.next();
…
}and this code:

for(MyData data : list) {
…
}
Java’s collections make iteration easy
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Problems with iteration
Whilst Java iteration is easy, it’s still easy to make mistakes:
This is bad for Linked Lists!

for(int i =0; i < list.size(); i ++) {
MyData data = list.get(i);
…
}
“External” iteration also pushes control logic into your code!

Java 8 updated the Collections API to support “internal” iteration

Powerful functional concepts were added via the Stream API
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Iteration in Java 8
Streaming collections is very simple:

list.stream().forEach(data -> …);
Internal iteration separates the “what” from the “how” in your code

Parallel processing can occur implicitly if the list supports it

Functional pipelines allow for easy processing

list.stream()
.map(MyData::getAge)
.filter(i -> i < 15)
.count();
intermediate operations

terminal operation
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Properties of Java 8 Streams
Java 8 Streams have a number of useful properties:
They are lazy

Streams only process data on-demand

This is triggered by a “terminal operation”
They can “short circuit” 

Some operations don’t need to see the whole stream

findFirst() and findAny() can return if an element is found
Importantly the Stream is “pulling” the data from the data structure
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Streams of data
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Streams - the overloaded concept
Before Java 8, a “stream” of data was a java.io.InputStream

Whilst you probably didn’t think of it that way, you still iterated

int read;
while((read = is.read()) != -1) {
byte data = (byte) read;
…
}
The big difference with an InputStream is that it may block

A thread may get “stuck” waiting for user input, or a slow network

Java NIO has non-blocking input, but is much harder to use
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Streams - the overloaded concept (2)
An InputStream behaves like an ordered Collection of bytes

Using a Java 8 Stream over these bytes could make sense

is.forEach(data -> …)
But the InputStream may block the thread indefinitely 

If the input is asynchronous then resources are wasted by waiting

A slow function may not process data as fast as it arrives

Rapid bursts of data may overload the consumer

All of this is independent of the data, be it bytes or Objects

Java 8 Streams aren’t able to cope with asynchronous data
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Push-based asynchronous streams
•Asynchronous systems offer better performance

•This does assume that there isn’t a single bottleneck!

•Asynchronous Distributed systems typically scale better

•Less time spent waiting for high-latency calls

•More reasonable failure characteristics

•Parallelism is easier to exploit

•Network Infrastructure is intrinsically asynchronous

•Network Engineers have been working this way for decades
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Advantages of Asynchronous Programming
100% 100%
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Push-based Streams
Push-based-streams are fundamentally different from pull-based streams

The processing function is called when data arrives, not when the
previous entry has been processed

Terminal operations must be asynchronous and non-blocking

The Promise is the primitive of Asynchronous Programming

Rather than returning values a push-based stream returns a Promise

A Promise represents a delayed result that will be “resolved” later

OSGi Promises are a good option here
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Mapping Java 8 Streams to a push model
The Java 8 Stream has a rich and powerful API

Making it push-based is easier than you might think!

Change the return type of the terminal operations
Pull Push
long count() Promise<Long> count()
boolean anyMatch() Promise<Boolean> anyMatch()
boolean allMatch() Promise<Boolean> allMatch()
Optional<T> min() Promise<Optional<T>> min()
Optional<T> max() Promise<Optional<T>> max()
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Problems with this approach
This model actually works very well, but there are some problems

How do we know when an asynchronous stream has finished?

A pull-based model can simply indicate that there is no more data

Pull-based iteration offers a natural “brake” by processing elements in turn

Push-based systems can be overwhelmed by “Event Storms”

Even a single client thread can be problematic if it is too eager!

How do we cope with this?
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Using Events to communicate
Pushing the raw data into the consumer is simple, but insufficient

Consumers need a pushed event to indicate the end of a stream

Events should also be able to propagate failures

An Event is therefore a simple wrapper for data or metadata

public static enum EventType { DATA, ERROR, CLOSE };
public final class AsyncEvent<T> {
public EventType getType() { … }
public T getData() { … }
public Exception getFailure{ … }
}
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Learning lessons from Network Engineers
Push-based streams share a lot of concepts with computer networks

Asynchronous delivery

Producer and Consumer may run at different rates

TCP solves the “event storm” problem with back-pressure

The producer gets faster, but backs off if the consumer’s ACK rate drops

Our push-streams need to feed back to the data producer

The simplest way to do this is simply to say “don’t call me for a while”
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
The AsyncConsumer
A simple functional interface for consuming data:

public interface AsyncConsumer {
long accept(AsyncEvent<T> event);
}
End of Stream events can be detected and back-pressure returned

If positive then the producer should wait at least that long

If zero then continue as soon as possible

If negative then close the stream
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Buffers, Windows and Circuit Breakers
An event consumer may receive events on many threads

The event consumer may also be slow to process data

Buffering allows a thread switch, freeing up the producer’s thread

It also allows the consumer to scale up or down the number of workers

Incoming data is queued until it can be processed

The buffer can return back-pressure based on how full it is

Buffering is a built-in feature of the push-based stream

Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Buffering events
1723113119
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Buffering events (2)
What happens when the buffer gets full?

We could use an infinite buffer, but memory isn’t infinite…

Blocking is a possibility, but not very asynchronous!

A good option is simply to close the stream

This is called a “circuit breaker” - it trips if the consumer falls too far behind

This model protects against event storms
1723113119375?
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Windowing events
An event consumer may wish to receive batches of events to process

The consumer can then forward an aggregate event

Batches can be defined using an absolute number, or a time window

The underlying behaviour is similar to buffering
1723113119
17231131195 37Number
Time
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Producing data events
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Producing events
So far we’ve focussed on consuming and processing events

This is not very useful unless we can produce events!

Event producers are connected to consumers using the open() method

public interface AsyncEventSource<T> {
Closeable open(AsyncConsumer<? super T> event);
}
The returned Closeable can be used to “end” the stream

This is useful when the data stream is infinite!
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Helpful behaviours
Event Producers have to cope with multiple registrations

They also have to handle back-pressure from the consumer

Sometimes the producer has no choice about waiting!

Writing a producer should not be hard, so we provide help

Buffers/Circuit breakers mean that the producer can “ignore” back pressure

The RFC also describes a “helper” for managing multiple registrations
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Playing with streams
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Playing with push streams
Using push streams is a lot like creating Java 8 streams

Creating them is a little different! 

A Java 8 stream is created directly from a collection (or Spliterator)

Currently Push Streams use a factory to turn a Source into a Stream

The stream does not open the source until a terminal operation is invoked

No events are pushed before your pipeline is ready!
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Examples
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Example streams
All examples use an Event Source which sends Integers from 0 to N-1
Find the biggest?

createStream(10)
.max(Integer::compare);
9 (wrapped in a Promise!)
Find the first odd number?

createStream(10)
.filter(x -> x % 2 == 1)
.findFirst();
1 (also in a Promise!)
Find the combined total?

createStream(10)
.reduce(0,(a,b)-> a + b);
45 (get the idea yet?)
Count the time windowed events?

createStream(100)
.window(200, Collection::size)
.collect(toList());
It depends!
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
Demo (sort of!)
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015
•For more about OSGi...

• Specifications at http://www.osgi.org

• Enterprise OSGi in Action

• http://www.manning.com/cummins

•For more about the Push Streams

• http://github.com/osgi/design

•See the IoT Competition at 1745 today

Questions?
Thanks!
http://www.paremus.com
info@paremus.com
http://www.manning.com/cummins
Copyright © 2005 - 2015 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event - Asynchronous Event Streams Nov 2015

More Related Content

Similar to Asynchronous Event Streams – when java.util.stream met org.osgi.util.promise! - Tim Ward

„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing Architecture„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing ArchitectureGuido Schmutz
 
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?Steve Poole
 
What's the value proposition in adding automation/orchestration on top of Ser...
What's the value proposition in adding automation/orchestration on top of Ser...What's the value proposition in adding automation/orchestration on top of Ser...
What's the value proposition in adding automation/orchestration on top of Ser...Ayehu Software Technologies Ltd.
 
DisrupTech - Dave Duggal
DisrupTech - Dave DuggalDisrupTech - Dave Duggal
DisrupTech - Dave DuggalInside Analysis
 
Real-Time Event & Stream Processing on MS Azure
Real-Time Event & Stream Processing on MS AzureReal-Time Event & Stream Processing on MS Azure
Real-Time Event & Stream Processing on MS AzureKhalid Salama
 
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015Azul Systems, Inc.
 
NetApp Industry Keynote - Flash Memory Summit - Aug2015
NetApp Industry Keynote - Flash Memory Summit - Aug2015NetApp Industry Keynote - Flash Memory Summit - Aug2015
NetApp Industry Keynote - Flash Memory Summit - Aug2015Val Bercovici
 
How to (almost certainly) fail: Building vs. buying your API infrastructure
How to (almost certainly) fail: Building vs. buying your API infrastructureHow to (almost certainly) fail: Building vs. buying your API infrastructure
How to (almost certainly) fail: Building vs. buying your API infrastructureApigee | Google Cloud
 
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015Azul Systems, Inc.
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...mfrancis
 
Deploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleDeploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleAchim D. Brucker
 
Apache Storm vs. Spark Streaming - two stream processing platforms compared
Apache Storm vs. Spark Streaming - two stream processing platforms comparedApache Storm vs. Spark Streaming - two stream processing platforms compared
Apache Storm vs. Spark Streaming - two stream processing platforms comparedGuido Schmutz
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reza Rahman
 
What's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim WardWhat's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim Wardmfrancis
 
FlockData Pitch Overview
FlockData Pitch OverviewFlockData Pitch Overview
FlockData Pitch OverviewJeremy Snyder
 
FlockData Overview from Startup Pitch Night
FlockData Overview from Startup Pitch NightFlockData Overview from Startup Pitch Night
FlockData Overview from Startup Pitch NightFlockData
 
Sap penetration testing_defense_in_depth
Sap penetration testing_defense_in_depthSap penetration testing_defense_in_depth
Sap penetration testing_defense_in_depthIgor Igoroshka
 
Traffic Mgmt Demo Catalog
Traffic Mgmt Demo CatalogTraffic Mgmt Demo Catalog
Traffic Mgmt Demo CatalogSrini Alavala
 
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015Prabal Acharyya
 

Similar to Asynchronous Event Streams – when java.util.stream met org.osgi.util.promise! - Tim Ward (20)

„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing Architecture„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
 
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?
 
What's the value proposition in adding automation/orchestration on top of Ser...
What's the value proposition in adding automation/orchestration on top of Ser...What's the value proposition in adding automation/orchestration on top of Ser...
What's the value proposition in adding automation/orchestration on top of Ser...
 
DisrupTech - Dave Duggal
DisrupTech - Dave DuggalDisrupTech - Dave Duggal
DisrupTech - Dave Duggal
 
Real-Time Event & Stream Processing on MS Azure
Real-Time Event & Stream Processing on MS AzureReal-Time Event & Stream Processing on MS Azure
Real-Time Event & Stream Processing on MS Azure
 
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015
Enabling Java in Latency-Sensitive Environments - Austin JUG April 2015
 
NetApp Industry Keynote - Flash Memory Summit - Aug2015
NetApp Industry Keynote - Flash Memory Summit - Aug2015NetApp Industry Keynote - Flash Memory Summit - Aug2015
NetApp Industry Keynote - Flash Memory Summit - Aug2015
 
How to (almost certainly) fail: Building vs. buying your API infrastructure
How to (almost certainly) fail: Building vs. buying your API infrastructureHow to (almost certainly) fail: Building vs. buying your API infrastructure
How to (almost certainly) fail: Building vs. buying your API infrastructure
 
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015
Enabling Java in Latency Sensitive Environments - Dallas JUG April 2015
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
 
Deploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleDeploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large Scale
 
Apache Storm vs. Spark Streaming - two stream processing platforms compared
Apache Storm vs. Spark Streaming - two stream processing platforms comparedApache Storm vs. Spark Streaming - two stream processing platforms compared
Apache Storm vs. Spark Streaming - two stream processing platforms compared
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
 
What's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim WardWhat's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim Ward
 
FlockData Pitch Overview
FlockData Pitch OverviewFlockData Pitch Overview
FlockData Pitch Overview
 
FlockData Overview from Startup Pitch Night
FlockData Overview from Startup Pitch NightFlockData Overview from Startup Pitch Night
FlockData Overview from Startup Pitch Night
 
Sap penetration testing_defense_in_depth
Sap penetration testing_defense_in_depthSap penetration testing_defense_in_depth
Sap penetration testing_defense_in_depth
 
Traffic Mgmt Demo Catalog
Traffic Mgmt Demo CatalogTraffic Mgmt Demo Catalog
Traffic Mgmt Demo Catalog
 
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015
Data Science for IOT - Prabal Acharyya, OSIsoft Internet of Things World SF 2015
 
How NOT to Measure Latency
How NOT to Measure LatencyHow NOT to Measure Latency
How NOT to Measure Latency
 

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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 RobisonAnna Loughnan Colquhoun
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
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...Drew Madelung
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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 MountPuma Security, LLC
 
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 2024Rafal Los
 
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 MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
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...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Asynchronous Event Streams – when java.util.stream met org.osgi.util.promise! - Tim Ward

  • 1. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Asynchronous Event Streams – when java.util.stream met org.osgi.util.promise! Tim Ward http://www.paremus.com info@paremus.com
  • 2. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 •Chief Technology Officer at Paremus •7 years developing OSGi specifications •Chair of the OSGi IoT Expert Group •Interested in Asynchronous Distributed Systems •Author of Manning’s Enterprise OSGi in Action •http://www.manning.com/cummins Who is Tim Ward? @TimothyWard
  • 3. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Data Structure and Algorithms
  • 4. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 You all remember Computer Science lectures, right? Whether or not we think about them much, data structures are really important Knowing when you want a List, Set or Map is a good start Knowing the drawbacks of various implementation types is better! Thankfully, most of the time it doesn’t matter which implementation you use N is typically small enough for it not to matter Modern computers are so fast that even a bad algorithm is “instant” Most code paths aren’t super hot The JIT Compiler is often indistinguishable from magic
  • 5. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Working with simple data structures At their most basic level data structures are “holders” for data All you can really do is add/remove a value, or look at the existing value(s) 17 23 11 1931 The order in which the values appear is typically determined by the structure Some data structures restrict visibility to a first/last value We typically refer to processing the values in a data structure as “iteration”
  • 6. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Iteration in Java We’ve probably all written this code: for(int i =0; i < list.size(); i ++) { MyData data = list.get(i); … } and this code: Iterator<MyData> it = list.iterator(); while(it.hasNext()) { MyData data = it.next(); … }and this code: for(MyData data : list) { … } Java’s collections make iteration easy
  • 7. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Problems with iteration Whilst Java iteration is easy, it’s still easy to make mistakes: This is bad for Linked Lists! for(int i =0; i < list.size(); i ++) { MyData data = list.get(i); … } “External” iteration also pushes control logic into your code! Java 8 updated the Collections API to support “internal” iteration Powerful functional concepts were added via the Stream API
  • 8. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Iteration in Java 8 Streaming collections is very simple: list.stream().forEach(data -> …); Internal iteration separates the “what” from the “how” in your code Parallel processing can occur implicitly if the list supports it Functional pipelines allow for easy processing list.stream() .map(MyData::getAge) .filter(i -> i < 15) .count(); intermediate operations terminal operation
  • 9. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Properties of Java 8 Streams Java 8 Streams have a number of useful properties: They are lazy Streams only process data on-demand This is triggered by a “terminal operation” They can “short circuit” Some operations don’t need to see the whole stream findFirst() and findAny() can return if an element is found Importantly the Stream is “pulling” the data from the data structure
  • 10. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Streams of data
  • 11. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Streams - the overloaded concept Before Java 8, a “stream” of data was a java.io.InputStream Whilst you probably didn’t think of it that way, you still iterated int read; while((read = is.read()) != -1) { byte data = (byte) read; … } The big difference with an InputStream is that it may block A thread may get “stuck” waiting for user input, or a slow network Java NIO has non-blocking input, but is much harder to use
  • 12. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Streams - the overloaded concept (2) An InputStream behaves like an ordered Collection of bytes Using a Java 8 Stream over these bytes could make sense is.forEach(data -> …) But the InputStream may block the thread indefinitely If the input is asynchronous then resources are wasted by waiting A slow function may not process data as fast as it arrives Rapid bursts of data may overload the consumer All of this is independent of the data, be it bytes or Objects Java 8 Streams aren’t able to cope with asynchronous data
  • 13. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Push-based asynchronous streams
  • 14. •Asynchronous systems offer better performance •This does assume that there isn’t a single bottleneck! •Asynchronous Distributed systems typically scale better •Less time spent waiting for high-latency calls •More reasonable failure characteristics •Parallelism is easier to exploit •Network Infrastructure is intrinsically asynchronous •Network Engineers have been working this way for decades Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Advantages of Asynchronous Programming 100% 100%
  • 15. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Push-based Streams Push-based-streams are fundamentally different from pull-based streams The processing function is called when data arrives, not when the previous entry has been processed Terminal operations must be asynchronous and non-blocking The Promise is the primitive of Asynchronous Programming Rather than returning values a push-based stream returns a Promise A Promise represents a delayed result that will be “resolved” later OSGi Promises are a good option here
  • 16. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Mapping Java 8 Streams to a push model The Java 8 Stream has a rich and powerful API Making it push-based is easier than you might think! Change the return type of the terminal operations Pull Push long count() Promise<Long> count() boolean anyMatch() Promise<Boolean> anyMatch() boolean allMatch() Promise<Boolean> allMatch() Optional<T> min() Promise<Optional<T>> min() Optional<T> max() Promise<Optional<T>> max()
  • 17. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Problems with this approach This model actually works very well, but there are some problems How do we know when an asynchronous stream has finished? A pull-based model can simply indicate that there is no more data Pull-based iteration offers a natural “brake” by processing elements in turn Push-based systems can be overwhelmed by “Event Storms” Even a single client thread can be problematic if it is too eager! How do we cope with this?
  • 18. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Using Events to communicate Pushing the raw data into the consumer is simple, but insufficient Consumers need a pushed event to indicate the end of a stream Events should also be able to propagate failures An Event is therefore a simple wrapper for data or metadata public static enum EventType { DATA, ERROR, CLOSE }; public final class AsyncEvent<T> { public EventType getType() { … } public T getData() { … } public Exception getFailure{ … } }
  • 19. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Learning lessons from Network Engineers Push-based streams share a lot of concepts with computer networks Asynchronous delivery Producer and Consumer may run at different rates TCP solves the “event storm” problem with back-pressure The producer gets faster, but backs off if the consumer’s ACK rate drops Our push-streams need to feed back to the data producer The simplest way to do this is simply to say “don’t call me for a while”
  • 20. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 The AsyncConsumer A simple functional interface for consuming data: public interface AsyncConsumer { long accept(AsyncEvent<T> event); } End of Stream events can be detected and back-pressure returned If positive then the producer should wait at least that long If zero then continue as soon as possible If negative then close the stream
  • 21. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Buffers, Windows and Circuit Breakers
  • 22. An event consumer may receive events on many threads The event consumer may also be slow to process data Buffering allows a thread switch, freeing up the producer’s thread It also allows the consumer to scale up or down the number of workers Incoming data is queued until it can be processed The buffer can return back-pressure based on how full it is Buffering is a built-in feature of the push-based stream Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Buffering events 1723113119
  • 23. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Buffering events (2) What happens when the buffer gets full? We could use an infinite buffer, but memory isn’t infinite… Blocking is a possibility, but not very asynchronous! A good option is simply to close the stream This is called a “circuit breaker” - it trips if the consumer falls too far behind This model protects against event storms 1723113119375?
  • 24. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Windowing events An event consumer may wish to receive batches of events to process The consumer can then forward an aggregate event Batches can be defined using an absolute number, or a time window The underlying behaviour is similar to buffering 1723113119 17231131195 37Number Time
  • 25. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Producing data events
  • 26. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Producing events So far we’ve focussed on consuming and processing events This is not very useful unless we can produce events! Event producers are connected to consumers using the open() method public interface AsyncEventSource<T> { Closeable open(AsyncConsumer<? super T> event); } The returned Closeable can be used to “end” the stream This is useful when the data stream is infinite!
  • 27. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Helpful behaviours Event Producers have to cope with multiple registrations They also have to handle back-pressure from the consumer Sometimes the producer has no choice about waiting! Writing a producer should not be hard, so we provide help Buffers/Circuit breakers mean that the producer can “ignore” back pressure The RFC also describes a “helper” for managing multiple registrations
  • 28. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Playing with streams
  • 29. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Playing with push streams Using push streams is a lot like creating Java 8 streams Creating them is a little different! A Java 8 stream is created directly from a collection (or Spliterator) Currently Push Streams use a factory to turn a Source into a Stream The stream does not open the source until a terminal operation is invoked No events are pushed before your pipeline is ready!
  • 30. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Examples
  • 31. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Example streams All examples use an Event Source which sends Integers from 0 to N-1 Find the biggest? createStream(10) .max(Integer::compare); 9 (wrapped in a Promise!) Find the first odd number? createStream(10) .filter(x -> x % 2 == 1) .findFirst(); 1 (also in a Promise!) Find the combined total? createStream(10) .reduce(0,(a,b)-> a + b); 45 (get the idea yet?) Count the time windowed events? createStream(100) .window(200, Collection::size) .collect(toList()); It depends!
  • 32. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 Demo (sort of!)
  • 33. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015 •For more about OSGi... • Specifications at http://www.osgi.org • Enterprise OSGi in Action • http://www.manning.com/cummins •For more about the Push Streams • http://github.com/osgi/design •See the IoT Competition at 1745 today Questions? Thanks! http://www.paremus.com info@paremus.com http://www.manning.com/cummins
  • 34. Copyright © 2005 - 2015 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event - Asynchronous Event Streams Nov 2015