The Architecture of Wemlin Hub Ognen Ivanovski, Netcetera Jug.ch - - PowerPoint PPT Presentation

the architecture of wemlin hub
SMART_READER_LITE
LIVE PREVIEW

The Architecture of Wemlin Hub Ognen Ivanovski, Netcetera Jug.ch - - PowerPoint PPT Presentation

The Architecture of Wemlin Hub Ognen Ivanovski, Netcetera Jug.ch 15 Wemlin Data Data Planning Software Planning Software AVCS AVCS Wemlin Hub g Wemlin Hub Plan Data transport schedule (plan) over certain time package in nature


slide-1
SLIDE 1

The Architecture of Wemlin Hub

Ognen Ivanovski, Netcetera Jug.ch ‘15

slide-2
SLIDE 2

Wemlin

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5

Data

slide-6
SLIDE 6

Data

Planning Software

slide-7
SLIDE 7

Planning Software

slide-8
SLIDE 8

AVCS

slide-9
SLIDE 9

AVCS

slide-10
SLIDE 10

Wemlin Hub

slide-11
SLIDE 11

g

Wemlin Hub

slide-12
SLIDE 12

Plan Data

transport schedule (plan) over certain time package in nature Formats: HAFAS, GTFS, VDV 453 REF, VDV 454 REF, REST

slide-13
SLIDE 13

RT Streams

updates on planned data stream in nature Formats: GTFS RT, VDV-453, VDV-454, REST

slide-14
SLIDE 14
slide-15
SLIDE 15

Getting Data

different protocols & implementations remote system availability issues

slide-16
SLIDE 16

Figuring things out

different sources, no referential guarantees every data source is different data quality issues Example: station refeferences Example: trip references

slide-17
SLIDE 17

Data Enrichment

line colors location station metadata (e.g. which lines stop there, which stations are near by)

slide-18
SLIDE 18

Serve many users

slide-19
SLIDE 19

Key Concerns

RT

low latency throughput available excllent failure management

Batch

throughput

slide-20
SLIDE 20

Key Concerns

processing programs the same for both batch and RT data

slide-21
SLIDE 21

Key Concerns

fast reaction to load changes

slide-22
SLIDE 22

Architecture

Constraints decisions hard to change

slide-23
SLIDE 23
slide-24
SLIDE 24

Microkernel Architectural Style

slide-25
SLIDE 25

tap filter transform aggregate sink

slide-26
SLIDE 26

tap sink

slide-27
SLIDE 27

filter

public interface Filter { boolean accept(Object obj); }

stateless

slide-28
SLIDE 28

transform

public interface Transformer { Object transform(Object original); }

stateless

slide-29
SLIDE 29

aggregate

public interface Aggregator { Optional<?> aggregate(Object obj); }

slide-30
SLIDE 30

Composition

pipeElement = PipelineBuilder.from(gtfsInputJunction()) .transform(new StoppingPlaceResolver()) .filter(new InvalidStopsFilter()) .transform(new UnresolvedLineVehicleTypeAdder()) .transform(new UnresolvedLineNameAdjuster()) .transform(new LineResolver()) .transform( new LineColorsEnricher(...)) .aggregate(new CacheAggregator(cache())) .to(nullSink());

slide-31
SLIDE 31

Model

immutable: model objects are values (changing means a new object) algebraic: each object identity is defined by it's contents. pure: in the sense of no external dependencies

slide-32
SLIDE 32

Schedule Trip Stop Station Line

Projection

Stopping Place

slide-33
SLIDE 33

Architecture

Model

Pure Java Immutable Algebraic Inverse References

Pipeline

Functional Microkernel Filter (stateless, pure function) Transformer (stateless, pure function) Aggregator (stateful, function) Sink (consumer) / Tap (producer)

slide-34
SLIDE 34

pipeElement = PipelineBuilder.from(gtfsInputJunction()) .transform(new StoppingPlaceResolver()) .filter(new InvalidStopsFilter()) .transform(new UnresolvedLineVehicleTypeAdder()) .transform(new UnresolvedLineNameAdjuster()) .transform(new LineResolver()) .transform( new LineColorsEnricher(...)) .aggregate(new CacheAggregator(cache())) .to(nullSink());

slide-35
SLIDE 35
slide-36
SLIDE 36

pipeline “compile” assembly

slide-37
SLIDE 37
slide-38
SLIDE 38

Assemblies

Spring Integration based Thread-pool based Fork-join based

slide-39
SLIDE 39

Segments

parallel / serial separated by queues segmentation based on the used interfaces

slide-40
SLIDE 40

Fork-Join

to be effective, one must batch batching introduces latency (in RT) trick batch mode RT mode

slide-41
SLIDE 41

Memoization at construction time

Problem: immutable objects —> lots of created objects @DesignatedFactoryMethod AspectJ runtime weaver

slide-42
SLIDE 42

hornet backends frontend

slide-43
SLIDE 43

Scaling

slide-44
SLIDE 44

Storage

In-memory custom store replacable just an Aggregator makes blue-green deployments a beeze

slide-45
SLIDE 45

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-46
SLIDE 46

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-47
SLIDE 47

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-48
SLIDE 48

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-49
SLIDE 49

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-50
SLIDE 50

Wins

Constraint

immutable model algebraic model Inverse references controlled state (functional) microkernel style

Gain

execution stragety freedom parallelism scalability memoization at constructor time cacheability composability

slide-51
SLIDE 51

Architecture is Important

It’s the set of constraints you choose for your system It how those constraints work in concert It happens on a smaller scale than you usually think

slide-52
SLIDE 52

Acknowledgments

Clojure 
 (especially Rich Hickey’s talk on values, state and identity) Lamina
 https://github.com/ztellman/lamina Apache Storm
 https://storm.incubator.apache.org Casading
 http://www.cascading.org Akka
 http://akka.io

slide-53
SLIDE 53

Thank You

  • gnen.ivanovski@netcetera.com

@ognenivanovski

?