SlideShare a Scribd company logo
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attributio n-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
SPRINGONE2GX
WASHINGTON, DC
High Performance Stream
Processing
By Stephane Maldini, Glenn Renfro, David Turanski
@smaldini, @cppwfs, @dturanski
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Performance as it pertains to:
Message flow
Serialization
Processing
2
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Message Flow: The Myth?
3
“1 million events a second?”
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Message Flow: The Myth?
4
“It Depends”
https://spring.io/blog/2015/06/17/spring-xd-benchmarks-part-1
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Message Flow: The Myth?
5
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Hardware
• Check Network speed
• iperf
• Check Disk Read Write speed
• dd
• Processor Speed (specs)
6
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Hardware: Network
7
1 Gb Ethernet
Msg Size Msgs/Sec
100 1,250,000
1,000 125,000
10,000 12,500
100,000 1,250
10 Gb Ethernet
Msg Size Msgs/Sec
100 12,500,000
1,000 1,250,000
10,000 125,000
100,000 12,500
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Hardware: Disk
• dd bs=1M count=256 if=/dev/zero of=test
• will just commit your 128 MB of data into a RAM buffer
• initially fast but server is still writing to disk after test
• dd bs=1M count=256 if=/dev/zero of=/tmp/testfile
conv=fdatasync
• This tells dd to require a complete “sync” once, right before it
exits.
• Ensures all data is on the disk before calculating result
8
https://romanrm.net/dd-benchmark
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Message Size
9
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Message Size
10
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Transports
• Rabbit
• perftest
• https://www.rabbitmq.com/java-tools.html
• Kafka
• ProducerPerformance
• kafka-consumer-perf-test.sh
• https://engineering.linkedin.com/kafka/benchmarking-apache-
kafka-2-million-writes-second-three-cheap-machines
11
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Testing Tools
• Spring XD
• load-generator-source
• throughput
• https://github.com/spring-projects/spring-xd-modules
12
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Configuration
• Kafka
• BatchSize
o Default is 16384
o .0.8.2.1 vs .0.8.1.1
• Rabbit
• prefetch
o Default for XD is 1
13
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Batching
• https://github.com/cppwfs/rabbitmqsink
• https://github.com/cppwfs/rabbitmqsource
14
Spring AMQP
Batch
Size
Msgs
Per Sec
1 18,465
10 158,564
100 453,926
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Network Hops
• Adds a cost per hop
• Options:
• Direct Binding
• Composed Modules
• Custom Module
15
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
One last little thing
• JMX is disabled by default
• When enabled it took a performance hit
because how SI was capturing stats via its
exporters
16
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Object Serialization
POJO ⇔ byte[] required for transporting data
between remote processes
• XD uses Kryo except when the payload type is
byte[] or String
• XD supports optimizing Kryo for known payload
types
17
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Serialization Benchmarks
18
An excellent comparative JVM serializers benchmark:
https://github.com/eishay/jvm-serializers/wiki
Best case: ~1500 ns
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Serialization Benchmarks
19
{"media":
{"uri": "http://javaone.com/keynote.ogg", "title":"Javaone Keynote", "width":640,
"height":480,
"format":"video/mpg4","duration":18000000,"size":58982400,"bitrate":262144,"
persons":["Bill Gates", "Steven Jobs"],
"player":"JAVA","copyright":"" },
"images":[
{"uri": "http://javaone.com/keynote_large.jpg","title":"Javaone Keynote","width":
1024,"height":768,"size":"LARGE"},
{ "uri": "http://javaone.com/keynote_small.jpg", "title":"Javaone
Keynote","width": 320,"height":240, "size":"SMALL"}]
}
Domain Object (as JSON):
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Object Serialization
• Size matters: YMMV
• Manually optimized Kryo ser/deser ~ 1500 ns = 1.5 µs = .0015
ms.
• Kafka XD;1000B messages ~ 500,000 msg/sec
• 2000 ns per message
• Serialization overhead
• ~ 285174 msg/sec (source|sink)
• At 50,000 msg/sec, the overhead may still be significant
(source|p1|p2|p3|sink)
20
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Optimizing Kryo in XD
• Disable references - If you know payload
types do not contain cyclic references.
xd.codec.kryo.references=false (in servers.yml)
• This is a global setting for all streams
• Register a custom serializer for a known
payload type
• Install a jar with containing the required beans in xd/lib. XD
will auto-configure these
21
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Custom Serializers in XD
22
public PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars, boolean useReferences)
package spring.xd.bus.ext;
...
@Configuration
public class CustomKryoRegistrarConfig {
@Bean
public KryoRegistrar myCustomRegistration() {
List<Registration> registrations = new ArrayList<>();
registrations.add(new Registration(MyObject.class, new MySerializer(),62));
return new KryoRegistrationRegistrar(registrations);
}
}
XD scans this
package for beans of
type KryoRegistrar
Each Registration associates
a type to a serializer and a
unique ID
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Custom Serializers in XD
23
public class AddressSerializer extends Serializer<Address> {
@Override
public void write(Kryo kryo, Output output, Address address) {
output.writeString(address.getStreet());
output.writeString(address.getCity());
output.writeString(address.getCountry());
}
@Override
public Address read(Kryo kryo, Input input, Class<Address> type) {
return new Address(input.readString(),input.readString(),input.readString());
}
}
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Serializable Domain Object
24
public class Address implements KryoSerializable {
...
@Override
public void write(Kryo kryo, Output output) {
output.writeString(this.street);
output.writeString(this.city);
output.writeString(this.country);
}
@Override
public void read(Kryo kryo, Input input) {
this.street = input.readString();
this.city = input.readString();
this.country = input.readString();
}
}
• (+) Simple: This
works out of the box
with no additional
configuration
• (-) Requires access
to source or wrapping
• (-) Internal
benchmarks indicate
this is not as fast as
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Benchmarking Your Custom Serializers
25
Sample Results Ser (ns) Desr (ns)
Baseline 2710.5 4590.9
Serializable Domain
Object
1663.3 2579.1
Custom Serializers 1126.1 2873.8
The spring-xd-samples repo includes a serialization-
benchmarks project
• https://github.com/spring-projects/spring-xd-
samples/tree/master/serialization-benchmarks
Let’s look at some code…
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
What about Processing ?
• Source Msg/s > Sink Msg/s ?
• Rate limited by Sink
• Blocking transformation (http, file…) ?
• Rate limited by blocking Processor
• Polling Sources Pausing ?
• Rate limited by small Prefetch properties
26
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Mitigating Cost of IO
• Negative impact ?
• Scale Out ?
o Loosing Data Affinity (colocation…)
o Network cost
• Scale Up ?
o Message passing Overhead
o More In-Flight Data
27
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Mitigating Cost of IO
• Negative impact ?
• Scale Out ?
o Loosing Data Affinity (colocation…)
o Network cost
• Scale Up ?
o Message passing Overhead
o More In-Flight Data
28
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Blocking IO
29
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Asynchronous IO
30
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Asynchronous IO
• Mitigate temporarily slow processors/sink
• Back to degraded mode when queue full
• Async Hand-Off generates Garbage
31
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Reactor Core:
Efficient Asynchronous
• Trade-off Memory vs Garbage generation
• Pre-Allocated Ring Buffer
• Concurrent consuming without duplicating
buffer content
• Ring Buffer Consumer Sequences
32
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Ring
What?
33
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Module Teasing
34
@EnableReactorModule(concurrency = 4) /* Invoke accept() 4 times */
public class Sample implements ReactiveProcessor<Message, Message> {
@Override
public void accept(
Publisher<Message> messageStream, /* A Ring Buffer Consumer */
ReactiveOutput<Message> output) { /* A Channel Output bridge */
output.writeOutput(messageStream);
}
}
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Questions
35
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 36
Microservices to Fast Data
John T. Davies
Learn More. Stay Connected.
@springcentral Spring.io/video
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
37
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
USING THIS TEMPLATE
38
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
STOP! Download Fonts Now.
PLEASE DOWNLOAD AND INSTALL THESE FONTS BEFORE CREATING
YOUR PRESENTATION. You can download the fonts here…
https://www.dropbox.com/s/na8jewnsp8dp659/SpringOne-2015-Fonts.zip?dl=0
Fonts included in the ZIP file:
• Proxima Nova (body text)
• Domine (included but no longer needed)
http://www.fontspring.com/support/installing/how-do-i-install-fonts-on-my-mac
http://www.fontspring.com/support/installing/how-do-i-install-fonts-on-my-windows-pc
39
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Intro
This template has been carefully prepared with specific layouts, colors, fonts and
more. This short intro will outline the basic components of this template.
Note: This template includes slides with approved color palette, fonts, logos and
clip art. It’s a good idea to keep these slides in order to quickly access these assets
then delete the slides when you have finished creating your presentation.
40
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Inserting New Slides and Applying Layouts
• To create different types of slides, select New Slide and apply desired Layout
• If you make formatting changes to a slide and want to reapply the default
settings, click Reset
41
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Layouts
There are 13 layouts
• Title Only – Standard slide with no text content box, do not use for section title
• Title and Content (1 Col) – Standard slide with title and text content box
• Title and Content (2 Col) – Standard slide with title and two text content boxes
• Comparison – Standard slide with title and two text content boxes with subtitles
• Section Title – Use between sections
• No text
• Table – Quick and easy way to get a table with brand colors
• Bar Chart – Quick and easy way to get a bar chart with brand colors
• Line Chart – Quick and easy way to get a line chart with brand colors
• Pie Chart – Quick and easy way to get a pie chart with brand colors
• Code Formatting – Quick and easy way to get preferred code formatting
• Title Slide – Presentation title with author name and contact info. Use only once in presentation.
• Completely blank – A totally blank, white slide. Use sparingly.
42
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Title Proxima Nova Bold (30pt)
• All body text is Proxima Nova Regular
• Subhead (18pt)
• Level Two (18pt)
o Level Three (18pt)
o Level Four (18pt)
• Line spacing is set in master slides
43
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Brand Colors
44
R: 241
G: 241
B: 241
R: 153
G: 153
B: 153
R: 109
G: 179
B: 63
Spring
Brand Colors
R: 52
G: 48
B: 45
SpringOne 2GX 2015
Theme Colors
R: 83
G: 83
B: 83
R: 12
G: 48
B: 100
R: 156
G: 209
B: 121
R: 204
G: 204
B: 204
R: 38
G: 97
B: 168
R: 114
G: 163
B: 211
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Code Slide
45
// This is Arial: 18 pt or higher please
public class TransferServiceImpl implements TransferService {
public TransferServiceImpl(AccountRepository ar) {
this.accountRepository = ar;
}
…
}
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 46
<Your CTA>
<Related Session>
Learn More. Stay Connected.
@springcentral Spring.io/video
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Safe Harbor Statement
The following is intended to outline the general direction of Pivotal's offerings. It is
intended for information purposes only and may not be incorporated into any
contract. Any information regarding pre-release of Pivotal offerings, future updates
or other planned modifications is subject to ongoing evaluation by Pivotal and is
subject to change. This information is provided without warranty or any kind,
express or implied, and is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing decisions
regarding Pivotal's offerings. These purchasing decisions should only be based on
features currently available. The development, release, and timing of any features
or functionality described for Pivotal's offerings in this presentation remain at the
sole discretion of Pivotal. Pivotal has no obligation to update forward looking
information in this presentation.
47
If you are a pivotal employee and your talk contains forward facing
information, please include this slide at the beginning or
conclusion of the presentation.
Remove this text box before presenting.
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
LOGOS & ICONS
48
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Logos
49
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Event Logos and Icons
50
Logo on dark Logo on light Date logo on dark Date logo on light
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Project Icons
51
Spring
Framework
Spring
Security
Spring
Data
Spring
Batch
Spring
Integration
Spring
Reactor
Spring
AMQP
Spring
Hateoas
Spring
Mobile
Spring
Android
Spring
Social
Groovy Spring
Web Services
Spring
Web Flow
Spring
XD
Spring
Boot
Spring
LDAP
Grails
PNG and PSD files for all Spring projects can be found here…
https://www.dropbox.com/sh/5rbbt8v6evvm7xm/AAAZmhgf0zglGHZUWYhPvojFa?dl=0
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Tool Suite Icons
52
Spring Tool Suite Groovy / Grails Tool Suite
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Spring Document Icons
53
Spring Framework ToolsSupport
Guides Reference AppTutorials
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Additional Spring Icons
54
Continuous
Integration
Metrics Forums /
Discussion
Blog @Issues
All Author Broadcast Date News
Event
Releases Apple LinuxEngineering Windows
Professional
Support
Community
Support
Location
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Icon Guidelines
• These icons can be used when Spring
icons are not appropriate.
• Max icon size is 2.08 inches –
anything larger and the icon will be
blurry
• Icons are transparent and can be
placed over images and other objects
• To use an icon, simply choose, copy
and paste
• 200x200 PNG files can be found here…
https://www.dropbox.com/sh/wy65b4l5t4fv9
b4/AAD1LMHcOtwJSTbNu23zqywka?dl=0
55
Max icon size:
2.08 inches
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 56
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 57
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
CHARTS & TABLES
58
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Sample Pie Chart
59
1st Qtr
2nd Qtr
3rd Qtr
4th Qtr
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Sample Bar Chart
60
0
23
45
68
90
113
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
North
South
East
West
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Sample Line Chart
61
0
23
45
68
90
113
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
North
South
East
West
Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Sample Table
62
2007 2008 2009 2010
Category 1 2.4 6.4 4.1 6.6
Category 2 8.2 4.5 3.2 3.8
Category 3 4.6 3.2 1.9 9.6
Category 4 6.7 3.3 3.4 2.2
Category 5 4.3 5.6 7.1 3.4

More Related Content

PDF
State of Securing Restful APIs s12gx2015
PDF
Reactive Web Applications
PDF
P to V to C: The Value of Bringing “Everything” to Containers
PDF
Under the Hood of Reactive Data Access (1/2)
PDF
Under the Hood of Reactive Data Access (2/2)
PDF
Running Spring Boot Applications as GraalVM Native Images
PPTX
Machines Can Learn - a Practical Take on Machine Intelligence Using Spring Cl...
PDF
Net core vs. node.js what to choose when
State of Securing Restful APIs s12gx2015
Reactive Web Applications
P to V to C: The Value of Bringing “Everything” to Containers
Under the Hood of Reactive Data Access (1/2)
Under the Hood of Reactive Data Access (2/2)
Running Spring Boot Applications as GraalVM Native Images
Machines Can Learn - a Practical Take on Machine Intelligence Using Spring Cl...
Net core vs. node.js what to choose when

What's hot (15)

PDF
Full Steam Ahead, R2DBC!
PDF
Enterprise makeover. Be a good web citizen, deliver continuously and change y...
PPT
Building an HTML5 Video Player
PPTX
Interview preparation devops
PDF
Securing User Data with SQLCipher
PDF
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
PDF
8 pre launch steps to go with the web rtc based application development
PDF
Cloud Foundry UAA as an Identity Gateway
PDF
Calling all modularity solutions
PDF
Embrace the JVM
PDF
Ask us anything v9
PDF
Wordcamp Thessaloniki 2011 The Nextweb
PDF
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
PDF
Strengthening Adobe’s Enterprise Platform with Day Software and Open Development
PPTX
Full Steam Ahead, R2DBC!
Enterprise makeover. Be a good web citizen, deliver continuously and change y...
Building an HTML5 Video Player
Interview preparation devops
Securing User Data with SQLCipher
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
8 pre launch steps to go with the web rtc based application development
Cloud Foundry UAA as an Identity Gateway
Calling all modularity solutions
Embrace the JVM
Ask us anything v9
Wordcamp Thessaloniki 2011 The Nextweb
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
Strengthening Adobe’s Enterprise Platform with Day Software and Open Development
Ad

Viewers also liked (20)

PDF
Introduction to Big Data
PDF
Biwa summit15
PDF
Millennials 5 insights and 5 watchouts
PDF
My $0 Growth Experiments That Added Thousands of App Users
PPT
Photoquai Paris 2007
PDF
DDMC - Countdown to the data explosion
PPT
Kinkyfunk
PDF
Scaling Continuous Delivery to minimize risks (Delivery of Things 2016)
PPS
Voeuxroge08
PPTX
Personalizing Treatment using Oracle TRC, OpenWorld 2014
PPS
Belle Maman
PDF
Content Usability
PDF
Cats, cats & more cats
PDF
Always Design Responsibly: Social Responsibility in Technological Innovation
PPS
Perles Du Bac 2008
PPT
Business Change through Predictive Analytics
PPS
Sawa Bona - Sikhona
PDF
Les nouveaux usages des ressources audiovisuelles : partage et diffusion sur ...
PDF
5 QuickBooks Mistakes Every Business Should Avoid
PDF
Learning About At-Risk Veterans Using 
Online Network Surveys
Introduction to Big Data
Biwa summit15
Millennials 5 insights and 5 watchouts
My $0 Growth Experiments That Added Thousands of App Users
Photoquai Paris 2007
DDMC - Countdown to the data explosion
Kinkyfunk
Scaling Continuous Delivery to minimize risks (Delivery of Things 2016)
Voeuxroge08
Personalizing Treatment using Oracle TRC, OpenWorld 2014
Belle Maman
Content Usability
Cats, cats & more cats
Always Design Responsibly: Social Responsibility in Technological Innovation
Perles Du Bac 2008
Business Change through Predictive Analytics
Sawa Bona - Sikhona
Les nouveaux usages des ressources audiovisuelles : partage et diffusion sur ...
5 QuickBooks Mistakes Every Business Should Avoid
Learning About At-Risk Veterans Using 
Online Network Surveys
Ad

Similar to High performance stream processing (20)

PPTX
Serialization and performance by Sergey Morenets
PPTX
Сергей Моренец. Serialization and performance in Java
PPTX
Big Data Applications Made Easy: Fact Or Fiction?
PPTX
Serialization and performance in Java
PPT
Dynamic Classification in a Silicon-Based Forwarding Engine
PDF
State of Akka 2017 - The best is yet to come
PDF
Developing real-time data pipelines with Spring and Kafka
PDF
Extending Flink State Serialization for Better Performance and Smaller Checkp...
PDF
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
PPTX
Datapower Capacity Planning for X3 and Virtual Form Factors
PDF
Kernel Recipes 2019 - XDP closer integration with network stack
PDF
Develop modern apps using Spring ecosystem at time of BigData
PPTX
Java 5 PSM for DDS: Initial Submission (out of date)
PDF
Cyclone DDS Unleashed: The Origins
PPTX
Typesafe spark- Zalando meetup
PDF
JavaCro 2014 Scala and Java EE 7 Development Experiences
PDF
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
PDF
Xephon K A Time series database with multiple backends
PDF
Conference Paper: Universal Node: Towards a high-performance NFV environment
PDF
Cassandra Summit 2014: A Train of Thoughts About Growing and Scalability — Bu...
Serialization and performance by Sergey Morenets
Сергей Моренец. Serialization and performance in Java
Big Data Applications Made Easy: Fact Or Fiction?
Serialization and performance in Java
Dynamic Classification in a Silicon-Based Forwarding Engine
State of Akka 2017 - The best is yet to come
Developing real-time data pipelines with Spring and Kafka
Extending Flink State Serialization for Better Performance and Smaller Checkp...
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
Datapower Capacity Planning for X3 and Virtual Form Factors
Kernel Recipes 2019 - XDP closer integration with network stack
Develop modern apps using Spring ecosystem at time of BigData
Java 5 PSM for DDS: Initial Submission (out of date)
Cyclone DDS Unleashed: The Origins
Typesafe spark- Zalando meetup
JavaCro 2014 Scala and Java EE 7 Development Experiences
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
Xephon K A Time series database with multiple backends
Conference Paper: Universal Node: Towards a high-performance NFV environment
Cassandra Summit 2014: A Train of Thoughts About Growing and Scalability — Bu...

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
history of c programming in notes for students .pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Essential Infomation Tech presentation.pptx
PDF
System and Network Administraation Chapter 3
PPTX
Transform Your Business with a Software ERP System
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Upgrade and Innovation Strategies for SAP ERP Customers
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
history of c programming in notes for students .pptx
Nekopoi APK 2025 free lastest update
Reimagine Home Health with the Power of Agentic AI​
How to Migrate SBCGlobal Email to Yahoo Easily
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms II-SECS-1021-03
Essential Infomation Tech presentation.pptx
System and Network Administraation Chapter 3
Transform Your Business with a Software ERP System
Navsoft: AI-Powered Business Solutions & Custom Software Development
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Softaken Excel to vCard Converter Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41

High performance stream processing

  • 1. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attributio n-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ SPRINGONE2GX WASHINGTON, DC High Performance Stream Processing By Stephane Maldini, Glenn Renfro, David Turanski @smaldini, @cppwfs, @dturanski
  • 2. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Performance as it pertains to: Message flow Serialization Processing 2
  • 3. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Message Flow: The Myth? 3 “1 million events a second?”
  • 4. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Message Flow: The Myth? 4 “It Depends” https://spring.io/blog/2015/06/17/spring-xd-benchmarks-part-1
  • 5. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Message Flow: The Myth? 5
  • 6. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Hardware • Check Network speed • iperf • Check Disk Read Write speed • dd • Processor Speed (specs) 6
  • 7. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Hardware: Network 7 1 Gb Ethernet Msg Size Msgs/Sec 100 1,250,000 1,000 125,000 10,000 12,500 100,000 1,250 10 Gb Ethernet Msg Size Msgs/Sec 100 12,500,000 1,000 1,250,000 10,000 125,000 100,000 12,500
  • 8. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Hardware: Disk • dd bs=1M count=256 if=/dev/zero of=test • will just commit your 128 MB of data into a RAM buffer • initially fast but server is still writing to disk after test • dd bs=1M count=256 if=/dev/zero of=/tmp/testfile conv=fdatasync • This tells dd to require a complete “sync” once, right before it exits. • Ensures all data is on the disk before calculating result 8 https://romanrm.net/dd-benchmark
  • 9. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Message Size 9
  • 10. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Message Size 10
  • 11. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Transports • Rabbit • perftest • https://www.rabbitmq.com/java-tools.html • Kafka • ProducerPerformance • kafka-consumer-perf-test.sh • https://engineering.linkedin.com/kafka/benchmarking-apache- kafka-2-million-writes-second-three-cheap-machines 11
  • 12. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Testing Tools • Spring XD • load-generator-source • throughput • https://github.com/spring-projects/spring-xd-modules 12
  • 13. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Configuration • Kafka • BatchSize o Default is 16384 o .0.8.2.1 vs .0.8.1.1 • Rabbit • prefetch o Default for XD is 1 13
  • 14. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Batching • https://github.com/cppwfs/rabbitmqsink • https://github.com/cppwfs/rabbitmqsource 14 Spring AMQP Batch Size Msgs Per Sec 1 18,465 10 158,564 100 453,926
  • 15. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Network Hops • Adds a cost per hop • Options: • Direct Binding • Composed Modules • Custom Module 15
  • 16. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ One last little thing • JMX is disabled by default • When enabled it took a performance hit because how SI was capturing stats via its exporters 16
  • 17. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Object Serialization POJO ⇔ byte[] required for transporting data between remote processes • XD uses Kryo except when the payload type is byte[] or String • XD supports optimizing Kryo for known payload types 17
  • 18. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Serialization Benchmarks 18 An excellent comparative JVM serializers benchmark: https://github.com/eishay/jvm-serializers/wiki Best case: ~1500 ns
  • 19. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Serialization Benchmarks 19 {"media": {"uri": "http://javaone.com/keynote.ogg", "title":"Javaone Keynote", "width":640, "height":480, "format":"video/mpg4","duration":18000000,"size":58982400,"bitrate":262144," persons":["Bill Gates", "Steven Jobs"], "player":"JAVA","copyright":"" }, "images":[ {"uri": "http://javaone.com/keynote_large.jpg","title":"Javaone Keynote","width": 1024,"height":768,"size":"LARGE"}, { "uri": "http://javaone.com/keynote_small.jpg", "title":"Javaone Keynote","width": 320,"height":240, "size":"SMALL"}] } Domain Object (as JSON):
  • 20. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Object Serialization • Size matters: YMMV • Manually optimized Kryo ser/deser ~ 1500 ns = 1.5 µs = .0015 ms. • Kafka XD;1000B messages ~ 500,000 msg/sec • 2000 ns per message • Serialization overhead • ~ 285174 msg/sec (source|sink) • At 50,000 msg/sec, the overhead may still be significant (source|p1|p2|p3|sink) 20
  • 21. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Optimizing Kryo in XD • Disable references - If you know payload types do not contain cyclic references. xd.codec.kryo.references=false (in servers.yml) • This is a global setting for all streams • Register a custom serializer for a known payload type • Install a jar with containing the required beans in xd/lib. XD will auto-configure these 21
  • 22. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Custom Serializers in XD 22 public PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars, boolean useReferences) package spring.xd.bus.ext; ... @Configuration public class CustomKryoRegistrarConfig { @Bean public KryoRegistrar myCustomRegistration() { List<Registration> registrations = new ArrayList<>(); registrations.add(new Registration(MyObject.class, new MySerializer(),62)); return new KryoRegistrationRegistrar(registrations); } } XD scans this package for beans of type KryoRegistrar Each Registration associates a type to a serializer and a unique ID
  • 23. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Custom Serializers in XD 23 public class AddressSerializer extends Serializer<Address> { @Override public void write(Kryo kryo, Output output, Address address) { output.writeString(address.getStreet()); output.writeString(address.getCity()); output.writeString(address.getCountry()); } @Override public Address read(Kryo kryo, Input input, Class<Address> type) { return new Address(input.readString(),input.readString(),input.readString()); } }
  • 24. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Serializable Domain Object 24 public class Address implements KryoSerializable { ... @Override public void write(Kryo kryo, Output output) { output.writeString(this.street); output.writeString(this.city); output.writeString(this.country); } @Override public void read(Kryo kryo, Input input) { this.street = input.readString(); this.city = input.readString(); this.country = input.readString(); } } • (+) Simple: This works out of the box with no additional configuration • (-) Requires access to source or wrapping • (-) Internal benchmarks indicate this is not as fast as
  • 25. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Benchmarking Your Custom Serializers 25 Sample Results Ser (ns) Desr (ns) Baseline 2710.5 4590.9 Serializable Domain Object 1663.3 2579.1 Custom Serializers 1126.1 2873.8 The spring-xd-samples repo includes a serialization- benchmarks project • https://github.com/spring-projects/spring-xd- samples/tree/master/serialization-benchmarks Let’s look at some code…
  • 26. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ What about Processing ? • Source Msg/s > Sink Msg/s ? • Rate limited by Sink • Blocking transformation (http, file…) ? • Rate limited by blocking Processor • Polling Sources Pausing ? • Rate limited by small Prefetch properties 26
  • 27. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Mitigating Cost of IO • Negative impact ? • Scale Out ? o Loosing Data Affinity (colocation…) o Network cost • Scale Up ? o Message passing Overhead o More In-Flight Data 27
  • 28. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Mitigating Cost of IO • Negative impact ? • Scale Out ? o Loosing Data Affinity (colocation…) o Network cost • Scale Up ? o Message passing Overhead o More In-Flight Data 28
  • 29. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Blocking IO 29
  • 30. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Asynchronous IO 30
  • 31. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Asynchronous IO • Mitigate temporarily slow processors/sink • Back to degraded mode when queue full • Async Hand-Off generates Garbage 31
  • 32. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Reactor Core: Efficient Asynchronous • Trade-off Memory vs Garbage generation • Pre-Allocated Ring Buffer • Concurrent consuming without duplicating buffer content • Ring Buffer Consumer Sequences 32
  • 33. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Ring What? 33
  • 34. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Module Teasing 34 @EnableReactorModule(concurrency = 4) /* Invoke accept() 4 times */ public class Sample implements ReactiveProcessor<Message, Message> { @Override public void accept( Publisher<Message> messageStream, /* A Ring Buffer Consumer */ ReactiveOutput<Message> output) { /* A Channel Output bridge */ output.writeOutput(messageStream); } }
  • 35. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Questions 35
  • 36. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 36 Microservices to Fast Data John T. Davies Learn More. Stay Connected. @springcentral Spring.io/video
  • 37. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 37
  • 38. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ USING THIS TEMPLATE 38
  • 39. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ STOP! Download Fonts Now. PLEASE DOWNLOAD AND INSTALL THESE FONTS BEFORE CREATING YOUR PRESENTATION. You can download the fonts here… https://www.dropbox.com/s/na8jewnsp8dp659/SpringOne-2015-Fonts.zip?dl=0 Fonts included in the ZIP file: • Proxima Nova (body text) • Domine (included but no longer needed) http://www.fontspring.com/support/installing/how-do-i-install-fonts-on-my-mac http://www.fontspring.com/support/installing/how-do-i-install-fonts-on-my-windows-pc 39
  • 40. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Intro This template has been carefully prepared with specific layouts, colors, fonts and more. This short intro will outline the basic components of this template. Note: This template includes slides with approved color palette, fonts, logos and clip art. It’s a good idea to keep these slides in order to quickly access these assets then delete the slides when you have finished creating your presentation. 40
  • 41. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Inserting New Slides and Applying Layouts • To create different types of slides, select New Slide and apply desired Layout • If you make formatting changes to a slide and want to reapply the default settings, click Reset 41
  • 42. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Layouts There are 13 layouts • Title Only – Standard slide with no text content box, do not use for section title • Title and Content (1 Col) – Standard slide with title and text content box • Title and Content (2 Col) – Standard slide with title and two text content boxes • Comparison – Standard slide with title and two text content boxes with subtitles • Section Title – Use between sections • No text • Table – Quick and easy way to get a table with brand colors • Bar Chart – Quick and easy way to get a bar chart with brand colors • Line Chart – Quick and easy way to get a line chart with brand colors • Pie Chart – Quick and easy way to get a pie chart with brand colors • Code Formatting – Quick and easy way to get preferred code formatting • Title Slide – Presentation title with author name and contact info. Use only once in presentation. • Completely blank – A totally blank, white slide. Use sparingly. 42
  • 43. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Title Proxima Nova Bold (30pt) • All body text is Proxima Nova Regular • Subhead (18pt) • Level Two (18pt) o Level Three (18pt) o Level Four (18pt) • Line spacing is set in master slides 43
  • 44. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Brand Colors 44 R: 241 G: 241 B: 241 R: 153 G: 153 B: 153 R: 109 G: 179 B: 63 Spring Brand Colors R: 52 G: 48 B: 45 SpringOne 2GX 2015 Theme Colors R: 83 G: 83 B: 83 R: 12 G: 48 B: 100 R: 156 G: 209 B: 121 R: 204 G: 204 B: 204 R: 38 G: 97 B: 168 R: 114 G: 163 B: 211
  • 45. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Code Slide 45 // This is Arial: 18 pt or higher please public class TransferServiceImpl implements TransferService { public TransferServiceImpl(AccountRepository ar) { this.accountRepository = ar; } … }
  • 46. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 46 <Your CTA> <Related Session> Learn More. Stay Connected. @springcentral Spring.io/video
  • 47. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Safe Harbor Statement The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation. 47 If you are a pivotal employee and your talk contains forward facing information, please include this slide at the beginning or conclusion of the presentation. Remove this text box before presenting.
  • 48. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ LOGOS & ICONS 48
  • 49. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Logos 49
  • 50. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Event Logos and Icons 50 Logo on dark Logo on light Date logo on dark Date logo on light
  • 51. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Project Icons 51 Spring Framework Spring Security Spring Data Spring Batch Spring Integration Spring Reactor Spring AMQP Spring Hateoas Spring Mobile Spring Android Spring Social Groovy Spring Web Services Spring Web Flow Spring XD Spring Boot Spring LDAP Grails PNG and PSD files for all Spring projects can be found here… https://www.dropbox.com/sh/5rbbt8v6evvm7xm/AAAZmhgf0zglGHZUWYhPvojFa?dl=0
  • 52. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Tool Suite Icons 52 Spring Tool Suite Groovy / Grails Tool Suite
  • 53. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Spring Document Icons 53 Spring Framework ToolsSupport Guides Reference AppTutorials
  • 54. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Additional Spring Icons 54 Continuous Integration Metrics Forums / Discussion Blog @Issues All Author Broadcast Date News Event Releases Apple LinuxEngineering Windows Professional Support Community Support Location
  • 55. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Icon Guidelines • These icons can be used when Spring icons are not appropriate. • Max icon size is 2.08 inches – anything larger and the icon will be blurry • Icons are transparent and can be placed over images and other objects • To use an icon, simply choose, copy and paste • 200x200 PNG files can be found here… https://www.dropbox.com/sh/wy65b4l5t4fv9 b4/AAD1LMHcOtwJSTbNu23zqywka?dl=0 55 Max icon size: 2.08 inches
  • 56. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 56
  • 57. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 57
  • 58. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ CHARTS & TABLES 58
  • 59. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Sample Pie Chart 59 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
  • 60. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Sample Bar Chart 60 0 23 45 68 90 113 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr North South East West
  • 61. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Sample Line Chart 61 0 23 45 68 90 113 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr North South East West
  • 62. Unless otherwise indicated, these slides are © 2013 -2015 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Sample Table 62 2007 2008 2009 2010 Category 1 2.4 6.4 4.1 6.6 Category 2 8.2 4.5 3.2 3.8 Category 3 4.6 3.2 1.9 9.6 Category 4 6.7 3.3 3.4 2.2 Category 5 4.3 5.6 7.1 3.4