Spring & Messaging: The next development generation
with Artem Bilan by Pivotal © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Artem Bilan Spring Integration Team
[email protected]
Spring Framework Spring AMQP Spring XD Reactor
https://spring.io/team/artembilan
http://stackoverflow.com/users/2756547
http://www.linkedin.com/in/cleric
https://github.com/artembilan
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Messaging and why do I care?
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Messaging is very simple
Headers
Payload
public static void main(String[] args) { ... } © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
XD
BOOT
Stream, Taps, Jobs
GRAILS
Bootable, Minimal, Ops-Ready
Full-stack, Web
INTEGRATION
BATCH
BIG DATA
WEB
Channels, Adapters, Filters, Transforms
Jobs, Steps, Readers, Writers
Ingestion, Export, Orchestration, Hadoop
Controllers, REST, WebSocket
DATA RELATIONAL
NON-RELATIONAL
CORE FRAMEWORK
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
SECURITY
GROOVY
REACTOR
Messaging in Spring IO
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Integration Written
Uses
Meet IoC!
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
The heart of Spring Integration – – –
Endpoints (Filters) connected through Channels (Pipes) exchanging Message
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
How does it work?
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Integration: Advanced • • • • • • • • •
SpEL, SpEL, SpEL … Scripting (Groovy, JSR223) Request Handler Advice Transaction Synchronization Error Handling Channel Adapters Correlation Lifecycle and Control Bus Message Store Serialization JMX Exposing
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
• • • • • • • • • •
Adapter, Adapter, Adapter … SecurityContext Propagation Payload Cloning IMAP SearchTermStrategy FileLocker Scatter-Gather Routing Slip Message Broker Process Manager Multitenancy
Retry -> tx; tx - > Retry inbound-adapter->poller->http-gateway1->http-gateway2->jdbc-outbound-adapter
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Cache Advice
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Transaction Synchronization
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
HTTP Proxy
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Integration 3.0: What’s New? • • • •
1000 & 1 bug fix 256 refactoring 125 improvement 1 new feature
Joke! © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
• • • • • • • •
Spring 4 compatibility Jackson 2 support Syslog adapters TCP/IP Events HTTP RequestMapping SpEL customization ‘id’ for chain black box …
@RequestMapping
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
@RequestMapping by Spring Integration
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Expression Language
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
SpEL: EvaluationContext
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
SpEL Customization: high-level API
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
SpEL Customization: high-level API
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring XD • Unified Platform • Developer Productivity • Modular Extensibility • Distributed Architecture • Portable Runtime • Hadoop Distribution Agnostic • Proven Foundation • XD = ‘eXtreme Data’ © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring XD Files
Sensors
Mobile
Social
Spring XD Shell Spring XD Runtime
Taps
Jobs
Compute
Workflow
Redis
Ingest
Streams
Export
Export
RDBMS
Gemfire
HDFS
NoSQL
R, SAS
Predictive modeling © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Stream Processing Model
How can|wefilter make this|easier? http file
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
XD Runtimes XD Admin
http | filter | file
CLUSTERED NODE
CLUSTERED NODE
CLUSTERED NODE
SINGLE NODE
HTTP Module
Filter Module
File Module
All Modules
Rabbit, Redis, (Pluggable) © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
In Memory Transport
http | filter | file
Spring Integration 4.0: What Next? • • • • • • •
Spring 4 Platform Java DSL New EIP Patterns New Adapters Concurrency Improvement Clustering Features ???
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Framework 4.0: Websockets
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Framework 4.0: Websockets
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Reactor • • • • • • • © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Foundation Distillation best-practices Lightweight Event routing Fully asynchronous Pattern based Clear API
Dispatchers, Events, Selectors, Streams, Promises, etc.
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Reactor – Landscape
Spring Integration
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Spring Integration + Reactor
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
Learn More. Stay Connected. • • • • • • • • • •
Spring IO: https://spring.io/platform GitHub: https://github.com/spring-projects Spring Integration: http://projects.spring.io/spring-integration Spring XD: http://projects.spring.io/spring-xd Reactor: https://github.com/reactor Spring WebSockets: http://assets.spring.io/wp/WebSocketBlogPost.html EIP: http://www.eaipatterns.com Spring Batch: http://projects.spring.io/spring-batch Spring for Hadoop: http://projects.spring.io/spring-hadoop Groovy: http://groovy.codehaus.org
© 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.
ありがとう © 2013 Pivotal Inc. All rights reserved. Do not distribute without permission.